From owner-freebsd-questions@FreeBSD.ORG Mon Nov 19 19:50:53 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 DEA0938B for ; Mon, 19 Nov 2012 19:50: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 8F0BC8FC12 for ; Mon, 19 Nov 2012 19:50:52 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.5/8.14.5) with ESMTP id qAJJopNA028797; Mon, 19 Nov 2012 12:50:51 -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 qAJJooDj028794; Mon, 19 Nov 2012 12:50:51 -0700 (MST) (envelope-from wblock@wonkity.com) Date: Mon, 19 Nov 2012 12:50:50 -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]); Mon, 19 Nov 2012 12:50:51 -0700 (MST) Cc: freebsd questions list , Shane Ambler 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: Mon, 19 Nov 2012 19:50:53 -0000 On Mon, 19 Nov 2012, Snow Mountains wrote: > 2012/11/18 Shane Ambler : >> On 18/11/2012 06:49, Snow Mountains wrote: >> >>> Could you recommend a reliable document on how to do a correct block >>> alignment for new FreeBSD 9 install? FreeBSD Handbook doesn't >>> mention this at all, although I can find a lot of (not quite >>> consistent) advises on the net on how to do it with gpart/newfs. >> >> Over the last week there has been a discussion with the subject >> "Advanced Format Drive ?" on this list that has been discussing that. >> If you only just signed up then you can search for it in the mail archives. > > There is a lot of useful info there, and I also found a lot of useful > tips from Warren Block on how to create swap as a file, how to use > tmpfs, about noatime etc. I didn't say anything about noatime, and personally have not done that on SSDs. > However, nowhere I can found anything that > could explain me for sure how to do this BEFORE that: > > I've got 240G Kingston SSD. I want this: > > win7: > ada2s1 ~ 30G empty (probably for experimental little win7 install in > the future) > > freebsd9: > ada2s2a ~3G for / > ada2s2d ~80G the for /usr (separated for easier backup) > ada2s2f ~ the rest for storage > > How to do this with gpart, respecting 4g alignment etc? Can anybody > share the exact commands to achieve this? That's "4K". Most of the following is shown in the new Handbook gmirror section: http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/geom-mirror.html 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 create -s bsd ada2s1 Set this slice active and add FreeBSD bootcode: # gpart set -a active -i 1 ada2s1 # gpart bootcode -b /boot/boot ada2s1 Add the FreeBSD partitions. -a will work here, aligning the partitions. # gpart add -t freebsd-ufs -a 4k -l dxrootfs -s 3g ada2s1 # gpart add -t freebsd-ufs -a 4k -l dxvarfs -s 1g ada2s1 # gpart add -t freebsd-ufs -a 4k -l dxusrfs ada2s1 Note the use of GPT labels. The "dx" is just random go-fast letters added because I believe it is a mistake to have duplicate labels and try to keep them all unique. Pick your own. /etc/fstab entries are /dev/gpt/dxrootfs, /dev/gpt/dxvarfs, /dev/gpt/dxusrfs.