How to solve kernel panic error : Kernel panic – not syncing: VFS: Unable to mount root fs on unknown-block(0,0)?

Today lets see a common error of OS corruption that i faced recently on a production server.

You get below error and not able to boot the system.

My system is RHEL 6.10.

I. Error Message

Monitor is in graphics mode or an unsupported text mode.
RAMDISK: incomplete write (8660 != 32768)
write error
tsc: Refined TSC clocksource calibration: 2599.999 MHz
Switched to clocksource tsc
VFS: Cannot open root device "mapper/rootvg-rootlv" or unknown-block(0,0): error
 -6
Please append a correct "root=" boot option; here are the available partitions:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
CPU: 4 PID: 1 Comm: swapper/0 Not tainted 3.10.0-514.rt56.228.el6rt.x86_64 #1
Hardware name: HP ProLiant DL385 G7, BIOS A18 03/14/2018
 ffff88042c86d000 ffff88022e07bdd8 ffffffff8162dbe6 ffff88022e07be58
 ffffffff8162d92a ffff880200000010 ffff88022e07be68 ffff88022e07be08
 ffff88022e07be68 ffff88022e07be18 ffff88022e07be78 0000000000000000
Call Trace:
 [] dump_stack+0x19/0x1b
 [] panic+0xca/0x1e4
 [] mount_block_root+0x207/0x2bc
 [] mount_root+0x56/0x5a
 [] prepare_namespace+0x170/0x19d
 [] kernel_init_freeable+0x168/0x172
 [] ? rest_init+0x90/0x90
 [] kernel_init+0xe/0xf0
 [] ret_from_fork+0x58/0x90
 [] ? rest_init+0x90/0x90

 

II. Solution

So the error message is straight forward if you have observed it.

It says: “RAMDISK: incomplete write (8660 != 32768)”

Which means the initial ram disk is not complete and it got corrupted.

Lets see the steps to recover this server.

1. Boot the system with an ISO image.

2. Once booted, mount the root filesystem on a partition say /mnt2.
# mkdir /mnt2                 ### Create new mount point
# mount /dev/sda1 /mnt2       ### Mount root filesystem
# mount /dev/sda2 /mnt2/boot  ### In case thats different partition
# chroot /mnt2                ### Change root to old 
# dracut -f                   ### Create new initial ram disk 

Hence now we have the new initrd image gets created and we can boot the server now.

And now the issue is resolved in my case.

In case not, then you need to follow the new error message and run the corrective action.

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments