Restoring yesterday's btrfs snapshot on Fedora 44 brought me to emergency mode


Hey guys, today while I wanted to roll back my os to a previous state with btrfs assistant (my config is “/”), I encountered a scary and an unexpected expirience on my main laptop uppon rebooting. I was basically dropped to an emergency mode loop whithout any way to continue or launch the GUI.

System Info

  • OS: Fedora 44 KDE Spin
  • Filesystem: Btrfs on NVMe (/dev/nvme0n1p3)
  • Boot: UEFI with FAT32 partition (/dev/nvme0n1p1)

Basically at first I suspected that I may had restored a broken snapshot cause the date of it was 21 and I hadnt opened my computer yesterday. So I did a check by executing btrfs check --force /dev/nvme0n1p3 and I got found 52143022080 bytes used, no error found. The Btrfs filesystem metadata itself was completely healthy and structurally intact. Afterwards I checked for some errors journalctl -xb | grep -i "Failed to mount" and I got Failed to mount boot-efi.mount - /boot/efi which I started to suspect that an update had changed the partition’s UUID.

After many trial and error I checked blkid /dev/nvme0n1p1 and cat /etc/fstab realizing the total mismatch that happened. Basically the true physical UUID of my EFI boot partition was 2A53-3FFD but /etc/fstab file configuration stated 2A33-3FFD. Even tho I fixed it manually with nano it still would repeatidly refuse to boot.

Solution:
I booted up an older kernel version with grub, and opened konsole and did sudo dracut --regenerate-all --force to regenerate initrms, I updated the new kernel with Discover and I was fine…from now on, my current kernel booted with no problems
Basically this broken cycle kept happening every time I attempted to restore my os with BTRFS Assistant on an older snapshot that was taken before the kernel update

My final question is:
Am I safe now? Is there anything else I need to check?
(NOTE that this is my main laptop for university for everything and I cannot risk it a second time)

You should be fine to continue to run the machine as normal now from what I was able to glean from your post.

As far as I know the issue with BTRFS snapshots is, that /boot is not included on the BTRFS partition and so it is not covered by snapshots functionality. If you installed a newer kernel and try to restore an older snapshot, you will get errors when booting the old snapshot.

You have to use a different partition and subvolume layout to get BTRFS snapshots fully working.

I used this guide to get BTRFS snapshots working:

How to Setup Fedora 44 with Btrfs Snapshot and Rollback Support

There’s a Fedora change request to get this working, but I don’t know where to find the current status on it. I think it’s been open for a long time.

This should help:

Thanks, I’m behind here and hadn’t seen that yet.