Saturday 15 January 2022

How to Resolve kernel panic at boot with error initrd image file not found on CentOS 7



Sometime after yum update transaction break or kernel update or fresh install, the system fails to find initrd (initial ram disk) and also due to that unable to mount the root file system and also fail to boot the system with below message on CentOS 7 systems:



This article describes How to Resolve kernel panic at boot with error initrd image file not found on CentOS 7.

Step 1: Booting with Old Kernel: Reset the system and wait for CentOS Linux Kernels countdown than select old kernel by pressing arrow keys. Once the kernel highlighted as shown in below screen shot press Enter to boot with selected different kernel.



Step 2: Check initramfs in Grub Configuration: Run the following command to check initramfs name in the /etc/grub2.cfg



Initramfs file is not available in the that location. Let’s rebuild the initramfs.

Step 3. Rebuild initramfs: Run the following commands to rebuild initramfs. Specify latest kernel version which is mentioned in grub configuration:



Step 4. Check initrd Image: Run the following command and check if initrd image is created or not:



Now the initramfs file is created under /boot and the same initramfs name is configured in grub configuration.

Step 5. Reboot the System: Now initramfs image file is created, Run the following command for normal reboot and this time system might be boot successfully:

[root@linuxcnf ~]# init 6

Possibly the below screen will be shown after login successfully.



Done!!! initfamfs image file created successfully and now root file system able to mount on CentOS 7 system.

No comments:

Post a Comment