From owner-freebsd-questions@FreeBSD.ORG Thu Nov 1 01:41:52 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DEEC1B9A for ; Thu, 1 Nov 2012 01:41:52 +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 7C7AA8FC0A for ; Thu, 1 Nov 2012 01:41:52 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.5/8.14.5) with ESMTP id qA11fjJm007684; Wed, 31 Oct 2012 19:41:45 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.5/8.14.5/Submit) with ESMTP id qA11fjnj007681; Wed, 31 Oct 2012 19:41:45 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Wed, 31 Oct 2012 19:41:45 -0600 (MDT) From: Warren Block To: doug@safeport.com Subject: Re: help with gpart In-Reply-To: Message-ID: References: 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]); Wed, 31 Oct 2012 19:41:45 -0600 (MDT) 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: Thu, 01 Nov 2012 01:41:53 -0000 On Wed, 31 Oct 2012, doug@safeport.com wrote: > I am trying to put FreeBSD on an HP laptop. The use up all the partitions to > I deleted the least useful one, shrunk the windows partition and tried to add > freeBSD. > > gpart show: > > => 63 625142385 ada0 MBR (298G) > 63 1985 - free - (992k) > 2048 407552 1 ntfs [active] (199M) > 409600 311951360 2 ntfs (148G) > 312360960 33 - free - (16k) > 312360993 283115448 4 freebsd (135G) > 595476441 577575 - free - (282M) > 596054016 28880896 3 ntfs (13G) > 624934912 207536 - free - (101M) > > I do not have any flexibility as to where #4 is. I would like to use the 9.0 > installer from this point but it wants to add BSD partitions to the 282M > space. > > I am not sure after much man-ing and google-ing what gpart commands are > required. I guess I could use sysinstall at this point but learning gpart > seems like a good thing. I assume I need to do something like: > > gpart add set -a active -i 4 ada04 (not sure geom is correct) No, for slice 4, it would be ada0s4. For the MBR setup, bootcode must be added to both the MBR (ada0) and the slice. > gpart bootcode -b /boot/boot0 ada04 > > and then add the mounts. I would like > > / > swap > /var 10g > /usr 20g > /home (the rest) > > but am somewhat lost about the syntax and geom values. thanks for any help bsdlabel partitions are created inside a slice. No idea whether the partition numbers being out of order will be a problem... gpart create -s bsd ada0s4 gpart bootcode -b /boot/boot ada0s4 Then add partitions inside that: gpart add -t freebsd-ufs -s 2g ada0s4 gpart add -t freebsd-swap -s 4g ada0s4 gpart add -t freebsd-ufs -2 10g ada0s4 ... I strongly suggest taking advantage of labels with the -l option.