[CentOS] Can't get Grub work on clone of machine

Mon Jul 16 15:14:11 UTC 2012
Les Mikesell <lesmikesell at gmail.com>

On Mon, Jul 16, 2012 at 12:15 AM, Gregory Machin <gdm at linuxpro.co.za> wrote:
> I have cloned a RHEL 5.6 physical server over to a ESXi 5.0 Virtual Machine.
> Using a live CD on the new Virtual Machine I created 3 partition /boot
> (/dev/sda1), / (/dev/sda2) and swap (/dev/sda3), I then mounted the /
> (sda2) partition and created the /boot directory and mount the boot
> partition partition /dev/sda1 into /boot. I then used rsync to copy
> the source machine over to the Virtual Machine.
> I have not been able to get Grub to go further than :
> GRUB Loading stage1.5.
> GRUB Loading, please wait...
> Error 2

First, if your source layout is typical, you might have been able to
use the free VMware Converter tool to clone to ESXi (or an image)
directly.   Most of my linux boxes have a custom raid layout and don't
work so I don't have much linux experience with it, but it works great
with windows.

Another approach is to do a minimal install, upgrade the kernel to
match the source machine, then blow away everything but the /boot
partition and copy over from the source.  This gets grub installed and
the right kernel modules in the ramdisk to match the new hardware -
and you can look at /etc/modprobe.conf to see what those modules are
if you don't know as much as anaconda does about hardware and modules.

But, starting from what you have, stage 1.5 is still in the MBR so it
seems odd that you have enough to boot at all but are missing that
part.    I'd try booting in rescue mode, running grub and:
root (hd0,1)
setup (hd0)

   Les Mikesell
    lesmikesell at gmail.com