Rebuilding the initial ramdisk
The initial ramdisk, also known as initrd or initramfs, contains a small filesystem that is used as part of the first stage of the Linux boot process. This filesystem must contain all the necessary files and kernel modules that the kernel needs in order to continue on the boot process. When upgrading a kernel or changing a system's hardware, it may be necessary to rebuild the initrd file so that it contains the appropriate kernel modules.
Rebuilding the initial ramdisk
On Red Hat Enterprise Linux 6, 7, 8, 9 or its derivatives, the initrd file resides in the /boot directory and is generated by the dracut
utility.
You can re-generate the initrd file for a specific kernel version by running:
# KernelVersion="4.18.0-348.23.1.el8_5.x86_64"
# dracut -f /boot/initramfs-$KernelVersion.img $KernelVersion
See Also
- How to rebuild the initial ramdisk image in Red Hat Enterprise Linux - https://access.redhat.com/solutions/1958