How do I remove the rescue kernel?

Hi,

How do I remove the rescue kernel on Rocky Linux 8.x and 9.x ? I’m currently setting up a multi-boot test environment, and the rescue entries keep getting in the way.

The question seems to have been answered here:

Unfortunately the answer is behind Red Hat’s paywall. On a side note, is there some way to access this kind of information without having to jump through burning loops ?

Cheers,

Niki

The rescue kernel is created by package dracut-config-rescue so omitting that package would prevent the entry (and its large initramfs) from returning.


Short-term, to just take the kernel out for now:

rm /boot/*rescue* /boot/loader/*rescue*
2 Likes

I think the means is buried in “man dracut.conf”. I just delete the rescue kernel and initramfs and then to keep it from being recreated I added this file in /etc/dracut.conf.d/
02-rescue.conf
with the contents:

dracut_rescue_image="no"

Then update the grub menu

grub2-mkconfig -o /boot/grub2/grub.cfg
1 Like