Zfsbootmenu - unable to import pool

Hello :slight_smile:

I have run into some issues with zfsbootmenu after reboot. After the UEFI phase zfsbootmenu starts and displays an error “Unable to import pool, retryin in” - and keeps retrying.
I have checked using a rescue disk and the pool is fine.

zreport command show that there are no pools or datasets available.

What might be the issue here and how can i fix it?
Thank you in advance for any help :slight_smile:

It sounds at a guess like perhaps you lost the special “bootfs” zfs property on your pool, which tells ZFSBootMenu which dataset to boot from.

root@elden:/# zpool get bootfs
NAME   PROPERTY  VALUE                         SOURCE
rpool  bootfs    rpool/ROOT/ubuntu.2023.01.15  local

You might also want to check for any zfsbootmenu properties at the dataset level. There should be a command line arguments property for your root dataset:

root@elden:/# zfs get all -r rpool | grep zfsbootmenu | grep -v inherited
rpool/ROOT                                                                       org.zfsbootmenu:commandline  spl_hostid=3c479c74 ro          local

It looks like the bootfs property is fine:

root@ubuntu:~# zpool get bootfs
rpool bootfs rpool/ROOT/ubuntu.2023.03.12 local

root@ubuntu:~# zfs get all -r rpool | grep zfsbootmenu | grep -v inherited
rpool/ROOT org.zfsbootmenu:commandline spl_hostid=0a61d432 ro local

Maybe an ubuntu upgrade broke something with zfsbootmenu and zfs module in the kernel?

Which version of Ubuntu? There’s a breaking ZFS-related bug in the Noble beta right now; a patch was created only yesterday (you can see issues with the 6.8 kernel and Ubuntu Noble in the mailing lists) but it hasn’t been applied in the repos yet.

It was 22.04 installed with the script from zfsbootmenu, and some time later it was upgraded to 22.10 and 23.04. The last upgrade was few days ago.

Have you tried importing the pool from the ZBM rescue shell, to see if you get any interesting error messages (or, for that matter, if it just works when done manually)?

Zfsbootmenu does not recognize any pool :frowning:

OK, can you show the output of the same commands, when you’re booted into a system that does recognize the pool?

The screenshots are from zfsbootmenu shell. Using zfsbootmenu i’m unable to boot the system.
The zpool properties were checked by booting ubuntu live from usb drive and importing my pool.

Right. And I’m asking for the same info from the screenshots, but as seen from the Ubuntu live system that can import the pool.

OK, now check the enabled features on the pool. If you or an upgrade script ran a zpool upgrade recently, and you forgot to create the pool originally with compat=zfs2.1, you may have a bleeding-edge on-disk feature enabled that ZBM doesn’t know how to cope with.

zpool get all | grep feature\@ to list the features on your pool and whether they’re disabled, enabled, or active; I don’t know off the top of my head which features might have popped up recently that aren’t backward-compatible with 2.1, but seems to me that’s pretty much got to be the issue.

The only other thing you might try is creating a portable ZBM boot drive on a handy USB thumbdrive, using the latest version of ZBM, in case it’s just that you’ve got a particularly old version of ZBM on the boot partition on your actual system.

1 Like

The zfsbootmenu recovery USB did the trick. Need to remember that the zfsbootmenu is not upgraded with the rest of the system. Thanks a lot :slight_smile:

You’re welcome! Glad it was a relatively painless fix. Don’t forget that portable boot trick–I’d advise essentially both always having one handy, and always remembering how to update it (which is just doing the curl command again to fetch a fresh copy of BOOTX64.EFI). :slight_smile:

1 Like

Thank’s a lot. The zfsboot-usb trick will come in handy quite often

1 Like