How to ensure that old kernel does not get removed
- Date: Sat, 5 Jan 2019 03:41:05 +0100
- From: "hdv@gmail" <hdv.jadev@xxxxxxxxx>
- Subject: How to ensure that old kernel does not get removed
After a recent upgrade I noticed that my system could not reboot into the new
4.19 kernel. So I rebooted into the kernel before that (4.18.0-3), which did not
work either. Booting into the version before that (4.18.-02) did work just fine.
It seems I hadn't rebooted after the previous upgrade, causing me to have 2
versions that do not work for my system without noticing. (I do not regularly
After rebooting the failing kernels show a lot of errors about not being able to
find processor IDs and after that they stop with the message that they can't
find the encrypted device containing / (actually everything apart from /boot).
Sorry, I haven't captured the exact error messages, so I can't show the full
text of them.
So how do I make sure that 4.18.0-2 does not get removed from the boot menu
after the next kernel upgrade? I'd like to keep it until I have verified that an
upgrade does work. However, as far as I can tell only the last 3 kernels are
kept. Thus now I run the risk of having the only working version removed before
I am sure that a new version will work.
A perusal of the Grub2 documentation did not give me a pointer on how to do
this. Nor did I find a setting for this in /etc/default/grub or /etc/grub.d/. As
a matter of fact I am not even sure grub is the proper place for this. Grub only
builds a boot menu, but it does not remove kernels (as far as I am aware).
Any pointers in the right direction will be appreciated!