On Tue, Jul 16, 2024 at 10:47:57AM GMT, Pascal Hambourg wrote:
> On 16/07/2024 at 08:55, Michael Chang via Grub-devel wrote:
> > 
> > 4. When booting from an ISO, the ESP is treated as an El Torito image in
> >     the boot catalog. It is therefore presented by firmware and
> >     interpreted by grub as a disk (cd0).
> 
> In my limited experience, (cd0) is the whole CD/DVD/BD and GRUB does not
> show the EFI El Torito image as such.
> 
> Tested with debian-12.6.0-amd64-netinst.iso on QEMU+OVMF and real hardware:
> 
> grub> echo $cmdpath
> (cd0)/EFI/BOOT
> 
> grub> ls
> (proc) (memdisk) (cd0) (cd0,apple2) (cd0,apple1) (cd0,msdos2)
> 
> grub> ls (cd0)
> Device cd0: Filesystem type iso9660 - Label 'Debian 12.6.0 amd64 n' ...
> 
> grub> ls (cd0)/
> /boot /css /debian /dists /doc /EFI ...
> 
> The /EFI directory in the ISO9660 filesystem contains a copy of the EFI El
> Torito image contents so that GRUB can find its config file
> (cd0)/EFI/debian/grub.cfg.

Thank you for pointing this out. You're right, (cd0) is actually the
whole cdrom image mounted by the iso9660 filesystem in grub, not the
vfat EFI image. I'll fix the commit message in the next revision.

> 
> The Apple and MSDOS partitions are caused by the hybrid structure of the
> Debian installation image. Partition (cd0,apple2) matches the position of
> the EFI El Torito image but would not exist on a "pure" ISO9660 image.

It seems that saying "When booting from an ISO..." is ambiguous because
it also includes booting hybrid disk ISO images. In this context, bli
wouldn't crash since $cmdpath, the source of the boot location, points
to a partition device. To be more precise, I'll rephrase it to "When
booting from a cdrom...".

Thanks,
Michael

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to