ZFSBootMenu not booting to kernel

Hello,

I’m a ZFS beginner. I installed my Ubuntu 24.04 desktop using the ZFSBootMenu instructions at Ubuntu (UEFI) — ZFSBootMenu 3.0.1 documentation with encryption. I used the prebuild EFI executable and installed it directly with efibootmgr. One quirk was that I had to place zbm at boot/bootx64.efi or I got nowhere. Aside from that, everything was fine with Linux.

When I rebooted most recently, the boot process did not complete. I was able to enter the encryption password and got these log messages:

Tearing down USB controller 0000:02:00.0...
Tearing down USB controller 0000:2d:00.3...

Booting /boot/vmlinuz-6.8.0-85-generic for zroot/ROOT/ubuntu ...

But nothing happened after that, despite leaving it for an hour or more. There is an older kernel 6.8.0-83-generic which also does not work.

Separately to that, I entered the ZBM menu and was able to use the chroot of my system successfully. Inside the chroot I mounted /boot/efi to check it looked ok. After doing that and exiting the chroot I got the message

No boot environments with kernels found
Dropping to an emergency shell to allow recovery attempts

And it drops to the emergency shell. If I don’t mount /boot/efi it exits the chroot happily. I’m guessing that’s a quirk of what the chroot is doing, but wanted to include it anyway.

I suspect the root cause of the problem is related to installing refind (for dual booting Windows on a separate disk) but not configuring it immediately, then forgetting about it, combined with using sleep the majority of the time rather than shutdown. If you’d like to point out the wisdom of taking snapshots before important changes, right here is probably the best time to do that.

I subsequently followed the ZBM instructions for getting refind working, but with no luck. I got the pretty refind menu and could choose Windows or vmlinuz-backup.efi (no bootx64.efi). Windows worked, vmlinuz-backup.efi gave the same results as with direct zbm. I’ve now uninstalled refind to remove that confounding factor.

Is there any way to debug what is happening? I’ve tried removing the quiet kernel boot option and setting log level to 7, to no effect.

Cheers,

Roger

A few troubleshooting items from my own attempts.

  1. Secureboot, turn it off, usually makes ZBM work flawlessly from the default install instructions. (@Halfwalker has a git repo that uses sbctl to enable it with Secureboot, but I haven’t been able to replicate to my preferred level of understanding)
  2. Current versions of 24.04 (on my system) semi-regularly boots to a black screen. If I wait long enough for the login screen to load, I can blindly type my password. It may be because I have two displays hanging off of DisplayPort… :man_shrugging: Other internet suggestions involved removing “quiet splash” from the boot variables.
  3. I was able to get refind and efibootmgr to work, and after repeated installs finally understood efibootmgr enough to prefer it.
  4. I did do a separate /boot/EFI partition which was fat32 to hold the ZBM files. They ultimately ended up in /boot/efi/EFI/zbm.

I’m not sure that addresses the issue you’re having, but hopefully it helps some.

If you want to mess with the install script, the repo lives at

It’s pretty simple to test in a VM - I do all my testing in Virtualbox and straight kvm

@searingdarkness That black screen on boot definitely sounds like a link issue. I tested installing the Displaylink drivers during setup in the livecd, but it was inconsistent. See here

I haven’t revisited that, but maybe things are better these days ?

1 Like

Aha! This put me on the right track. I hadn’t even considered the possibility that the system might have booted without a display. It was - so I’ve ssh’d in and rerun ubuntu-drivers install and after a while it was all ok. So the zfs/refind change was almost certainly a red herring.

Thanks for the help :slight_smile:

Roger

1 Like