Eclectic ENFJ, sketcher, bioinformagician.
Gabriele Girelli's avatar

[solved] Ubuntu 22.04 with ZFS root boot stuck at GNU Grub 2.06

My home workstation runs on Ubuntu 22.04 and this week, for the first time, I suspended it instead of turning it off.

Everything worked well when after a few hours I started the machine again but, at the end of the day, I suspended it again instead of performing a normal shutdown.

When I started the computer again a couple of days later (yes, I completely forgot it was still suspended) what I experienced was 30 minutes of panicking 😱 until I solved the issue. And this is a note to self in case it happens again πŸ€¦β€β™‚οΈ

Stuck at GRUB

Basically, when booting the computer I would get stuck at GNU Grub 2.06 with minimal bash commands, instead of being presented with the usual ZFS key prompt.

Unplugging the workstation for 10 min, rebooting it, or changing BIOS boot settings did not help at all…

After searching and searching for a solution and managing once to move on to initframs, I managed to find someone with a similar issue, and solution, encountered in Ubuntu 19.10

Basically, I used ls to find the right HD with the root system, and with the vmlinuz and initrd.img files.

I entered the following:

set root=(hdNNN,gptXXX)
linux /BOOT/ubuntu_YYY/@/vmlinuz root=ZFS=rpool/ROOT/ubuntu_YYY boot=zfs
initrd /BOOT/ubuntu_YYY/@/initrd.img
boot

Where NNN is the hard drive ID number and YYY is the tag for the ubuntu folder.

That prompted me to provide the key to unlock the ZFS volume and allowed me to finally access my Ubuntu installation.

I then updated my grub with a simple

sudo update-grub

And that seemed to solve the issue and the machine started up normally after a full shutdown.

Additionally, there appeared to be packages that were held back during an upgrade, which I fixed by installing one by one with the usual sudo apt install XXX commands after checking what they were (where XXX is the name of each held-back package).

Hope this helps πŸ€—

πŸ“· Cover picture by @lazycreekimages, on Unsplash.com ❀️
Interact with this post on
Categories