On Thu, Feb 11, 2016 at 09:42:19AM +0100, Thomas Schmitt wrote: > Hi, > > 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.
Right. I haven't written a CDROM image in ages, though :-) > > Is there anyone with the required knowledge who would be willing to > > look into fixing that? > > I downloaded > > http://ftp.debian.org/debian/dists/sid/main/installer-amd64/current/images/netboot/mini.iso > > 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. Which is the problem I was trying to deal with. > 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 It turns out isohybrid is already being called, except not with the -u option: wouter@gangtai:~/debian/debian-installer/installer/build$ grep ^isohybrid util/geniso_hybrid_plus_firmware_partition isohybrid -h "$heads" -s "$sectors" "$iso" If I change that to add the -u option, things fail miserably later on in the script; it tries to run fdisk on the ISO file, but that no longer works because the -u option changes things around a fair bit. However, if I add a line isohybrid -u "$iso" at the end of the script, it seems to work; I've successfully booted the result of that on qemu in all four use cases (EFI vs not EFI, CDROM vs hd image). I've committed that for now, but if you have the time to look at that script (http://anonscm.debian.org/cgit/d-i/debian-installer.git/tree/build/util/geniso_hybrid_plus_firmware_partition), that might be good. Thanks for you help, -- It is easy to love a country that is famous for chocolate and beer -- Barack Obama, speaking in Brussels, Belgium, 2014-03-26