Fixing non-bootable CentOS 5 after VMware converter P2V

Did P2V for old CentOS 5.5 i686 install and it failed to boot. Recreating initrd helped. Also see thread on VMware support forums.



- boot from CentOS CD (x64 works for both i686 and x64 virtual machines)

- type "linux rescue" on prompt

- do not start network or mount any filesystems

- when in root shell check names of lvm volumes
  lvm vgscan
  lvm lvscan

- activate them
  lvm lvchange -a y VolGroup00/LogVol00

- mount root
  mkdir /mnt/root
  mount /dev/VolGroup00/LogVol00 /mnt/root

- mount boot
  mount /dev/sda1 /mnt/root/boot

- mount rest
  mount /dev /mnt/root/dev
  mount /sys /mnt/root/sys
  mount /proc /mnt/root/proc

- chroot to new old root
  chroot /mnt/root

- recreate initrd, make sure you use proper kernel version
  mkinitrd -f /boot/initrd-2.6.18-194.32.1.el5.img 2.6.18-194.32.1.el5

- boot
  exit
  reboot

Comments

  1. it's really a great help! thanks so much!

    ReplyDelete
  2. Just tried this for Elastix 2.4 physical box to a vSphere 5.5 U1 host and it worked perfectly. Thanks a million!

    P.S. I used a Centos 5.9 distro.

    ReplyDelete
  3. Did I tell you that I love you? Worked on RHEL 5.8.

    Thank you!

    ReplyDelete
  4. Thank you, you just saved my day.
    I migrate from VMware to Proxmox image (VMware to KVM) and systme is workign again :)

    ReplyDelete

Post a Comment

Got something to say?!