From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35731) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WulVC-0001UB-O0 for qemu-devel@nongnu.org; Wed, 11 Jun 2014 12:36:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WulV4-0005BC-Te for qemu-devel@nongnu.org; Wed, 11 Jun 2014 12:35:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:5842) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WulV4-0005B2-Li for qemu-devel@nongnu.org; Wed, 11 Jun 2014 12:35:46 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s5BGZjdL024751 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 11 Jun 2014 12:35:45 -0400 Message-ID: <5398855F.1010304@redhat.com> Date: Wed, 11 Jun 2014 18:35:43 +0200 From: Laszlo Ersek MIME-Version: 1.0 References: <20140610125650.GJ8813@tesla> In-Reply-To: <20140610125650.GJ8813@tesla> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] Booting a guest with OVMF List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kashyap Chamarthy , pbonzini@redhat.com Cc: qemu-devel@nongnu.org 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. 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.) Thanks Laszlo