* [PATCH] util/grub-mkrescue: specify -iso-level 3 in xorriso options
@ 2023-09-20 5:39 jeffbai
2023-09-20 7:17 ` Thomas Schmitt
0 siblings, 1 reply; 4+ messages in thread
From: jeffbai @ 2023-09-20 5:39 UTC (permalink / raw)
To: grub-devel
This is needed for architectures whose EFI executables has file names
that
exceeds the 8.3 (extension.suffix) convention, such as LoongArch64
(bootloongarch64.efi).
Signed-off-by: Mingcong Bai <jeffbai@aosc.io>
---
util/grub-mkrescue.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/util/grub-mkrescue.c b/util/grub-mkrescue.c
index abcc1c2f5..27696e034 100644
--- a/util/grub-mkrescue.c
+++ b/util/grub-mkrescue.c
@@ -514,6 +514,8 @@ main (int argc, char *argv[])
xorriso_push ("-as");
xorriso_push ("mkisofs");
xorriso_push ("-graft-points");
+ xorriso_push ("-iso-level");
+ xorriso_push ("3");
iso9660_dir = grub_util_make_temporary_dir ();
grub_util_info ("temporary iso9660 dir is `%s'", iso9660_dir);
--
2.39.1
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] util/grub-mkrescue: specify -iso-level 3 in xorriso options
2023-09-20 5:39 [PATCH] util/grub-mkrescue: specify -iso-level 3 in xorriso options jeffbai
@ 2023-09-20 7:17 ` Thomas Schmitt
2023-09-20 7:53 ` Gerd Hoffmann
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Schmitt @ 2023-09-20 7:17 UTC (permalink / raw)
To: grub-devel; +Cc: jeffbai
Hi,
Mingcong Bai <jeffbai@aosc.io> wrote:
> This is needed for architectures whose EFI executables has file names that
> exceeds the 8.3 (extension.suffix) convention, such as LoongArch64
> (bootloongarch64.efi).
In general -iso-level 3 is a harmless setting if the reading operating
system is Linux or MS-Windows. On other reading system your mileage may
vary. In any case level 3 is harmless if it is not actually needed, i.e.
all file names are 8.3 and all files are smaller than 4 GiB.
But i wonder:
- Why level 3 and not 2 ?
If it is only about file name length, then -iso-level 2 would suffice
and not enable file sizes of 4 GiB and larger. Such files have to be
represented by more than one extent, which might be not supported by
the BSDs and other systems.
Especially in grub-core/fs/iso9660.c function grub_iso9660_read() i see
a remark: "XXX: The file is stored in as a single extent" and cannot
spot provisions to read more than one directory entry per file.
So i doubt that GRUB is prepared for multi-extent files.
(If somebody wants to test: libcdio has a small ISO image
https://git.savannah.gnu.org/cgit/libcdio.git/tree/test/data/multi_extent_8k.iso
of size 122 KB with artificially small extent size. So its file
/multi_extent_file bears 8 extents although it has only 54 KB of size.
Compare GRUB's representation of the file with that of GNU/Linux.)
- Why is the name bootloongarch64.efi a problem in the ISO filesystem ?
The name length restriction of -iso-level 1 applies only to the dull
ISO 9660 names, but not to Rock Ridge names, which GRUB uses if present.
(Other than mkisofs or genisoimage, xorriso produces Rock Ridge by
default. Just don't use option --norock.)
Have a nice day :)
Thomas
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] util/grub-mkrescue: specify -iso-level 3 in xorriso options
2023-09-20 7:17 ` Thomas Schmitt
@ 2023-09-20 7:53 ` Gerd Hoffmann
2023-09-20 9:16 ` Thomas Schmitt
0 siblings, 1 reply; 4+ messages in thread
From: Gerd Hoffmann @ 2023-09-20 7:53 UTC (permalink / raw)
To: The development of GNU GRUB; +Cc: jeffbai
Hi,
> - Why is the name bootloongarch64.efi a problem in the ISO filesystem ?
>
> The name length restriction of -iso-level 1 applies only to the dull
> ISO 9660 names, but not to Rock Ridge names, which GRUB uses if present.
I doubt the vfat driver of the uefi firmware supports rock ride,
and that is the driver used to load efi/boot/bootloongarch64.efi
because grub is not yet loaded ...
take care,
Gerd
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] util/grub-mkrescue: specify -iso-level 3 in xorriso options
2023-09-20 7:53 ` Gerd Hoffmann
@ 2023-09-20 9:16 ` Thomas Schmitt
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Schmitt @ 2023-09-20 9:16 UTC (permalink / raw)
To: grub-devel; +Cc: jeffbai
Hi,
Gerd Hoffmann <kraxel@redhat.com> wrote:
> I doubt the vfat driver of the uefi firmware supports rock ride,
> and that is the driver used to load efi/boot/bootloongarch64.efi
> because grub is not yet loaded ...
xorrisofs option -iso-level 3 has no effect on the FAT filesystem in
the EFI boot image (/efi.img in the grub-mkrescue ISO). xorriso takes this
file as opaque input and just advertises it to the firmware.
Whether grub-mkrescue can represent "bootloongarch64.efi" in FAT is a
matter of the helper programs "mformat" and "mcopy". See line 845 ff. of
util/grub-mkrescue.c . Line 813 ff. shows that it already uses long names
"bootriscv32.efi" and "bootriscv64.efi
The effect of xorrisofs option -iso-level is descibed in the man page of
xorrisofs:
-iso-level number
Specify the ISO 9660 version which defines the limitations of
file naming and data file size. The naming restrictions do not
apply to the Rock Ridge names but only to the low-level ISO 9660
names. There are three conformance levels:
Level 1 allows ISO names of the form 8.3 and file size up to 4
GiB - 1.
Level 2 allows ISO names with up to 32 characters and file size
up to 4 GiB - 1.
Level 3 allows ISO names with up to 32 characters and file size
of up to 400 GiB - 200 KiB. (This size limitation is set by the
xorriso implementation and not by ISO 9660 which would allow
nearly 8 TiB.)
Pseudo-level 4 enables production of an additional ISO 9660:1999
directory tree.
Levels 1 to 3 are specified in ECMA-119, 10 "Levels of interchange".
Pseudo-level 4 is an invention of mkisofs, although it would have been
better to give the ISO 9660:1999 tree an own option, like for Joliet.
Have a nice day :)
Thomas
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-09-20 9:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-20 5:39 [PATCH] util/grub-mkrescue: specify -iso-level 3 in xorriso options jeffbai
2023-09-20 7:17 ` Thomas Schmitt
2023-09-20 7:53 ` Gerd Hoffmann
2023-09-20 9:16 ` Thomas Schmitt
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.