FreeBSD 8 GPT install, how?

Tom Evans tevans.uk at googlemail.com
Thu Dec 3 14:31:52 UTC 2009


On Thu, Dec 3, 2009 at 2:15 PM, Ollivier Robert
<roberto at keltia.freenix.fr> wrote:
> According to Steven Hartland:
>>
>> I've found a number things articles on how to achieve this on previous
>> versions, but they are all quite complex and was hoping there was a nice
>> easy way on 8.0 given the improvements listed in the release notes.
>>
>> Any pointers?
>
> A plug for my ZFS-on-ROOT howto here:
> http://www.keltia.net/howtos/zfsboot
>

This, like other howtos I've seen, seems to delight in making gpart as
difficult and cumbersome to use as possible. This one is better than
the ones on the wiki, who seem to think we should calculate the size
of a partition in 512k blocks. Eg:

gpart add -b 34 -s 128 -t freebsd-boot da0..da1            64 KB boot
gpart add -b 162 -s 1G -t freebsd-swap -l swapN da0..da1   1 GB swap
gpart add  -t freebsd-zfs da0..da1                         7.5 GB rest

Most of these arguments are unnecessary. gpart generally already knows
where to put a partition (computers apparently are quite good at
adding 2 numbers together), so specifying offsets just isn't
necessary. This boils down to:

gpart add -s 64K -t freebsd-boot $dev
gpart add -s 1G -t freebsd-swap -l swapN $dev
gpart add -t freebsd-zfs $dev

Cheers

Tom


More information about the freebsd-stable mailing list