Hide Forgot
*** Description of problem: One useful environment for UEFI-related development is OVMF running on qemu-kvm. For performance reasons the virtio-blk disk driver is preferred in the virtual machine. Recent OVMF versions come with a VirtioBlkDxe driver; that is, they can load and start grub.efi from the virtio-blk disk in qemu-kvm. However grub.efi itself does not recognize the virtio-blk disk -- it cannot access its config file, and the user is dropped to the grub shell. *** Version-Release number of selected component (if applicable): grub-0.97-81.el6 *** How reproducible: 100% *** Steps to Reproduce: 1. Follow the RHEL-6 oriented OVMF howto at <http://www.linux-kvm.org/page/OVMF>. 2. At first, install the RHEL-6 guest to an emulated IDE disk. Then shut down the guest. 3. In virt-manager, change the disk bus from IDE to Virtio. 4. Reboot the guest. 5a. At the OVMF splash screen, press Esc, then navigate to Boot Maintenance Manager | Boot Options | Add Boot Option. 5b. In the File Explorer, select the following UEFI device path: PciRoot(0x0)/Pci(0x6,0x0)/HD(1,GPT,EE44BC13-D2D7-4C3C-9687-81B34517D1F2,0x800,0x64000) 5c. Navigate to \EFI\redhat\grub.efi and add it with the name "RHEL-6 grub". 5d. Inside Boot Maintenance Manager | Boot Options | Change Boot Order, press Enter, highlight the "RHEL-6 grub" entry, and press + repeatedly until it's the top-most option. Commit changes. 5e. From the main menu, select Boot Manager, and boot the "RHEL-6 grub" option. *** Actual results: grub-efi displays its shell. *** Expected results: grub-efi should display the countdown and then boot the default kernel. *** Additional info: This bug is similar to bug 746106. As discussed there, the problem is again that grub doesn't accept the UEFI device path node just before the HD() node: PciRoot(0x0)/Pci(0x6,0x0)/HD(1,GPT,EE44BC13-D2D7-4C3C- ^^^^^^^^^^^^ 9687-81B34517D1F2,0x800,0x64000) (The above textual format is rendered by OVMF, not grub.) The VirtioBlkDxe driver produces the Block Io Protocol directly on top of the PCI devpath node. Therefore the fix is similar to the one seen in bug 746106.
Created attachment 703232 [details] (proposed patch) recognize virtio-blk on OVMF The patch follows the GNU coding standards: https://www.gnu.org/prep/standards/html_node/Formatting.html
Hi Laszlo, Thanks for the patch. I will consider it to the next release.
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux release for currently deployed products. This request is not yet committed for inclusion in a release.
I'm confirming the fix. I upgraded grub from grub-0.97-81.el6 to grub-0.97-82.el6 in my OVMF-based RHEL-6 guest, downloading the latter build from Brew. Then I shut down the guest, changed the disk bus from (virtio-)scsi to virtio(-blk) in virt-manager, and booted the guest again. I had to update the boot option in the OVMF setup TUI (which was expected -- this step is necessary so that OVMF finds grub itself). Afterwards grub booted the OS from the virtio-blk root disk. Thanks.
Reproduced on RHEL6.4 x86_64 Client. Verified fix on RHEL6.5-20131004.5 x86_64 Client.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2013-1649.html