Convert Redhat 3.1 VMWare Server VM to VMWare ESX Server 3i using VMWare Convertor – Error loading operating system

Written by James McDonald

August 29, 2008

I just attempted to convert a Redhat 3.1 VMWare Server 1.04 VMImage using VMWare Convertor 3.03 to VMWare ESX Server 3i v 3.5. The VMWare Convertor conversion completed successfully and loaded the VM to the ESX Server however when I booted the VM on the ESX Server I got “Error loading operating system”.

The Fix:
Boot the VM on the ESX Server with a Knoppix CD.
Find the boot partition of the RH3.1 Image and mount it. To do this do a fdisk -l and look for the partition with the bootable flag set:
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux

Mount the boot partition:
mount /dev/sda1 /media/sda1
Run:
grub-install --root-directory=/media/sda1 /dev/sda

Remove the Knoppix CD and boot the VM as normal.

Now when you reboot the VM you will get a “<grub>” prompt.

Not what I was expecting at all! This is because Knoppix uses the standard style grub which looks for it’s OS boot settings in menu.lst (I think). Redhat looks for it’s grub config in /boot/grub/grub.conf the Knoppix grub can’t find it’s settings file.

The fix for this is to tell grub where the configfile is. At the “<grub>” prompt enter:
configfile /grub/grub.conf

It will now load in your familiar Redhat GRUB OS selection screen and you can boot your RH3.1 OS.

When you get back into RH and gain root just run grub-install /dev/sda to re-install the proper Redhat style grub code.

Disclaimer: I accept no responsibility for any damage do from reading this script. It’s certainly dangerous and could toast your VM if you do it wrong.

4 Comments

  1. Brave

    Your post is the exact one I am looking for. I worked on the same scenario, P2V old RHL v3/4 with vcenter converter 4/5 to ESXi 5. And there was boot error and I followed your guide and it works like charm. thank you buddy.

    Reply
    • James

      Glad I could help

      Reply
  2. Mike

    I’m trying this on ESXi6 getting the same error except when I boot with Knoppix it tells me “could not mount disk to /mnt-system. Starting debugging shell…” any thoughts?

    Reply
    • James McDonald

      Some Ideas:

      Sometimes this error can be due to a bad Knoppix image. Redownload and/or re-burn the CD/DVD (check md5sum of the download before burning)

      Try a modern live CD such as CentOS or Ubuntu. May be able to do the same commands as suggested above with it.

      Boot from CD iso so you are bypassing a potentially bad CD/DVD player.

      Reply

Leave a Reply to James McDonald Cancel reply

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

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.

You May Also Like…

Clear HSTS Settings in CHrome

Open chrome://net-internals/#hsts enter the domain in the query field and click Query to confirm it has HSTS settings...

Ubuntu on Hyper-v

It boils town to installing linux-azure # as root or sudo apt-get update apt-get install linux-azure...