Amazon EC2 instance won't boot: Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
I created a new instance by going to Images > AMIs > Private Images > Selecting the image the instance was started from > Launch. I launched in exactly the same availability zone, not just US or region, but the 2a, 2b, 2c must match as well. I stopped the new instance. I disconnected the EBS volume from the old instance. I re-attached the EBS volume to the new instance at /dev/sdf
. I started the new instance. The EBS volume shows up inside the instance as /dev/xvdj
so I mounted it with mkdir /xvdj; mount /dev/xvdj /xvdj
. I edited /xvdj/boot/grub/grub.conf
and changed default=0
to default=1
. I saved the file, stopped the new instance, re-attached the EBS volume to the old instance and it started. I ran yum update
in the old instance and double-checked /boot/grub/grub.conf
and double-checked that it would reboot.
I also found this regarding updates to CentOS kernel: grub.conf missing initrd path after kernel update
I noticed after I ran yum update
I now had 2 entries in grub.conf
without initrd
. Running # yum reinstall kernel.x86_64
works to fix that.