Bug 72 - [enhancement request] boot optical media under UEFI
Summary: [enhancement request] boot optical media under UEFI
Status: CONFIRMED
Alias: None
Product: Syslinux
Classification: Unclassified
Component: syslinux (show other bugs)
Version: All
Hardware: PC Linux
: --- enhancement
Assignee: H. Peter Anvin
URL:
Depends on:
Blocks:
 
Reported: 2016-05-20 12:16 PDT by lacsaP
Modified: 2016-05-20 14:59 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description lacsaP 2016-05-20 12:16:26 PDT
hello,

I'm trying to make an isohybrid bios/uefi bootable image and I'm having trouble booting cdrom under UEFI.

this is the boot tree :

work/iso/efi/
└── boot
    ├── bootx64.efi
    ├── clear
    ├── ldlinux.e64
    ├── libutil.c32
    ├── menu.c32
    └── syslinux.cfg

this tree is copied in a fat16 boot file efibbot.img for eltorito alt boot.

the tree and the boot file are ok directly under UEFI :

$ qemu -m 1024 -hda work/iso/isolinux/efiboot.img -bios /usr/share /ovmf/ovmf_x64.bin -snapshot # OK :-)
$ qemu -m 1024 -hda fat:./work/iso/ -bios /usr/share/ovmf/ovmf_x64.bin -snapshot # OK :-)

I use mkisofs and isohybrid to generate the bootable image :

# mkisofs \
	-eltorito-catalog isolinux/boot.cat \
	-eltorito-boot isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table \
	-eltorito-alt-boot -eltorito-platform efi \
	-eltorito-boot isolinux/efiboot.img -no-emul-boot \
	-o out/DidJiX.iso \
	./work/iso/

# isohybrid --uefi out/DidJiX.iso

the bootable isohybrid image seems ok for cd and hd :

# dumpet -i out/DidJiX.iso
Validation Entry:
	Header Indicator: 0x01 (Validation Entry)
	PlatformId: 0x00 (80x86)
	ID: "patatetom@gmail.com"
	Checksum: 0x086d
	Key bytes: 0x55aa
Boot Catalog Default Entry:
	Entry is bootable
	Boot Media emulation type: no emulation
	Media load segment: 0x0 (0000:7c00)
	System type: 0 (0x00)
	Load Sectors: 4 (0x0004)
	Load LBA: 10694 (0x000029c6)
Section Header Entry:
	Header Indicator: 0x91 (Final Section Header Entry)
	PlatformId: 0xef (EFI)
	Section Entries: 1
	ID: ""
Boot Catalog Section Entry:
	Entry is bootable
	Boot Media emulation type: no emulation
	Media load address: 0 (0x0000)
	System type: 0 (0x00)
	Load Sectors: 40960 (0xa000)
	Load LBA: 454 (0x000001c6)

# fdisk -l out/DidJiX.iso 
Disk out/DidJiX.iso: 437 MiB, 458227712 bytes, 894976 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: 0x6b8b4567

Device          Boot Start    End Sectors  Size Id Type
out/DidJiX.iso1 *        0 894975  894976  437M  0 Empty
out/DidJiX.iso2       1816  42775   40960   20M ef EFI (FAT-12/16/32)

the bootable image is ok for cd/hd BIOS and hd UEFI, but not for cd UEFI :

$ qemu -m 1024 -cdrom out/DidJiX.iso # OK :-)
$ qemu -m 1024 -hda out/DidJiX.iso -snapshot # OK :-)
$ qemu -m 1024 -hda out/DidJiX.iso -bios /opt/virtual/uefi.x64 -snapshot # OK :-)

$ qemu -m 1024 -cdrom out/DidJiX.iso -bios /opt/virtual/uefi.x64 # KO :-(

if I replace bootx64.efi (efi64/syslinux.efi) by diskpart.efi (Intel EFI Disk utilities), there's no problem (eg. no freeze)...

I'm on ArchLinux with core/syslinux 6.03-6, extra/ovmf 18419-1, community/cdrtools 3.02a06-1 and extra/qemu 2.5.1-1.

regards.