Mountains

Mountains

Wednesday, January 10, 2024

Ubuntu 22.04 LTS Starts In Emergency Mode: no network drives, snapd apparmor failure, and can't mount /boot

 I sort of love Ubuntu ZFS on root and sort of don't. A main gripe have been almost completely missing documentation. The entire knowledge base is centered around Didrocks blog.

Yesterday, I started my computer from a cold start, logged in, realized I meant to turn on virtualization in the bios to use virtual box, restarted within maybe 60 seconds or less of logging in, tweaked the bios, and restarted again. Instead of a clean boot, the system started into emergency mode. I guessed that something about virtualization extentions was causing problems, and restarted, set the bios back, and restarted again, but the system still would only get into emergency mode.

journalctl -xd errors noted

(1) Snapd.apparmor errors for firefox

(2) Couldn't mount network samba shares

(3) Couldn't mount /boot

(4) bpool was missing from zfs list  

Disabling app-armor in grub did not resolve the issue (some people have had corrupted app-armor installs). Apparmor failure maybe were a symptom?

Disabling network shares did not resolve. This was a symptom of the network stack not working.

I kept focusing on fstab. I tried mounting the vfat partition labeled /boot on my ssd. This did not work. But I recalled that zsys does some kind of rotation with bpool and /boot.

Maybe something was keeping zsys from mounting boot? Did it "forget"?

I am still not sure how to guess how to mount the correct bpool to /boot.

I found this reddit discussion where someone converted a /dev/ to a uuid fstab:

https://www.reddit.com/r/zfs/comments/n26j2f/has_anyone_been_able_to_convert_ubuntus_zsys/

 Based on that, after entering emergency mode and finding that 

mount -a

could not mount boot from fstab, and that bpool was not in

zfs list

zpool list

I ran

zpool import -d /dev/disk/by-id bpool

Which correctly mounted bpool to /boot. I then exited emergency mode and the computer started normally.

I have no idea what happened...


No comments:

Post a Comment

Leave a message after the tone...