[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: UEFI support for mini.iso?


Wouter Verhelst wrote:
> This image however does not support booting on a UEFI-only system.

It does support EFI booting from CDROM. At least with qemu and OVMF
as EFI firmware.

> Is there anyone with the required knowledge who would be willing to
> look into fixing that?

I downloaded

which bears this boot equipment:
  El Torito catalog  : 59  1
  El Torito cat path : /boot.cat
  El Torito images   :   N  Pltf  B   Emul  Ld_seg  Hdpt  Ldsiz         LBA
  El Torito boot img :   1  BIOS  y   none  0x0000  0x00      4         268
  El Torito boot img :   2  UEFI  y   none  0x0000  0x00    832          60
  El Torito img path :   1  /isolinux.bin
  El Torito img opts :   1  boot-info-table isohybrid-suitable
  El Torito img path :   2  /boot/grub/efi.img

  MBR partition table:   N Status  Type        Start       Blocks
  MBR partition      :   1   0x80  0x17            0        51200
  MBR partition      :   2   0x00  0x01        51200        12288

I.e. it has an EFI boot image for booting from CD, but no partition
of MBR type 0xef which would point to that image file /boot/grub/efi.img.

So expectably it boots by

  qemu-system-x86_64 -enable-kvm -m 512 -bios /usr/share/ovmf/OVMF.fd -cdrom mini.iso

and does not boot by

  qemu-system-x86_64 -enable-kvm -m 512 -bios /usr/share/ovmf/OVMF.fd -hda mini.iso

One could use xorriso to repack the ISO and apply options which would
cause production of partition tables.
But in this case we have the classical situation for SYSLINUX program
"isohybrid". (We even have the repaired version in Sid, which does
not write random chinese GPT partition names.)

  isohybrid -u mini.iso

This yields a partition table layout similar to netinst:

  MBR partition table:   N Status  Type        Start       Blocks
  MBR partition      :   1   0x80  0x00            0        63488
  MBR partition      :   2   0x00  0xef          240          832
  MBR partition path :   2  /boot/grub/efi.img
  GPT                :   N  Info
  GPT disk GUID      :      12f7657a83abeb4a8a7290afeb748d8d
  GPT entry array    :      2  128  overlapping
  GPT lba range      :      34  63454  63487
  GPT partition name :   1  490053004f004800790062007200690064002000490053004f00
  GPT partname local :   1  ISOHybrid ISO
  GPT partition GUID :   1  b028cc51ece2734982f7a619cd3b977a
  GPT type GUID      :   1  a2a0d0ebe5b9334487c068b6b72699c7
  GPT partition flags:   1  0x0000000000000000
  GPT start and size :   1  0  50464
  GPT partition name :   2  490053004f00480079006200720069006400
  GPT partname local :   2  ISOHybrid
  GPT partition GUID :   2  3e7e8dac6a466b488fec85bd1f82f267
  GPT type GUID      :   2  a2a0d0ebe5b9334487c068b6b72699c7
  GPT partition flags:   2  0x0000000000000000
  GPT start and size :   2  240  832
  GPT partition path :   2  /boot/grub/efi.img

If i run again

  qemu-system-x86_64 -enable-kvm -m 512 -bios /usr/share/ovmf/OVMF.fd -hda mini.iso

i see a few messages about failed attempts. But then i get to the
GRUB2 menu.

Actually the GPT is considered surplus. Any UEFI compliant firmware
should follow the lure in MBR partition 0xef, because the GPT is not
announced by MBR having a single partition of type 0xee.

Have a nice day :)


Reply to: