Merge lp:~xnox/debian-cd/unbreak-grub2-hybrid-iso into lp:~ubuntu-cdimage/debian-cd/ubun3

Proposed by Dimitri John Ledkov on 2020-07-08
Status: Merged
Merged at revision: 2078
Proposed branch: lp:~xnox/debian-cd/unbreak-grub2-hybrid-iso
Merge into: lp:~ubuntu-cdimage/debian-cd/ubun3
Diff against target: 20 lines (+10/-1)
1 file modified
tools/boot/groovy/boot-amd64 (+10/-1)
To merge this branch: bzr merge lp:~xnox/debian-cd/unbreak-grub2-hybrid-iso
Reviewer Review Type Date Requested Status
Steve Langasek 2020-07-08 Approve on 2020-07-08
Michael Hudson-Doyle (community) 2020-07-08 Approve on 2020-07-08
Ubuntu CD Image Team 2020-07-08 Pending
Review via email: mp+387008@code.launchpad.net
To post a comment you must log in.
Michael Hudson-Doyle (mwhudson) wrote :

This is definitely an improvement (as in, the ISOs boot now in all of {legacy,uefi}x{cdrom,disk}) so we should merge it.

This and recent changes have the side effect of making the ISOs bigger, because each of the four boot modes described above gets its own copy of grub. In older images, legacy-disk boots used the 432 byte (!) isohdpfx.bin to jump to the grub in the el torito boot image for legacy boot and the MBR EFI partition used by uefi-disk pointed at the same data as the el torito boot image for EFI. These tricks require creating overlapping partition tables though and the libisofs on focal, at least, doesn't let you do that (at least in my tests).

This is the best documentation I've found for all this btw: https://wiki.osdev.org/El-Torito.

I might propose a follow on commit that adds a *lot* of comments ...

review: Approve
Dimitri John Ledkov (xnox) wrote :

Adding an ESP sounds fine, but I'm not sure why we bother with -eltorito-alt-boot -e boot/grub/efi.img.

Surely we only need 3 grubs: -b eltorito one, the hybrid mbr one, and the one inside the ESP.

Michael Hudson-Doyle (mwhudson) wrote :

That's for the cdrom-uefi boot - that's still a wacko el torito thing, it
doesn't look at the partition table (at least according to the stuff I read)

On Wed, 8 Jul 2020, 22:46 Dimitri John Ledkov, <email address hidden>
wrote:

> Adding an ESP sounds fine, but I'm not sure why we bother with
> -eltorito-alt-boot -e boot/grub/efi.img.
>
> Surely we only need 3 grubs: -b eltorito one, the hybrid mbr one, and the
> one inside the ESP.
> --
>
> https://code.launchpad.net/~xnox/debian-cd/unbreak-grub2-hybrid-iso/+merge/387008
> You are reviewing the proposed merge of
> lp:~xnox/debian-cd/unbreak-grub2-hybrid-iso into
> lp:~ubuntu-cdimage/debian-cd/ubuntu.
>

Steve Langasek (vorlon) wrote :

I'm not happy with the ESP being duplicated and want us to follow through on this, but approving for now to unbreak the images.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tools/boot/groovy/boot-amd64'
2--- tools/boot/groovy/boot-amd64 2020-06-19 13:47:59 +0000
3+++ tools/boot/groovy/boot-amd64 2020-07-08 01:50:47 +0000
4@@ -36,7 +36,16 @@
5 mkdir cd-boot-images
6 $BASEDIR/tools/apt-selection download cd-boot-images-amd64
7 dpkg --fsys-tarfile cd-boot-images-amd64*_all.deb | tar xf - -C cd-boot-images
8-echo -n "-J -joliet-long -l -b boot/grub/i386-pc/eltorito.img -no-emul-boot -boot-load-size 4 -boot-info-table --grub2-boot-info --grub2-mbr cd-boot-images/usr/share/cd-boot-images-amd64/tree/boot/grub/i386-pc/boot_hybrid.img --efi-boot boot/grub/efi.img -efi-boot-part --efi-boot-image -partition_offset 16 cd-boot-images/usr/share/cd-boot-images-amd64/tree" >> $N.mkisofs_opts
9+
10+# --efi-boot -efi-boot-part --efi-boot-image seem to generate broken
11+# .iso, specifically despite -partition_offset 16, the first partition
12+# is mountable, but results in I/O errors without anything
13+# readable. Thus use just append_partition syntax to add ESP & -e
14+# "more rawly" way to specify ESP.
15+#
16+# TODO test if --efi-boot-image can be used instead of -e
17+
18+echo -n "-J -joliet-long -l -b boot/grub/i386-pc/eltorito.img -no-emul-boot -boot-load-size 4 -boot-info-table --grub2-boot-info --grub2-mbr cd-boot-images/usr/share/cd-boot-images-amd64/tree/boot/grub/i386-pc/boot_hybrid.img -append_partition 2 0xef cd-boot-images/usr/share/cd-boot-images-amd64/tree/boot/grub/efi.img -eltorito-alt-boot -e boot/grub/efi.img -no-emul-boot -partition_offset 16 cd-boot-images/usr/share/cd-boot-images-amd64/tree" >> $N.mkisofs_opts
19
20 default_kernel_params
21

Subscribers

People subscribed via source and target branches