From: "Richard W.M. Jones" <rjones@redhat.com>
To: Peter Lieven <pl@kamp.de>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] Qemu Booting a PC without an MBR?
Date: Mon, 2 Sep 2013 13:59:07 +0100 [thread overview]
Message-ID: <20130902125907.GB18409@redhat.com> (raw)
In-Reply-To: <52203B8D.5030507@kamp.de>
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
next prev parent reply other threads:[~2013-09-02 12:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-30 6:28 [Qemu-devel] Qemu Booting a PC without an MBR? Peter Lieven
2013-08-30 6:37 ` Paolo Bonzini
2013-08-30 6:43 ` Peter Lieven
2013-08-30 11:01 ` Fam Zheng
2013-09-02 12:59 ` Richard W.M. Jones [this message]
2013-09-02 13:00 ` Richard W.M. Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130902125907.GB18409@redhat.com \
--to=rjones@redhat.com \
--cc=pl@kamp.de \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.