Discussion:
[edk2] can OVMF boot an OS in qemu?
WANG Siyuan
2012-12-04 15:20:38 UTC
Permalink
Hi,
I have built OVMF(
http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=How_to_run_OVMF
)
and run in qemu. a uefi shell could start.
but, It seems that OVMF can't boot an OS. I use ubuntu CD image and
archlinux hard drive image. both of them could not boot.
Then, how to boot an OS with OVMF?
--
Yours sincerely,
WANG Siyuan
Laszlo Ersek
2012-12-04 17:38:26 UTC
Permalink
Post by WANG Siyuan
Hi,
I have built
OVMF( http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=How_to_run_OVMF )
and run in qemu. a uefi shell could start.
but, It seems that OVMF can't boot an OS. I use ubuntu CD image and
archlinux hard drive image. both of them could not boot.
Then, how to boot an OS with OVMF?
(1) If you have not installed the Arch Linux guest with Arch Linux' UEFI
installer <https://wiki.archlinux.org/index.php/UEFI>, then you have
approx. zero chance to boot the image from OVMF. The installer must
install an UEFI boot loader.

The installers I know of base their decisions whether to install a BIOS
or UEFI boot loader (& to create the boot partition accordingly) on the
current boot firmware. IOW, if you want to end up with an OVMF-bootable
guest, you should probably boot the installer ISO under OVMF too.

(2) What version of Ubuntu ISO are you trying? The installer ISO must
explicitly support UEFI installation. Minimal googling turned up
<https://help.ubuntu.com/community/UEFI>.

(3) Yet another description you might find useful:
<http://www.linux-kvm.org/page/OVMF>.

(4) Can you access the ISO image in OVMF?

Type "exit" in the UEFI shell, and select

Boot Maintenance Manager | Boot Options | Add Boot Option

on the text UI. Can you select the virtual CD-ROM device there (I assume
IDE) and then browse the ISO? You should navigate to "EFI\BOOT\BOOTX64.EFI".

Laszlo
WANG Siyuan
2012-12-05 15:11:39 UTC
Permalink
Hi, Laszlo
Thank you for replay.
I have boot archlinux install iso successful with OVMF but ubuntu iso drop
into grub shell.
there are 2 problems during archlinux iso boot:
1) take a long time
2) could not display in spice (-vga qxl -spice
port=5900,addr=127.0.0.1,disable-ticketing), spicec is blank.
Post by WANG Siyuan
Hi,
I have built
OVMF(
http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=How_to_run_OVMF)
Post by WANG Siyuan
and run in qemu. a uefi shell could start.
but, It seems that OVMF can't boot an OS. I use ubuntu CD image and
archlinux hard drive image. both of them could not boot.
Then, how to boot an OS with OVMF?
(1) If you have not installed the Arch Linux guest with Arch Linux' UEFI
installer <https://wiki.archlinux.org/index.php/UEFI>, then you have
approx. zero chance to boot the image from OVMF. The installer must
install an UEFI boot loader.
The installers I know of base their decisions whether to install a BIOS
or UEFI boot loader (& to create the boot partition accordingly) on the
current boot firmware. IOW, if you want to end up with an OVMF-bootable
guest, you should probably boot the installer ISO under OVMF too.
(2) What version of Ubuntu ISO are you trying? The installer ISO must
explicitly support UEFI installation. Minimal googling turned up
<https://help.ubuntu.com/community/UEFI>.
<http://www.linux-kvm.org/page/OVMF>.
(4) Can you access the ISO image in OVMF?
Type "exit" in the UEFI shell, and select
Boot Maintenance Manager | Boot Options | Add Boot Option
on the text UI. Can you select the virtual CD-ROM device there (I assume
IDE) and then browse the ISO? You should navigate to
"EFI\BOOT\BOOTX64.EFI".
Laszlo
--
Yours sincerely,
WANG Siyuan
Gerd Hoffmann
2012-12-06 08:01:21 UTC
Permalink
Hi,
Post by WANG Siyuan
2) could not display in spice (-vga qxl -spice
port=5900,addr=127.0.0.1,disable-ticketing), spicec is blank.
That requires qemu 1.3.0 (and a recent ovmf too) to work.

cheers,
Gerd

Loading...