Kernel panic - not syncing - Unable to mount root fs on unknown-block(0,0)

Follow

In cases where a Kernel upgrade fails, and a boot fails with the error below, you should be able to boot into an alternate kernel, and then fix the issue within the Operating System.

Kernel panic - not syncing - Unable to mount root fs on unknown-block(0,0) 

Once you're able to get the server stable, on an older kernel, you can check over the /boot/grub/grub.conf, and in some cases you may find that the initrd is missing such as the example below.

# cat /boot/grub/grub.conf
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu

title CloudLinux Server (2.6.32-604.16.2.lve1.3.54.el6.x86_64)
root (hd0,0)
kernel /vmlinuz-2.6.32-604.16.2.lve1.3.54.el6.x86_64 ro root=/dev/mapper/vg-SystemRoot rd_NO_LUKS KEYBOARDTYPE=pc KEYTABLE=us rd_MD_UUID=9c11eedd:9af60537:9c11eedd:9c11eedd rd_LVM_LV=vg/SystemRoot SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_LVM_LV=vg/SystemSwap rd_NO_DM LANG=en_US.UTF-8 rhgb quiet

title CentOS (2.6.32-573.3.1.el6.x86_64)
root (hd0,0)
kernel /vmlinuz-2.6.32-573.3.1.el6.x86_64 ro root=/dev/mapper/vg-SystemRoot rd_NO_LUKS KEYBOARDTYPE=pc KEYTABLE=us rd_MD_UUID=9c11eedd:9af60537:9c11eedd:9c11eedd rd_LVM_LV=vg/SystemRoot SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_LVM_LV=vg/SystemSwap rd_NO_DM LANG=en_US.UTF-8 rhgb quiet
initrd /initramfs-2.6.32-573.3.1.el6.x86_64.img

In the example above, you can find that the kernel for 2.6.32-604.16.2.lve1.3.54.el6.x86_64 did not properly generate an initrd entry, and it is set as the default ,which is why the server fails to boot.

To resolve this, generally you can reinstall the kernel to generate it.

Use the below command, to locate the available kernels installed on the system

# rpm -qa kernel
kernel-2.6.32-604.16.2.lve1.3.54.el6.x86_64
kernel-2.6.32-573.3.1.el6.x86_64

You'll see the default kernel is available, now you will need to reinstall it using the below command, and then check to see if /boot/grub/grub.conf has now updated. It is also recommended to continue and possibly failed transactions before reinstalling the kernel.

# yum-complete-transaction
# yum reinstall kernel-2.6.32-604.16.2.lve1.3.54.el6.x86_64

 

Have more questions? Submit a request

Comments

Powered by Zendesk