Can't load kernel after 8.0 -> 8.1 upgrade

Hi folks,

After upgrading from 8.0 to 8.1 using freebsd-update I get "Can't load kernel" at boot. Some searching turns up this thread where someone had the same issue:

http://forums.freebsd.org/showthread.php?t=8958

The only difference is that I followed the mirrored root on ZFS guide:

http://wiki.freebsd.org/RootOnZFS/GPTZFSBoot/Mirror

The first link suggests to re-run the following from a fixit shell:

Code:
 Fixit# echo 'LOADER_ZFS_SUPPORT=YES' > /etc/src.conf
 Fixit# mount -t devfs devfs /dev
 Fixit# export DESTDIR=""
 Fixit# cd /usr/src/sys/boot/
 Fixit# make obj
 Fixit# make depend
 Fixit# make
 Fixit# cd i386/loader
 Fixit# make install

The problem is that I think I need to have my original /boot filesystem loaded to do this, right? gpart list shows:

Code:
ad4p1 - freebsd-boot
ad4p2 - freebsd-swap
ad4p3 - freebsd-zfs
ad6p1 - freebsd-boot
ad6p2 - freebsd-swap
ad6p3 - freebsd-zfs

How can I get ad4p1 and ad6p1 mounted properly so that I can rebuild the bootloader?

Thanks.
 
You have two of each: boot, swap, zfs.
Maybe dual booting FreeBSD with FreeBSD so that each setup is separated would help.
This is only a suggestion, ok?
 
For posterity, I was able to fix this by re-installing the pmbr and bootloader:

Code:
Fixit# gpart bootcode -b /mnt2/boot/pmbr -p /mnt2/boot/gptzfsboot -i 1 ad4p1
Fixit# gpart bootcode -b /mnt2/boot/pmbr -p /mnt2/boot/gptzfsboot -i 1 ad6p1

If this doesn't work for some people you can still mount/recover your ZFS root partition from withing a fixit shell with:

Code:
Fixit# mkdir /recover
Fixit# zpool import -f zroot -o altroot=/recover
 
Back
Top