When you power off a virtual machine immediately after you install, upgrade, or uninstall VMware Tools in a Linux environment (RHEL or Cent OS 6), the guest OS might fail during the next reboot due to a corrupted RAMDISK image file. An error similar to the following is reported in the console of the guest OS:
RAMDISK: incomplete write (31522 != 32768)
Kernel panic - not syncing : VFS: Unable to mount root fs on unknown-block(0,0)
Linux guest OS with a corrupted RAMDISK image file is rescued to complete boot state by creating a new initramfs image in Linux rescue mode.
To create a new initramfs image and rescue the RHEL/CentOS 6 guest OS from the corrupted RAMDISK image file, perform the following steps:
- Boot the virtual machine with the ISO image from which CentOS or RHEL guest is installed.
- Select Rescue Installed System.
- Select a language and key board type for this rescue, and select Local CD/DVD as the rescue method.
- Select No as the networking option, and select Continue as the resume option to mount the actual root file system in read/write mode.
- Mount the root file system that needs rescue to the location /mnt/sysimage and start a shell.
- Change the root file system to actual root file system by running the command
# chroot /mnt/sysimage
- To backup the original initramfs image before creating the new initramfs image, run the command
# cp /boot/initramfs-`uname -r`.img /boot/initramfs-`uname -r`.img.ori
- To create a new initramfs image, run the command
# /sbin/dracut -f /boot/initramfs-`uname -r`.img `uname -r`
- To reboot the system and verify that the guest boots successfully from RAMDISK image file, run the command