From owner-freebsd-questions@FreeBSD.ORG Thu Nov 22 03:37:22 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 F0067395 for ; Thu, 22 Nov 2012 03:37:22 +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 72D408FC0C for ; Thu, 22 Nov 2012 03:37:22 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.5/8.14.5) with ESMTP id qAM3bGH0010487; Wed, 21 Nov 2012 20:37:16 -0700 (MST) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.5/8.14.5/Submit) with ESMTP id qAM3bGGw010484; Wed, 21 Nov 2012 20:37:16 -0700 (MST) (envelope-from wblock@wonkity.com) Date: Wed, 21 Nov 2012 20:37:16 -0700 (MST) From: Warren Block To: Snow Mountains Subject: Re: FreeBSD on SSD on ASUS P5KPL-C In-Reply-To: Message-ID: References: <50A83993.50401@ShaneWare.Biz> 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, 21 Nov 2012 20:37:16 -0700 (MST) Cc: freebsd questions list 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, 22 Nov 2012 03:37:23 -0000 On Tue, 20 Nov 2012, Snow Mountains wrote: > 2012/11/20 Warren Block : >> On Tue, 20 Nov 2012, Snow Mountains wrote: >> >>> Just one small problem. Here I got this: >>> >>> # gpart create -s bsd ada2s1 >>> gpart: geom 'ada2s1': File exists >>> # gpart set -a active -i 1 ada2s1 >>> gpart: index '1': No such file or directory >>> >>> Expected? Anyway, is it any way to but FreeBSD on something like s2? >> >> >> Sorry, typo. FreeBSD does not have to be the first slice. >> >> # gpart create -s bsd ada2s2 >> # gpart set -a active -i 1 ada2s2 > > Hm, still doesn't work. Look: > > # gpart destroy -F ada2 > ada2 destroyed > # gpart create -s mbr ada2 > ada2 created > # gpart bootcode -b /boot/mbr ada2 > bootcode written to ada2 > # gpart add -t ntfs -b 2048 -s 30g ada2 > ada2s1 added > # gpart create -s bsd ada2s2 > gpart: arg0 'ada2s2': Invalid argument Got a chance to set up a scratch drive and check this. Turns out I left out the step of creating a "slice" (MBR partition) to hold the FreeBSD partitions. Also, GPT labels cannot be used in an MBR. Fixed below. I will probably add this to my disk setup article because it has come up more than once. -------- Create the MBR partitioning scheme: # gpart create -s mbr ada2 Add MBR bootcode: # gpart bootcode -b /boot/mbr ada2 Add the Windows 7 partition, forcing it to start at block 2048 because "-a" is not going to do what is expected for slices because of decades-old CHS stuff: # gpart add -t ntfs -b 2048 -s 30g ada2 Create the FreeBSD slice: # gpart add -t freebsd ada2 # gpart create -s bsd ada2s2 Set this MBR slice active and add FreeBSD bootcode: # gpart set -a active -i 2 ada2 # gpart bootcode -b /boot/boot ada2s2 Add the FreeBSD partitions. -a will work here, aligning the partitions. # gpart add -t freebsd-ufs -a 4k -s 3g ada2s2 # gpart add -t freebsd-ufs -a 4k -s 1g ada2s2 # gpart add -t freebsd-ufs -a 4k ada2s2 Note: can't use GPT labels... since this is MBR.