From owner-freebsd-questions@FreeBSD.ORG Wed Jun 25 15:58:20 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9C3C0D0C for ; Wed, 25 Jun 2014 15:58:20 +0000 (UTC) Received: from wonkity.com (wonkity.com [67.158.26.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "wonkity.com", Issuer "wonkity.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4E5B12799 for ; Wed, 25 Jun 2014 15:58:20 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.9/8.14.9) with ESMTP id s5PFwFgm097900 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 25 Jun 2014 09:58:15 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.9/8.14.9/Submit) with ESMTP id s5PFwFAj097897; Wed, 25 Jun 2014 09:58:15 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Wed, 25 Jun 2014 09:58:15 -0600 (MDT) From: Warren Block To: Bertram Scharpf Subject: Re: 10.0 bsdlabel returns an error In-Reply-To: <20140625125830.GA1329@becker.bs.l> Message-ID: References: <20140625125830.GA1329@becker.bs.l> User-Agent: Alpine 2.11 (BSF 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (wonkity.com [127.0.0.1]); Wed, 25 Jun 2014 09:58:15 -0600 (MDT) Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jun 2014 15:58:20 -0000 On Wed, 25 Jun 2014, Bertram Scharpf wrote: > Hi, > > I tried to find out how large the partitions on my main hard disk > are. But then: > > # bsdlabel ada0s2 > bsdlabel: /dev/ada0s2 read: Invalid argument > # bsdlabel ada0s3 > bsdlabel: /dev/ada0s3 read: Invalid argument > # uname -rs > FreeBSD 10.0-STABLE > # mount | grep ada0s2 | wc -l > 0 > > I remembered that I solved an earlier label issue on an other > machine by booting 9.2 from a USB stick. This helped me here, too. > > Still, I want to know why the 10.0 "bsdlabel" doesn't work. Because the default partitioning method of 10.0 and later is GPT. Wikipedia has a nice entry on it: http://en.wikipedia.org/wiki/GUID_Partition_Table FreeBSD shows the partitions on a GPT disk as p1, p2, and so on. gpart(8) can show and edit these partitions, and MBR partitions, and others. Use it in preference to the old fdisk and bsdlabel. This article shows how to use gpart to partition disks with GPT or MBR: http://www.wonkity.com/~wblock/docs/html/disksetup.html