Much has changed in Ubuntu's ISO:
The BIOS boot image and MBR are now from GRUB.
The EFI System Partition is not a file in the ISO any more.
The partition table is now GPT. But the ISO keeps its old jackalope
style by an additional MBR partition of type 00 and size 1. This nearly
not existing partition holds the boot flag for some few old BIOS machines
which boot only if this flag is present in some MBR partition entry.
The protective MBR partition of type EE is not allowed to bear this flag.
$ /sbin/fdisk -l ubuntu-20.10-desktop-amd64.iso
...
Disklabel type: gpt
...
Device Start End Sectors Size Type
ubuntu-20.10-desktop-amd64.iso1 64 5735483 5735420 2.8G Microsoft basic da
ubuntu-20.10-desktop-amd64.iso2 5735484 5745435 9952 4.9M EFI System
ubuntu-20.10-desktop-amd64.iso3 5745436 5746035 600 300K Microsoft basic da
You may extract MBR and EFI partition image from the original ISO.
orig=ubuntu-20.10-desktop-amd64.iso
mbr=ubuntu-20.10-desktop-amd64.mbr
efi=ubuntu-20.10-desktop-amd64.efi
# Extract the MBR template
dd if="$orig" bs=1 count=446 of="$mbr"
# Extract EFI partition image
skip=$(/sbin/fdisk -l "$orig" | fgrep '.iso2 ' | awk '{print $2}')
size=$(/sbin/fdisk -l "$orig" | fgrep '.iso2 ' | awk '{print $4}')
dd if="$orig" bs=512 skip="$skip" count="$size" of="$efi"
Now you can pack up the new ISO:
new=Image.iso
xorriso -as mkisofs \
-r -V "$disk_title" -J -joliet-long -l \
-iso-level 3 \
-partition_offset 16 \
--grub2-mbr "$mbr" \
--mbr-force-bootable \
-append_partition 2 0xEF "$efi" \
-appended_part_as_gpt \
-c /boot.catalog \
-b /boot/grub/i386-pc/eltorito.img \
-no-emul-boot -boot-load-size 4 -boot-info-table --grub2-boot-info \
-eltorito-alt-boot \
-e '--interval:appended_partition_2:all::' \
-no-emul-boot \
-o "$new" \
unpackedImageDirectory
I obtained the boot preparation options from a run of
xorriso -indev "$orig" -report_el_torito as_mkisofs
Regrettably xorriso <= 1.5.2 has a bug in the output of this command with
ISOs using --mbr-force-bootable, by also reporting -as mkisofs option
-part_like_isohybrid
which would spoil the ISO for booting from new Lenovo laptops.
The newest GNU xorriso-1.5.3 tarball has this bug fixed.
Have a nice day :)
Thomas
Edit on request:
About the new boot equipment.
The set of boot lures is as crammed as in the the old ISOs:
El Torito for BIOS and EFI from optical media, MBR x86 code for
BIOS from USB stick, a partition table with EFI partition for
EFI from USB stick.
Reason to give up SYSLINUX/ISOLINUX was probably its poor maintainance
state and the fact that one needs GRUB anyways for booting via EFI
from optical media.
The old partition layout mix of ISOLINUX and GRUB did not work
with GRUB+GRUB on some modern EFI laptops. My suspicion is that they
tolerate MBR partition table only if an ISOLINUX MBR is present.
That old layout was quite an abominality if seen from the UEFI specs.
So Ubuntu went to appended partitions and GPT as partition table.
Some old HP laptops bailed out and had to be dragged in by a boot flag
in the MBR partition table.
The change was laborsome and in part painful.
https://bugs.launchpad.net/ubuntu-cdimage/+bug/1886148
https://bugs.launchpad.net/ubuntu-cdimage/+bug/1899308