Updated: 29 September 2026 · Applies to: dracut 057 and later, grubby and GRUB 2 with Boot Loader Specification entries on AlmaLinux and Rocky Linux 9 and 10 and RHEL 9 and 10
AlmaLinux, Rocky Linux and RHEL install a rescue boot entry: a kernel and a large initramfs that contain drivers for almost any hardware, so the system can still boot if a normal initramfs is broken. It is useful, but it takes 100 MB or more in /boot, which can be a problem when /boot is small. This guide shows how to remove it and how to stop it from being created again. Keep at least one working older kernel before you remove the rescue entry.
1. Find the rescue entry
ls -lh /boot/*rescue* grubby --info=ALL | grep -E '^(index|kernel|title)' | grep -B1 -A1 rescue
The files are named vmlinuz-0-rescue-MACHINEID and initramfs-0-rescue-MACHINEID.img, and the boot menu entry is a file named MACHINEID-0-rescue.conf in /boot/loader/entries/.
2. Stop new rescue images from being created
The rescue image is created by the package dracut-config-rescue whenever a kernel is installed and no rescue image exists. Remove the package:
dnf remove dracut-config-rescue
Alternatively keep the package and switch it off with a file /etc/dracut.conf.d/99-no-rescue.conf containing dracut_rescue_image="no".
3. Remove the existing entry and files
grubby --remove-kernel removes only the boot menu entry; delete the two files yourself:
grubby --remove-kernel=/boot/vmlinuz-0-rescue-$(cat /etc/machine-id) rm -f /boot/vmlinuz-0-rescue-$(cat /etc/machine-id) /boot/initramfs-0-rescue-$(cat /etc/machine-id).img
Check that the entry is gone and a normal kernel is the default:
grubby --info=ALL | grep -E '^(kernel|title)' grubby --default-kernel df -h /boot
Bring it back later
Reinstall the package and regenerate the rescue image for the running kernel:
dnf install dracut-config-rescue kernel-install add $(uname -r) /lib/modules/$(uname -r)/vmlinuz
Official documentation: dracut.conf manual and RHEL 9: configuring kernel command-line parameters with grubby.
Ucartz services for this topic
- KVM VPS hosting: NVMe SSD and full root access, with Free Basic Managed Support.
- Unmanaged dedicated servers: full root access and free IPMI KVM, with Free Basic Managed Support.
- Linux server management: hardening, patching, monitoring and automation for Ubuntu, Debian, RHEL and AlmaLinux.
