no boot after "freebsd-upgrade -r 8.0-RC2"

I have 3 disks: ad10, ad12 (x500G) and ad14 (250G).

On ad14 I have a "standard" FreeBSD-7.2-RELEASE ("7.2" from now on) with MBR, slices and partitions.

A month or so ago, booting from the 8.0-RC1-i386 USB image I installed a ZFS-only FreeBSD-8.0-RC1 system ("8.0" from now on) on ad[10,12] with the following GPT:

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

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

No dedicated swap partitions because I use the swap space of the 7.2 system (ad14s1b).

The 8.0 system runs on a zpool created with:

Code:
zpool create zroot mirror ad10p2 ad12p2

(bootfrom=zroot)


The 8.0 worked fine until yesterday when I decided to upgrade it from RC1 up to RC2 by means of:

Code:
freebsd-update upgrade -r 8.0-RC2

All seemed fine until I rebooted. Now the 8.0 system can't see its root (boot) device and load the kernel.

Since I'm reluctant to force-import the zfs pool into the 7.2 system, because 8.0 uses a higher ZFS version, I downloaded the 8.0-RC2-i386 USB image and booting from a stick I verified that the zroot pool can be imported and has no errors. The zfs is working with no problems. It just won't boot any more.

Now, if I understand the boot process correctly, the BIOS loads the 512 byte pmbr program from the first block of the HDD.

The pmbr program only knows to read the GPT in order to find from where to load and execute the gptzfsboot program.

Then it is the gptzfsboot which shows the "boot prompt" with the options "lsdev, set, ls, load, unload, lsmod, etc." Right? If that's so, then gptzfsboot fails to recognize the p2 partitions and load /boot/kernel/kernel.

So, how should I force it to import the zroot pool and boot from it?
 
Uh, you need loader built using -DLOADER_ZFS_SUPPORT, and it doesn't seem to be the case when using freebsd-update.
 
crsd said:
Uh, you need loader built using -DLOADER_ZFS_SUPPORT, and it doesn't seem to be the case when using freebsd-update.

Yes, I've gone through that step when I installed 8.0-RC1. I hope freebsd-update doesn't touch the boot sectors. And even if it did, doesn't the loader include by default support for ZFS in RC2 already?

BTW. I forgot to tell in the original post, that the boot proces ends up with the prompt. From that prompt "lsdvev" shows all the disks with their corresponding partitions/slices correctly, but "ls" says something like:
Error: cannot open "/"

That's what makes me think the problem is that gptzfsboot can't open the zfs root pool. Perhaps it "sees" the pool as "open by other system", but if that's so, how should I "export" the pool and then make gptzfsboot import it back?
 
dbi said:
Yes, I've gone through that step when I installed 8.0-RC1. I hope freebsd-update doesn't touch the boot sectors.
`loader' isn't actually located in boot sectors.
And even if it did, doesn't the loader include by default support for ZFS in RC2 already?
Don't think so. It's still #ifdef'ed in Makefiles.
BTW. I forgot to tell in the original post, that the boot proces ends up with the prompt. From that prompt "lsdvev" shows all the disks with their corresponding partitions/slices correctly, but "ls" says something like:
Error: cannot open "/"

That's what makes me think the problem is that gptzfsboot can't open the zfs root pool. Perhaps it "sees" the pool as "open by other system", but if that's so, how should I "export" the pool and then make gptzfsboot import it back?

`gptzfsboot' task is to locate and run `loader' (on ZFS, which it does just fine). It's `loader', which can't find / partition on ZFS. Try importing your pool on another system and make/copy over loader built with ZFS support.
 
  • Thanks
Reactions: dbi
[solved]

crsd said:
`loader' isn't actually located in boot sectors.

Don't think so. It's still #ifdef'ed in Makefiles.


`gptzfsboot' task is to locate and run `loader' (on ZFS, which it does just fine). It's `loader', which can't find / partition on ZFS. Try importing your pool on another system and make/copy over loader built with ZFS support.

That's it. Thank you very much. Compiling a zfs-enabled loader and replacing the original one did the trick.
 
Back
Top