From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33592) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wun03-0001vx-FC for qemu-devel@nongnu.org; Wed, 11 Jun 2014 14:11:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wumzx-0003QE-8m for qemu-devel@nongnu.org; Wed, 11 Jun 2014 14:11:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:9649) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wumzx-0003Ot-0m for qemu-devel@nongnu.org; Wed, 11 Jun 2014 14:11:45 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s5BIBgip006895 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 11 Jun 2014 14:11:43 -0400 Date: Wed, 11 Jun 2014 23:41:35 +0530 From: Kashyap Chamarthy Message-ID: <20140611181135.GB29542@tesla.pnq.redhat.com> References: <20140610125650.GJ8813@tesla> <5398855F.1010304@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5398855F.1010304@redhat.com> Subject: Re: [Qemu-devel] Booting a guest with OVMF List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laszlo Ersek Cc: pbonzini@redhat.com, qemu-devel@nongnu.org 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