Aligning MBR for ZFS boot help

J David j.david.lists at gmail.com
Sun Mar 10 06:12:24 UTC 2013


On Sun, Mar 10, 2013 at 12:12 AM, Cody Ritts <cr at caltel.com> wrote:

> I have a new intel atom appliance that will not boot from a GPT partition
> table.  It came with an SSD, so I am trying to align it to 1MB for the
> erase block size.
>

I looked and looked and I don't see where you're creating a GPT partition
table or indeed doing anything with GPT.  You create an MBR table here:


> gpart create -s mbr ada0
>>
>
And seem to stick with it through the rest of your example.

If you adjust this to:

gpart create -s gpt ada0

You may get better results, because MBR is indeed going to saddle you with
cylinder boundaries using some inscrutable probably-fictional geometry.

I think you'd want something like

gpart add -t freebsd-boot -b 34 -s 128 ada0
gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada0
gpart add -b 2048 -s 51G -l zroot -t freebsd-zfs ada0
gpart add -s 8G -t freebsd-swap ada0

But that might need some tweaking.  Your zpool will then use the "zroot"
partition / ada0p2.

Hope that is helpful.


More information about the freebsd-fs mailing list