qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] QEMU + OVMF, bootable linux image
@ 2017-02-03 18:20 Jason Dickens
  2017-02-03 21:00 ` Laszlo Ersek
  0 siblings, 1 reply; 2+ messages in thread
From: Jason Dickens @ 2017-02-03 18:20 UTC (permalink / raw)
  To: qemu-devel

I am trying to create a raw Linux image that is bootable by QEMU using 
the OVMF firmware image.

Basically, I have used a standard Ubuntu ISO  and a empty raw image. 
Executing qemu-system-x86_64 with the ISO as CD and the other image as a 
hardrive I have been able to install Ubuntu on the image, no problem.

However, when trying to boot the created image I simply get the UEFI shell?

I've noticed the following:

1. The ISO image which boots with OVMF in UEFI just fine has the 
following format (from fdisk):

Disk ubuntu-14.04.3-desktop-amd64.iso: 1006 MiB, 1054867456 bytes, 
2060288 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x6a6216fc

Device                           Boot   Start     End Sectors Size Id Type
ubuntu-14.04.3-desktop-amd64.iso1  *        0 2060287 2060288 1006M  0 
Empty
ubuntu-14.04.3-desktop-amd64.iso2     2038760 2043303 4544 2.2M ef EFI 
(FAT-12/16/32)

2. The image created by the linux install has the following(from fdisk):

Disk ovmf_test_image: 10 GiB, 10737418240 bytes, 20971520 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 36240C48-C008-4619-BE31-26D271000490

Device              Start      End  Sectors  Size Type
ovmf_test_image1     2048  1050623  1048576  512M EFI System
ovmf_test_image2  1050624 12584959 11534336  5.5G Linux filesystem
ovmf_test_image3 12584960 20969471  8384512    4G Linux swap


Can someone help me understand the format requirements to boot using 
OVMF in UEFI mode? Clearly these two images are dramatically different. 
However, I would expect #2 to be the more modern method and more likely 
to work? As for QEMU command I use literally the same command switching 
only between the file names to get the different results it looks 
something like this:

qemu-system-x86_64 -drive file=ovmf_test_image,format=raw -m 4G 
--bios.bin -net none

Thanks,

Jason

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-02-03 21:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-03 18:20 [Qemu-devel] QEMU + OVMF, bootable linux image Jason Dickens
2017-02-03 21:00 ` Laszlo Ersek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).