Friday, 13 August 2010

LVM VolGroup00 not found (CENTOS)

UPDATE: I've had a similar problem on Ubuntu recently, look here if you are trying to fix a "udevadm trigger is not permitted while udev is unconfigured" error.


Had to fix this on a server at work. Scenario was that I used Clonezilla to convert a server to an image and then created a virtual server from that image. Because the hard disk drivers had changed the virtual system failed to boot with the above error followed by the dreaded "Kernel Panic". The solution requires us to rebuild our initrd image to suit the new disk architecture.

To start we need to boot from the Centos CD/DVD and into "Rescue system" mode. Follow the prompts until you end up at a shell prompt.

Now, chroot to your system boot;

chroot /mnt/sysimage

Change to your boot directory;

cd /boot

We need to take note of the kernel version that we will be making an image for, it will usually be the latest version. In my case it was 2.6.18-53.el5PAE We will be using this info later. Just do an ls of the directory to see all the installed images.

Once you have identified the correct initrd image, we probably should back it up.

mv initrd-2.6.18-53.el5PAE.img initrd-2.6.18-53.el5PAE.img.backup

Now, we can build a new initrd;

mkinitrd /boot/initrd-2.6.18-92.el5.img 2.6.18-53.el5PAE

Once the image has been built we should rebuild grub just in case.

grub-install /dev/sda

If your drive is on /dev/hda or something else entirely then substitute the correct value in the command above.

Remove the disc from the drive and exit.


And with that your system should boot up happily!