Keeping previous version of the kernel

Hi, I recently tried out Fedora and the idea of keeping previous versions of the kernel got my attention. I wanted to have something similar on Arch. My current setup creates Unified Kernel Images on /efi/EFI/Linux using mkinitcpio. So I created bellow pacman hook to copy previous EFI image before kernel update:

[Trigger]
Operation = Upgrade
Type = Package
Target = linux

[Action]
Description = Backing up previous version of the linux kernel...
Depends = linux
When = PreTransaction
Exec = /bin/sh -c "mv /efi/EFI/Linux/archlinux-linux.efi /efi/EFI/Linux/archlinux-linux-pre.efi"
NeedsTargets

My question is, would this cause any problem? Am I missing something? I am asking this because I use nvidia with nvidia-dkms package. Would there be any mismatch if I boot with previous kernel while nvidia-dkms package is ahead of it?

The issue is the kernel modules. If you don’t also keep previous versions of the modules around you probably won’t be able to boot successfully.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.