RAMDISK corruption causes new RHEL or CentOs to fail in Vmware Vsphere

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)
write error
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: 

  1. Boot the virtual machine with the ISO image from which CentOS or RHEL guest is installed.
  2. Select Rescue Installed System
  3. Select a language and key board type for this rescue, and select Local CD/DVD as the rescue method.
  4. Select No as the networking option, and select Continue as the resume option to mount the actual root file system in read/write mode.
  5. Mount the root file system that needs rescue to the location /mnt/sysimage and start a shell. 
  6. Change the root file system to actual root file system by running the command
    # chroot /mnt/sysimage
  7. 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
  8. To create a new initramfs image, run the command
    # /sbin/dracut -f /boot/initramfs-`uname -r`.img `uname -r`
  9. To reboot the system and verify that the guest boots successfully from RAMDISK image file, run the command
    # reboot

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>