Cannot boot from ZFS after freebsd-update

Hi everyone,

I've been using FreeBSD for pushing 20 years and am pretty competent but far from an expert... I've always managed to find the solutions to problems before by browsing the forums etc. and not having to bother people by posting, but I am stumped this time! Situation is as follows:

Server is running 12.0-R, and I realised when trying to update ports-mgmt/pkg that the system was due an upgrade to 12.1-R. It boots from 2 mirrored 120GB SSDs which hold a zpool called zroot (most user data is stored on a separate zpool elsewhere). I'm using a custom kernel, and I had the previous working kernel in /boot/kernel.old.

I ran freebsd-update fetch and freebsd-update install as a first step (possibly the wrong thing to do? Now moot anyway...), followed by freebsd-version and uname -r which confirmed that as there had been some kernel patches as a result, a reboot would be necessary. I assumed that I would then be able to carry on with updating to 12.1-R, and that my kernel.old could be used if something went wrong when rebooting.

However, booting the machine now takes me to a mountroot> prompt, with the following error message appearing beforehand:
Mounting from zfs:zroot failed with error 2: unknown file system.

I can boot from USB with a memstick image, import/export and mount the zpool, view and edit files, etc. My loader.conf is as follows:
Code:
zfs_load="YES"
vfs.root.mountfrom="zfs:zroot"
kern.geom.label.disk_ident.enable=0

I have tried renaming kernel.old to kernel, but this makes no difference; it still gets only as far as mountroot> and the error 2 message. It seems as though the system is now completely unable to cope with booting from ZFS.

What am I missing here? Many thanks in advance!
 
I see the config of my own machines and there is no vfs.root.mountfrom in loader.conf. Why did you set this? Because you have another pool?

Verify that: zpool get bootfs zroot returns zroot/ROOT/default (it may be different if you changed the default boot environment).
 
I see the config of my own machines and there is no vfs.root.mountfrom in loader.conf. Why did you set this? Because you have another pool?

Verify that: zpool get bootfs zroot returns zroot/ROOT/default (it may be different if you changed the default boot environment).

I don't think I set vfs.root.mountfrom - I believe the system has done this at some point. There is another pool, yes. Commenting out the line makes no difference, however.

zpool get bootfs zroot returns
Code:
NAME   PROPERTY  VALUE   SOURCE
zroot  bootfs    zroot   local
 
In case it helps: when I type ? at the mountroot> prompt, I get the following list of devices:
Code:
List of GEOM managed disk devices:
  gptid/45b44019-6ebc-11e6-a64e-fcaa14b44a1d gptid/42d922f1-6ebc-11e6-a64e-fcaa14b44a1d diskid/DISK-S21TNXAH204551Np3 diskid/DISK-S21TNXAH204551Np2 diskid/DISK-S21TNXAH204551Np1 diskid/DISK-S21UNXAGB07717Rp3 diskid/DISK-S21UNXAGB07717Rp2 diskid/DISK-S21UNXAGB07717Rp1 diskid/DISK-S21TNXAH204551N diskid/DISK-S21UNXAGB07717R gpt/root1 gptid/2a6fda8e-6ebc-11e6-a64e-fcaa14b44a1d gptswap1 gptid/4b6acf45-6ebb-11e6-a64e-fcaa14b44a1d diskid/DISK-66D1KODSF58D diskid/DISK-66D1KODRF58D diskid/DISK-66DEKRTTF58D ada1p3 ada1p2 ada1p1 ada4 ada3 gpt/root0 gptid/27a88809-6ebc-11e6-a64e-fcaa14b44a1d gpt/swap0 gptid/49ac74a4-6ebb-11e6-a64e-fcaa14b44a1d msdosfs/EFISYS ada2 ada1 ada0p3 ada0p2 ada0p1 ada0

I have established from glabel status which device is which. However, trying zfs:gpt/root0, gptid/42d922f1-6ebc-11e6-a64e-fcaa14b44a1d etc. do not work. My fstab does not include any entries for ZFS (and I don't think it ever has).
 
What is the output of: zfs list?
Is your default root mountpoint zroot/ROOT/default? If yes, try to modify boofs accordingly.

Note: on a test 12.1-RELEASE (standard installation), if I set bootfs to zroot (instead of zroot/ROOT/default), the system does not boot anymore, but the message at startup is different than yours (it leads to the command prompt: OK _).
 
Back
Top