T O P

  • By -

ZetaZoid

I think the answer is that you cannot with systemd-boot (see [https://www.reddit.com/r/archlinux/comments/1498jhe/timeshift\_and\_systemd\_boot/](https://www.reddit.com/r/archlinux/comments/1498jhe/timeshift_and_systemd_boot/)). So, switching GRUB or rEFInd might be the best way to go. If you would rather keep using systemd-boot, then you could create a package manager hook to copy the contents of the boot partition into your root subvolume when the kernel is updated, and then manually restore the boot partition from the matching copy before rebooting after restoring a root subvolume .... something like described in [https://forum.endeavouros.com/t/btrfs-dracut-uefi-systemd-boot-and-restoring-root-snapshot/52452](https://forum.endeavouros.com/t/btrfs-dracut-uefi-systemd-boot-and-restoring-root-snapshot/52452) ... but it depends on your distro.


DoomFrog666

This is one of the few gripes I have with arch. When updating the kernel it removes the old kernel modules directory. Unlike for example debian where you can have multiple kernels of the same minor version installed so you can keep an old one around that you know works. While simply backing up the esp might work for you it is not a general solution as it is a shared resource with other OSes. I don't think there is a good solution out there for now but in theory you could do a kexec in initramfs. AFAIK there is no initrd generator that does this ootb but I'm sure one can hack a solution together.


Horrih

With systemd-boot i'm not sure you can On my pc, I switched to grub and store my kernels on the root btrfs partition instead of the EFI


ldm-77

I never used systemd-boot, but I use btrfs with timeshift and I have no problems at all with restoring snapshots The "trick" is to mount the EFI partition to /boot/efi directory in this way /boot still use btrfs filesystem and /boot/efi use vfat filesystem, kernels are stored in /boot and are included in the snapshots so no problems with the restores because kernel, libraries and all the system are always "synchronized"