From owner-freebsd-questions@FreeBSD.ORG Sat Jan 12 16:56:44 2013 Return-Path: Delivered-To: freebsd-questions@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 5F5655AE for ; Sat, 12 Jan 2013 16:56:44 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) by mx1.freebsd.org (Postfix) with ESMTP id 2408BC for ; Sat, 12 Jan 2013 16:56:43 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.6/8.14.6) with ESMTP id r0CGueU4007919; Sat, 12 Jan 2013 09:56:40 -0700 (MST) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.6/8.14.6/Submit) with ESMTP id r0CGud0q007916; Sat, 12 Jan 2013 09:56:40 -0700 (MST) (envelope-from wblock@wonkity.com) Date: Sat, 12 Jan 2013 09:56:39 -0700 (MST) From: Warren Block To: Erich Dollansky Subject: Re: gpart, glabel and newfs --> what am I doing wrong In-Reply-To: <20130112192220.617e28b6@X220.ovitrap.com> Message-ID: References: <20130112192220.617e28b6@X220.ovitrap.com> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (wonkity.com [127.0.0.1]); Sat, 12 Jan 2013 09:56:40 -0700 (MST) Cc: freebsd-questions@FreeBSD.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jan 2013 16:56:44 -0000 On Sat, 12 Jan 2013, Erich Dollansky wrote: > in general, I try to create the partitions with gpart, add a label with > glabel and put a filesystem. I think that I am doing something very > simple the wrong way but I cannot see the error. > > I try to do it in the following way: > > # gpart destroy -F da0 > # gpart create -s GPT da0 > # gpart add -t freebsd-boot -s 64k da0 > # gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 da0 > # gpart add -t freebsd-ufs -s 512m -a 4k -l Toshiba16GB2boot da0 > # gpart add -t freebsd-ufs -s 10m -a 4k -l Toshiba16GB2root da0 > # gpart add -t freebsd-swap -s 10m -a 4k -l Toshiba16GB2swap da0 > # gpart add -t freebsd-ufs -s 10m -a 4k -l Toshiba16GB2var da0 > # gpart add -t freebsd-ufs -s 10m -a 4k -l Toshiba16GB2tmp da0 > # gpart add -t freebsd-ufs -a 4k -l Toshiba16GB2usr da0 > > Label the partitions: > > # glabel label Toshiba16GB2boot /dev/da0p2 > # glabel label Toshiba16GB2root /dev/da0p3 > # glabel label Toshiba16GB2swap /dev/da0p4 > # glabel label Toshiba16GB2var /dev/da0p5 > # glabel label Toshiba16GB2tmp /dev/da0p6 > # glabel label Toshiba16GB2usr /dev/da0p7 There is no need for all this. You already created GPT labels with 'gpt -l' above. And those labels don't need extra metadata at the end of the partition. > And put a file system onto the partitions. > > # newfs /dev/label/Toshiba16GB2boo > # newfs /dev/label/Toshiba16GB2roo > # newfs /dev/label/Toshiba16GB2var > # newfs /dev/label/Toshiba16GB2tmp > # newfs /dev/label/Toshiba16GB2usr Those look cut off. And there's surely a limit to the length of label names, but I'm not sure what it is. Anyway, use # newfs /dev/gpt/Toshiba16GB2boot And consider using -U with newfs.