Aligning MBR for ZFS boot help

Cody Ritts cr at caltel.com
Sun Mar 10 16:35:23 UTC 2013


That is the thing, I am struggling with MBR because the computer just 
completely ignores booting from the default GPT.  I spent about 2 hours 
learning that the hard way the other day.  Who would have thought a 
brand new machine would not boot from a GPT disk?  I will be testing if 
it is just FreeBSDs GPT or others as well.

Thanks,

Cody

On 3/9/13 10:12 PM, J David wrote:
>
> On Sun, Mar 10, 2013 at 12:12 AM, Cody Ritts <cr at caltel.com
> <mailto: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