Hi Thomas. Thanks for replying.
On 2022.06.07 08:16, Thomas Schmitt wrote:
we will point out that we consider it
should really be the job of xorriso, rather than grub-mkrescue, to
accomplish this duplication (hence why I am CC'ing Thomas), but we don't
know the technical difficulties that result from trying to map back the
content of a FAT image back onto the ISO9660 structure.
xorriso would have to learn to unpack FAT filesystems. But FAT is not
really the topic of xorriso.
Given that the FAT filesystem is freshly composed by grub-mkrescue from a
readily prepared file tree on disk, i deem it more straightforward that
grub-mkrescue simply tells xorriso to put this tree into the ISO.
I agree that, in the case of grub-mkrescue, not having FAT unpacking in
xorriso is not a major problem because we can easily sort it out.
My concern however lies with usage of xorriso outside the context of
grub-mkrescue (so maybe part of this discussion is off-topic), where
folks are going to be creating non GRUB based EFI ISOHybrid boot media,
and use an efi.img as part of it on account that they've seen other
projects do it, without realizing that they too should duplicate the
efi.img content.
One example I have in mind is Solus, which is Syslinux based (or at
least was Syslinux based last time I checked) with an efi.img based
ISOHybrid, and where what we're doing for GRUB won't help.
So I do feel that xorriso will have to bite the bullet eventually and
make sure that it unpacks the content of efi.img on its own.
Now, if you do agree with this general idea, then I *may* send you a
patch, since I'm doing something similar in Rufus [1] (precisely on
account that xorriso is not unpacking the content onto the ISO9660 file
system structure, and I have to compensate for it). If I do that
however, I should point out that this code will be based primarily on
Syslinux's libfat [2] and also that, since it'll probably be a while
before I do, we're still going to need that GRUB patch in the interim...
Either implicitely by having it in iso9660_dir (as patch [2/3] proposes)
or explicitely by a pathspec (like /efi=...temporary.disk.path...).
In the latter case the temporary disk file tree has to survive until the
xorriso run is finished.
I guess I'll let the GRUB project maintainers decide which of these 2
approach they like best. I can amend my patchset if needed.
Regards,
/Pete
[1]
https://github.com/pbatard/rufus/blob/746f91acc769b2b5b4ad44a31a1aa70e5619ae57/src/iso.c#L1531-L1663
[2] https://github.com/pbatard/rufus/tree/master/src/syslinux/libfat
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel