[fedora-virt] P2V and grub bootloader

Dennis J. dennisml at conversis.de
Thu Apr 30 21:28:51 UTC 2009


Hi,
I'm currently experimenting with converting a physical system to a virtual 
one. Using losetup, kpartx, etc. i was able to transfer the system to a 
volume group in an image file.
My problem is that I don't know how to install grub on that image file. I 
can boot the VM with a rescue CD and then install it from there but I'd 
like to do this without having to boot the VM first. On the net I found 
some tutorials that mention mount-binding /dev to /new-root/dev, chrooting 
to /new-root and then doing a "grub-install /dev/sda" but wouldn't that 
overwrite the boot sector of my physical disk rather than the virtual one?
I tried doing a "grub-install /dev/loop0" (with loop0 beeing the device 
node for the image file) but there I only get "/dev/loop0 does not have any 
corresponding BIOS drive".
How can I install grub from outside the VM?

Regards,
   Dennis




More information about the Fedora-virt mailing list