Linux – AWS EC2 – CentOS 7 Kernel panic – not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

amazon ec2centoslinux

I have an EC2 Instance with CentOS 7,
after rebooting and stop – start, the instance cannot run anymore.

I got this error, what cause this and how to fix it, thank you:

[    1.601892] List of all partitions:

[    1.604458] No filesystem could mount root, tried: 

[    1.608147] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

[    1.609140] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.10.0-514.16.1.el7.x86_64 #1

[    1.609140] Hardware name: Xen HVM domU, BIOS 4.2.amazon 02/16/2017

===== More complete log

[    0.802498] registered taskstats version 1

[    0.805672] Key type trusted registered

[    0.808549] Key type encrypted registered

[    0.811468] IMA: No TPM chip found, activating TPM-bypass!

[    0.815226] xenbus_probe_frontend: Device with no driver: device/vbd/768

[    0.819871] xenbus_probe_frontend: Device with no driver: device/vif/0

[    0.824033] rtc_cmos 00:02: setting system clock to 2017-06-07 08:57:52 UTC (1496825872)

[    1.516119] tsc: Refined TSC clocksource calibration: 2399.999 MHz

[    1.576495] input: ImExPS/2 Generic Explorer Mouse as /devices/platform/i8042/serio1/input/input3

[    1.582622] md: Waiting for all devices to be available before autodetect

[    1.587126] md: If you don't use raid, use raid=noautodetect

[    1.590876] md: Autodetecting RAID arrays.

[    1.593819] md: Scanned 0 and added 0 devices.

[    1.597016] md: autorun ...

[    1.599321] md: ... autorun DONE.

[    1.601892] List of all partitions:

[    1.604458] No filesystem could mount root, tried: 

[    1.608147] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

[    1.609140] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.10.0-514.16.1.el7.x86_64 #1

[    1.609140] Hardware name: Xen HVM domU, BIOS 4.2.amazon 02/16/2017

[    1.609140]  ffffffff818b44d0 00000000dbd248fc ffff88003d66fd60 ffffffff81686ac3

[    1.609140]  ffff88003d66fde0 ffffffff8167feca ffffffff00000010 ffff88003d66fdf0

[    1.609140]  ffff88003d66fd90 00000000dbd248fc 00000000dbd248fc ffff88003d66fe00

[    1.609140] Call Trace:

[    1.609140]  [<ffffffff81686ac3>] dump_stack+0x19/0x1b

[    1.609140]  [<ffffffff8167feca>] panic+0xe3/0x1f2

[    1.609140]  [<ffffffff81b0a5fd>] mount_block_root+0x2a1/0x2b0

[    1.609140]  [<ffffffff81b0a65f>] mount_root+0x53/0x56

[    1.609140]  [<ffffffff81b0a79e>] prepare_namespace+0x13c/0x174

[    1.609140]  [<ffffffff81b0a26b>] kernel_init_freeable+0x1f0/0x217

[    1.609140]  [<ffffffff81b099db>] ? initcall_blacklist+0xb0/0xb0

[    1.609140]  [<ffffffff81674fa0>] ? rest_init+0x80/0x80

[    1.609140]  [<ffffffff81674fae>] kernel_init+0xe/0xf0

[    1.609140]  [<ffffffff816970d8>] ret_from_fork+0x58/0x90

[    1.609140]  [<ffffffff81674fa0>] ? rest_init+0x80/0x80

Best Answer

I'm betting your /etc/fstab doesn't list a root device any longer.