Failed to boot when restoring a Btrfs snapshot with systemd-boot

Hello everyone.
Thanks in advance to those who will take the time to answer me.
A few days ago I decided to make the switch from GRUB to systemd-boot, with the aim of simplifying and speeding up the boot a bit.
I followed this guide and it worked perfectly:
The problem occurs when I decide to restore a snapshot of a few days ago, with Timeshift [1], where it always worked when I had installed GRUB, on reboot I have a failure on boot, solved by restoring the previous snapshot from live again .
I found that with systemd-boot the boot configurations and kernel images are on the efi partition at mount “/efi”, so obviously excluded from snapshots (and I suspect this is the cause).

Log link:

[1] While installing Fedora, I rename the subvolumes “root” to “@” and “home” to “@home” to make Timeshift work, I add additional subvolumes of:

How old is the snapshot you restored and are you keeping multiple versions of the kernel?

If you are keeping multiple versions of the kernel, try to boot into one of the older kernels instead of the latest.

It is possible that the modules associated with the latest kernel aren’t in the snapshot you restored.

If you don’t have old kernel versions or that doesn’t work, you will probably need to chroot into your install and run kernel-install for whatever the kernel version that was installed on the snapshot is.

As a side note, keeping multiple kernel versions is important if you use systemd-boot and want to be able to restore snapshots. :nerd_face:

1 Like

Not very old: August 19th

But isn’t there some configuration to be done on systemd-boot to fix this? :slightly_frowning_face:

Did you try booting an older kernel?

If you mean permanently, then the easiest solution is to keep older kernels around which Fedora does by default.

Realistically speaking, if you have 3-4 versions of the kernel you probably wouldn’t want to boot into a snapshot older than that.

Alternatively, you could chroot into the system after restoring the snapshot and run kernel-install

Yes, with an older kernel I can boot it.
But keeping more kernels doesn’t fill the “efi” partition?
they are generally small, about 500mb
Can I move the kernel images out of “/ efi” or does systemd-boot need to have them there?
Is the solution to go back to GRUB?

1 Like

You can hold quite a few kernels in a reasonably sized efi partition. A kernel + initrd is a little over 50MB right now.

They don’t have to be. Mine is 1.5GB.

systemd-boot requires the kernels to be in the EFI partition or an XBOOTLDR partition. However, the XBOOTLDR partition has to be readable by the UEFI which is not likely to have support for btrfs.

You can if you wish to but if it was me, I would just keep a few kernels around.

1 Like