Hi, it might be more simple to just append efi.img as additional partition rather than unpacking it into the partition for custom firmware.
-------------- The first step with the new argument efi_fat="$1" in util/geniso_hybrid_plus_firmware_partition and the two alternative calls of geniso_hybrid_plus_firmware_partition from build/config/x86.cfg stays as is. The other two steps get replaced by: -------------- If "$efi_fat" is not empty, append it to the image and mark it in MBR. Depending on the fact that the firmware FAT is aligned to full MiB and isohybrid padded up the ISO to full MiB, one could quite duplicate the code of util/geniso_hybrid_plus_firmware_partition from line 37 to end: # Done! echo w ) | fdisk -C "$cylinders" -H "$heads" -S "$sectors" "$iso" + fdisk_ret="$?" + test "$fdisk_ret" = 0 || exit "$fdisk_ret" + + test -z "$efi_fat" && exit 0 + + cat "$efi_fat" >> "$iso" + + # Until the bug is fixed: Need no new exaggerated cylinder count + + ( + + # Make new partition #3 + echo n + echo p + echo 3 + echo # use default start sector + echo # use default end sector + + # Set partition type to 0xef : FAT for EFI + echo t + echo 3 + echo 239 + + # Done! + echo w + ) | fdisk -C "$cylinders" -H "$heads" -S "$sectors" "$iso" ---------- The computation of cylinders seems wrong in util/geniso_hybrid_plus_firmware_partition: cylinders="$(($(stat -c %s "$iso") / $heads / $sectors))" "stat -c %s" yields the byte count of the ISO image. Cylinder size is $heads * $sectors * 512 bytes. The 512 is missing in above computation. Just try: $ iso=mini.iso $ echo "$(($(stat -c %s "$iso") / 64 / 32))" 14336 That would be 14+ GiB. More realistic is: $ echo "$(($(stat -c %s "$iso") / 64 / 32 / 512))" 28 -------------------------------------------------------- About letting xorriso set up isohybrid and add partitions to MBR and GPT: I am having some conceptional problems in libisofs to get appended partitions marked in GPT. The backup GPT of an EFI-enabled isohybrid is supposed to be inside the block range of the ISO filesystem. The appended partitions are not. So they should come after the backup GPT. But a GPT partition has to be located before the backup GPT. Can you tell me more about the use cases for the firmware partition ? Is it necessary that partition editors can enlarge it ? Have a nice day :) Thomas -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org