qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Qemu Booting a PC without an MBR?


From: Richard W.M. Jones
Subject: Re: [Qemu-devel] Qemu Booting a PC without an MBR?
Date: Mon, 2 Sep 2013 13:59:07 +0100
User-agent: Mutt/1.5.20 (2009-12-10)

On Fri, Aug 30, 2013 at 08:28:29AM +0200, Peter Lieven wrote:
> Hi all,
>
> today I had the second incidence of a migrated system (copied with
> DD) to qemu which won't boot. (stuck after booting from harddisk
> message).

You should probably have looked at virt-v2v, but you are where you are
now, so ...

> Looking at sector 0 I found out that it does not have an MBR. It seems that 
> real hardware and
> I was told also vmware can cope with this.
> 
> Is there a way we can improve this? (maybe be using an open source mbr in 
> case the mbr
> section is zeroed out?)

(1) Use virt-rescue to open the disk image and then run whatever
program is needed inside the guest (eg. grub-install).

Or:

(2) Use guestfish and add a syslinux boot loader.  I don't have a
direct example you can copy, but you could greatly simplify this:

https://rwmj.wordpress.com/2013/05/09/tip-convert-a-windows-dvd-iso-to-a-bootable-usb-key-using-guestfish/

It'll probably be something like:

Write a /tmp/syslinux cfg file (see EXTLINUX docs).

guestfish -a disk.img
><fs> upload /usr/share/syslinux/mbr.bin /dev/sda
><fs> mount /dev/sda1 /
><fs> extlinux /
><fs> upload /tmp/syslinux.cfg /syslinux.cfg

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top



reply via email to

[Prev in Thread] Current Thread [Next in Thread]