[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [fedora-virt] P2V and grub bootloader



On 05/01/2009 12:30 AM, Richard W.M. Jones wrote:
On Fri, May 01, 2009 at 12:25:44AM +0200, Dennis J. wrote:
On 05/01/2009 12:11 AM, Richard W.M. Jones wrote:
On Thu, Apr 30, 2009 at 10:39:37PM +0100, Richard W.M. Jones wrote:
I haven't tried it, but it's possibly something you can do from
libguestfs, or if not, it's something that we could add to libguestfs.

OK, I just added grub-install to libguestfs:

http://git.et.redhat.com/?p=libguestfs.git;a=commitdiff;h=b55bf8158f0b7f6b1760b7b3b5f7c1274a149127

(Make sure you have a back up of your guest image before experimenting
with this ...)

Looking at that patch wouldn't specifying /dev/sda as device actually
overwrite the physical boot sector on the host system rather than the one
in the image?
Or does libguestfs manipulate the device table so that access to /dev/sda
get automatically gets re-routed to access the image instead?

Neither.  libguestfs boots a mini virtual machine, so /dev/sda really
is the right device all along.

Ah, I didn't know that libguestfs actually uses its own vm.
I just tried compiling libguestfs from git on f10 but it doesn't seem to like that at all:

...
mv initramfs.fedora-10.i686.img initramfs.fedora-10.i686.img.bak
mv: cannot stat `initramfs.fedora-10.i686.img': No such file or directory
make[2]: [initramfs/fakeroot.log] Error 1 (ignored)
mv vmlinuz.fedora-10.i686 vmlinuz.fedora-10.i686.bak
mv: cannot stat `vmlinuz.fedora-10.i686': No such file or directory
make[2]: [initramfs/fakeroot.log] Error 1 (ignored)
if ! bash ./make-initramfs.sh; then rm -f initramfs/fakeroot.log; exit 1; fi
run_yum: line 1: 19874 Segmentation fault yum -y -c "$tmpdir"/febootstrap.repo --disablerepo=* --enablerepo=febootstrap --noplugins --nogpgcheck --installroot="$target" install "$@"
chroot: cannot run command `chmod': No such file or directory
make[2]: *** [initramfs/fakeroot.log] Error 1
make[2]: Leaving directory `/home/dennis/Downloads/source/libguestfs-1.0.16'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/dennis/Downloads/source/libguestfs-1.0.16'
make: *** [all] Error 2

Regards,
  Dennis


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]