I recently ran into a situation where I had broken all my regular initramfs images. So for the first time since I installed this system (around Fedora 39 iirc), I booted into the “rescue” image that is installed when you first install Fedora.
While it did manage to get my root fs mounted, it was nevertheless pretty broken because by this time, the Kernel that the rescue image was built with had long been uninstalled from the root fs, so /lib/modules/$(uname -r) was gone and I was missing basic kernel modules like vfat that I needed in order to fix things.
Therefore I’d like to discuss how useful this rescue image thing is. I don’t think it provides value in its current form because it’s guaranteed to break after just a handful of kernel updates, and you only realize it’s broken once you need it, and at that point you’re probably not in the position to fix it.
A Live USB environment is often a better choice when fixing problems. I keep a Ventoy USB with refreshed installer images.
Rescue images can be helpful if you have to change hardware like a video or wifi card, but if the change is planned you can make sure the rescue kernel is current before changing hardware. There are people who are constantly swapping components to see which ones work or to recycle components from dead PC’s so spend a lot of time in rescue kernels. I generally remove rescue images and turn off generating new ones once a new Fedora release settles down, but with the current rate of bug changes that could be a long time coming.
To ensure that the rescue image is up-to-date I use a script triggered by a systemd timer. In case the running kernel version is newer than the kernel embedded in the current rescue image then it triggers the rebuild.
What “rescue” kernel brings to my mind is being able to go back to something that supposedly will work because it worked in the past. Call that “Last Known Good” PTSD.
In that sense, when I am on kernel N and I am installing kernel N + 1, I already have the option of booting into N again after finding out that N + 1 has a problem … provided the problem becomes apparent before burning through too many kernel versions.
Assuming the default 3 kernel versions, that line of reasoning would make the “rescue” kernel somewhat redundant. If you regenerate the rescue kernel when kernel N - 1 is about to be rotated out of existence, how is that different from keeping 4 kernel versions?
If the “rescue” kernel is to be taken as “what Anaconda originally installed”, it is indeed at risk of becoming obsolete after a few “dnf system-upgrade” cycles. Maybe the answer here is to update the rescue kernel on system upgrade.
During system upgrade a just updated kernel is still not known to work for the installed system. Therefore the above described systemd timer updates the rescue images after next reboot. But depending on the system config/use cases bootable might not be enough to classify the new kernel as Last Known Good.
IMO the Last Known Good pattern is already covered by the established preservation of last kernel versions (incl. their boot images). To rescue a broken OS setup booting a Fedora Live instance is usually better suited than booting a rescue image with dependencies on broken system facilities (rescue image config may not cover all specifics of target system). The demand for rescue image(s) as default part of a Fedora installation is IMO questionable.
However a feature (re)create a rescue image for current kernel has still its use: I use bootable USB drives for system backup. A rescue image boots on more HW configs than the vanilla kernel images.
The rescue initramfs contains a wider range of drivers than the initramfs for your N installed kernels. (If you sudo ls -Al /boot you’ll probably see that the rescue initramfs is a much bigger file than the other initramfs.)
You will also find a two-command process for easily re-generating them in that section.
Supposedly, rescue kernels will be rebuilt automagically if one installs the dracut-config-rescue package. I haven’t found that to be the case, but maybe you’ll have better luck.