All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kashyap Chamarthy <kchamart@redhat.com>
To: Laszlo Ersek <lersek@redhat.com>
Cc: pbonzini@redhat.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Booting a guest with OVMF
Date: Wed, 11 Jun 2014 23:41:35 +0530	[thread overview]
Message-ID: <20140611181135.GB29542@tesla.pnq.redhat.com> (raw)
In-Reply-To: <5398855F.1010304@redhat.com>

On Wed, Jun 11, 2014 at 06:35:43PM +0200, Laszlo Ersek wrote:
> Alright, so we've already dealt with case #3 (--> the disk image was not
> appropriate for a UEFI VM); let's see cases #1 and #2 (I downloaded and
> tested the gummiboot rawhide image that you gave me).
> 
> What I did as preparation was:
> - I converted the raw image to qcow2:
> 
>   qemu-img convert -p -f raw -O qcow2 \
>       fedora-rawhide.iso fedora-rawhide.qcow2
> 
> - then I created an overlay so that the original never be modified:
> 
>   qemu-img create -f qcow2 -o backing_file=fedora-rawhide.qcow2 \
>       overlay.qcow2
> 
> And I tested with "overlay.qcow2" (rather than /dev/sdb), always
> recreating it from scratch before a test.
> 
> On 06/10/14 15:04, Kashyap Chamarthy wrote:
> > Heya,
> > 
> > Laszlo pointed out OVMF packages for Fedora from here[1]. I tried a
> > simple test using this[2] by installing Fedora onto a USB stick.
> > 
> > Once Fedora is installed on the USB stick (/dev/sdb), and I attempt to
> > boot into the USB device as below, I get the Fedora serial console login
> > prompt just fine through a QEMU vnc display:
> > 
> >     $ sudo qemu-system-x86_64 -machine accel=kvm -m 256 -bios \
> >       /usr/share/OVMF/OVMFX64.fd  /dev/sdb)
> 
> So, this "just works (TM)" for me too, same as for you.
> 
> > However, when I try with the below QEMU invocation, I get "Boot Failed.
> > EFI Floppy":
> > 
> >     $ sudo qemu-system-x86_64 -machine accel=kvm -m 512 -nographic \
> >       -nodefconfig -nodefaults  -serial stdio \
> >       -bios /usr/share/OVMF/OVMFX64.fd /dev/sdb
> >     Boot Failed. EFI Floppy
> >     Boot Failed. EFI Floppy 1
> 
> This happens because the image is incorrectly built. One "trick" that
> you should always use is the following two options:
> 
>   -debugcon file:debug.log \
>   -global isa-debugcon.iobase=0x402
> 
> (This is documented in the OVMF README.)
> 
> This will place the debug console at guest ioport 0x402, and redirect it
> to the debug.log host-side file. OVMF writes a pretty verbose log to
> that port.
> 
> Looking at that log, it's clear that gummiboot is actually started:
> 
> [...]
> Booting EFI Floppy
> PlatformBdsBootFail
> [...]
> Booting EFI Floppy 1
> PlatformBdsBootFail
> [...]
> Booting EFI Hard Drive
> [...]
> 
> The first two floppy boot failures are also displayed on serial (that's
> what you quoted).
> 
> No hard disk boot failure is logged to serial because that boot actually
> succeeds.
> 
> So, the question is, why don't you see anything on serial then? Well
> because in the image file neither gummiboot nor the kernel are
> configured to care about serial at all. 

Ah, right, I should have noticed that. I usually have the serial console
attribute (console=tty0 console=ttyS0,115200) by default in all my
Kickstart-based installs, so I missed it in this setup. Thanks.

> And, in case #2, you have no VGA
> etc; only a serial line.

> 
> Try this:
> - boot the image like in case #1 (== normal VGA),
> - log in, and navigate to /boot/loader/entries/
> - edit the gummiboot conf file you find there,
> - append "console=tty console=ttyS0" to the "options" line
> - shut down the guest cleanly (shutdown -h now)
> - start the guest again, like in case #2 (== headless).
> - You should get a login prompt on serial. (I do.)

This, of course, works.

Thanks Laszlo.

-- 
/kashyap

      reply	other threads:[~2014-06-11 18:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-10 13:04 [Qemu-devel] Booting a guest with OVMF Kashyap Chamarthy
2014-06-10 15:18 ` Laszlo Ersek
2014-06-10 16:10   ` Kashyap Chamarthy
2014-06-10 16:26     ` Laszlo Ersek
2014-06-10 17:16       ` Kashyap Chamarthy
2014-06-10 17:30         ` Laszlo Ersek
2014-06-10 18:03           ` Kashyap Chamarthy
2014-06-10 17:26     ` Laszlo Ersek
2014-06-11 16:35 ` Laszlo Ersek
2014-06-11 18:11   ` Kashyap Chamarthy [this message]

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=20140611181135.GB29542@tesla.pnq.redhat.com \
    --to=kchamart@redhat.com \
    --cc=lersek@redhat.com \
    --cc=pbonzini@redhat.com \
    --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.