Hi. 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 I have tried : the Super Grub http://www.supergrubdisk.org/wiki/Howto_Fix_Grub#GRUB_solution_.28Linux_shell.29 http://wiki.centos.org/TipsAndTricks/ReinstallGRUB # chroot /mnt/sysimage # grub-install /dev/sda /dev/sda does not have any corresponding BIOS drive. http://www.av8n.com/computer/htm/grub-reinstall.htm # grub-install --root-directory=/mnt/sysimage /dev/sda /dev/sda does not have any corresponding BIOS drive. I have also tried a number using the grub console with a number of different configurations all failed . fdisk output : Disk /dev/sda: 549.7 GB, 549755813888 bytes 255 heads, 63 sectors/track, 66837 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 1 131 1048576 83 Linux Partition 1 does not end on cylinder boundary. /dev/sda2 131 60968 488669184 83 Linux /dev/sda3 60968 66838 47152128 82 Linux swap / Solaris fstab [root at nzhmlwks113 vm]# cat fstab /dev/sda2 / ext3 defaults 1 1 /dev/sda1 /boot ext3 defaults 1 2 tmpfs /dev/shm tmpfs defaults 0 0 devpts /dev/pts devpts gid=5,mode=620 0 0 sysfs /sys sysfs defaults 0 0 proc /proc proc defaults 0 0 /dev/sda3 swap swap defaults 0 0 grub.conf # grub.conf generated by anaconda # # Note that you do not have to rerun grub after making changes to this file # NOTICE: You have a /boot partition. This means that # all kernel and initrd paths are relative to /boot/, eg. # root (hd0,0) # kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol01 # initrd /initrd-version.img #boot=/dev/sda1 default=0 timeout=10 splashimage=(hd0,0)/grub/splash.xpm.gz hiddenmenu title Red Hat Enterprise Linux Server (2.6.18-308.11.1.el5) root (hd0,1) kernel /vmlinuz-2.6.18-308.11.1.el5 ro root=LABEL=/ ramdisk_size=8388608 initrd /initrd-2.6.18-308.11.1.el5.img title Red Hat Enterprise Linux Server (2.6.18-308.1.1.el5) kernel /vmlinuz-2.6.18-308.1.1.el5 ro root=LABEL=/ ramdisk_size=8388608 initrd /initrd-2.6.18-308.1.1.el5.img I have also tried "ro root=/dev/sda2" I have been look at then for 8 hour now and I'm clueless as to what I have missed. I'm hoping a fresh pair of eyes can see the issue. Thanks in advance. GM
On Monday 16 July 2012, Gregory Machin <gdm at linuxpro.co.za> wrote:> # chroot /mnt/sysimage > # grub-install /dev/sda > /dev/sda does not have any corresponding BIOS drive.Try this: mount /dev/sda1 /mnt/sysimage/boot mount -t none /dev /mnt/sysimage/dev -o bind chroot /mnt/sysimage/boot mount /proc mount /sys -- Yves Bellefeuille <yan at storm.ca>
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 2First, 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) quit -- Les Mikesell lesmikesell at gmail.com
On Monday 16 July 2012, Gregory Machin <gdm at linuxpro.co.za> wrote:> I have not been able to get Grub to go further than : > > GRUB Loading stage1.5. > GRUB Loading, please wait... > Error 2My previous advice was nonsense; sorry. :-( This, however, should work: (as root) mount --bind /dev /mnt/sysimage/dev mount --bind /proc /mnt/sysimage/proc mount --bind /sys /mnt/sysimage/sys chroot /mnt/sysimage grub-install /dev/sda -- Yves Bellefeuille <yan at storm.ca>
On 07/15/2012 10:15 PM, Gregory Machin wrote:> # chroot /mnt/sysimage > # grub-install /dev/sda > /dev/sda does not have any corresponding BIOS drive.Typically that error means that "sda" does not appear in /boot/grub/device.map. Your previous system probably used hda instead. Update that file, replacing hda with sda, then reinstall grub.