Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Nov 2012 12:50:50 -0700 (MST)
From:      Warren Block <wblock@wonkity.com>
To:        Snow Mountains <snow.mountains.4@gmail.com>
Cc:        freebsd questions list <freebsd-questions@freebsd.org>, Shane Ambler <FreeBSD@shaneware.biz>
Subject:   Re: FreeBSD on SSD on ASUS P5KPL-C
Message-ID:  <alpine.BSF.2.00.1211191235400.28618@wonkity.com>
In-Reply-To: <CAAHVa8uf65aaEWcKehojc0M67Psrn8Mpfj9GT=XR4GK47c%2BBWA@mail.gmail.com>
References:  <CAAHVa8thx4_fjQrTUwwGxERtCvTX9NnR59JxH7gQ38tq7irCZw@mail.gmail.com> <CAHHBGkph5j86wDpobasdtM%2BJZMQKt2eqcn8LKd4V0NzyDxR3Tw@mail.gmail.com> <CAAHVa8vm6vFa8ajiOJT3VWnvcZasdQM%2BnaJdjG9eLx%2Bj5F80CA@mail.gmail.com> <50A83993.50401@ShaneWare.Biz> <CAAHVa8uf65aaEWcKehojc0M67Psrn8Mpfj9GT=XR4GK47c%2BBWA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 19 Nov 2012, Snow Mountains wrote:

> 2012/11/18 Shane Ambler <FreeBSD@shaneware.biz>:
>> 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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.1211191235400.28618>