Can't boot GPT hard disks

For awhile now I have been using a USB stick to boot my system (root on ZFS). Now that I am running 8.0-rc1 I'd like to boot from my hard disks.

I have two mirrored 500GB drives set-up with GPT.
Code:
=>       34  976773101  ad1  GPT  (466G)
         34        128    1  freebsd-boot  (64K)
        162  976772973    2  freebsd-zfs  (466G)

=>       34  976773101  ad10  GPT  (466G)
         34        128     1  freebsd-boot  (64K)
        162  976772973     2  freebsd-zfs  (466G)

When I run
Code:
gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 ad1
or
Code:
gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 ad10
I am told the bootcode has been installed, but when I try to boot to either of them the computer's BIOS tells me that there is no OS. So it doesn't look like the bootloader is installed.

Any ideas?
 
Am I missing something here?
I have standard BIOS and used GPT for long time, still use it...
trick is to set it bootable

with gpart you do this like this:
Code:
gpart create -s gpt [red]da0[/red]
gpart add -v 34 -s 128 -i 1 -t freebsd-boot [red]da0[/red]
gpart add -v 162 -s [red]2000[/red] -i 2 -t freebsd-ufs [red]da0[/red]
gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 [red]da0[/red]

and no problem
-s 2000 <--- i just improvised, use size you need
make sure that on 2 gpt partition you have at least /boot
gpt partition 1 can't be used, it's used already (we wrote bootcode to it)

replace da0 with appropriate device

P.S. I had no success booting straight from zfs on flash ;)
Will have to try one day later
 
you don't need an EFI capable motherboard..

FYI on 8RC1 -s switch to gpart works with GB suffix, like (if I remember correctly):
Code:
gpart add -s 2GB -t freebsd-ufs ad0
 
argatoga said:
I am told the bootcode has been installed

Has been installed or already installed? E.g. it might be telling you that theres already a bootcode so it didnt do anything ..

Or maybe the files got corrupted or something? You could try to install the bootcode from the 8RC1 install cd (fixit shell) instead.. all you need is there.
 
If you're using ZFS on GPT, use the gptzfsboot partition code instead of gptboot.

Code:
gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ad1
gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ad10

If you don't have gptzfsboot in your /boot directory, you can install it from the Fixit console of the 8.0RC1 CD or USB key.

Code:
Fixit # /dist/sbin/gpart bootcode -b /dist/boot/pmbr -p /dist/boot/gptzfsboot -i 1 ad1
Fixit # /dist/sbin/gpart bootcode -b /dist/boot/pmbr -p /dist/boot/gptzfsboot -i 1 ad10

I've been working on setting up a server with a ZFS mirror on GPT, and found this wiki page to be very useful: http://wiki.freebsd.org/RootOnZFS/GPTZFSBoot/Mirror
 
Back
Top