After my last launch yum update my test box have kernel-3.10.0-327.13.1 installed. While installing, dracut generated initramfs-3.10.0-327.13.1.el7.x86_64.img, but initramfs-0-rescue-7da0bd6ff130413b99bf0b6a1bde637e.img left old with kernel-3.10.0-327. How to generate new rescue initramfs image with new kernel and new kernel modules like zfs installed?
Asked
Active
Viewed 1.1k times
3
Dmitry Sukhodoyev
- 130
- 2
- 2
- 9
1 Answers
6
It looks like the rescue kernel and image are created by /etc/kernel/postinst.d/51-dracut-rescue-postinst.sh when a kernel is installed for the first time. This script checks for the presence of the rescue kernel and image and doesn't create new ones when additional kernels are installed.
To regenerate them, you'll need to move the existing ones out of the way:
mv /boot/vmlinuz-0-rescue-$(cat /etc/machine-id){,.backup}
mv /boot/initramfs-0-rescue-$(cat /etc/machine-id).img{,.backup}
Then you can then run the script like:
/etc/kernel/postinst.d/51-dracut-rescue-postinst.sh $(uname -r) /boot/vmlinuz-$(uname -r)
Luke Dixon
- 256
- 2
- 4
-
1nice answer, another way: `$ sudo rm /boot/*rescue*` `$ sudo dnf reinstall kernel-core` – Superbiji May 28 '20 at 15:34