Migrations to xorriso
Hello, all. I would like to announce that as discussed before grub-mkisofs was removed and we switched to xorriso.
In the same time grub-mkrescue is able to handle efi, coreboot and qemu. In the later 2 cases you need to use a coreboot.elf/qemu.img as coreboot payload/qemu rom. It can be found either on iso filesystem or in a directory supplied by --rom-directory option
@Thomas: grub-mkisofs was partially translated. Could you look into reusing translation strings for xorriso?
Signature · 2 lines
Regards Vladimir 'φ-coder/phcoder' Serbinenko
Hi,
i sent this message 4 hours ago but it did not show up yet. So i send it again on the risk to produce a duplicate.
------------------------------------------------
While my local bzr upgrade problems still persist i can view grub-mkrescue.in at
https://code.launchpad.net/~vcs-imports/grub/grub2-bzr
Quoted 1 line
xorriso -pathspecs on -as mkisofs
I would make this
xorriso -report_about HINT -as mkisofs -graft-points
Option -report_about HINT will reduce verbosity to the level of messages about unusual events and remedy proposals.
Since xorriso is run in mkisofs emulation, it seems clearer to use -graft-points rather than xorriso option -pathspecs.
Review
Quoted 2 lines
(quoted diff) +0
-2-as mkisofs ${grub_mkisofs_arguments} --protective-msdos-label -o ${output_image} -r ${iso9660_dir} ${source}
The potential content of ${grub_mkisofs_arguments} looks good so far.
I assume you have already tested your use cases.
There remain opportunities for result size reduction:
The result will be up to 426 kB larger than the one of grub-mkisofs. (Modern mkisofs or genisoimage would give you 300 kB extra.)
------------------------------------------------
You may add mkisofs option
-no-pad
to avoid trailing padding of 300 kB which is only needed if you later burn the image to a CD in write mode TAO.
Alternatively you could allow option -no-pad in the option interpreter of grub-mkrescue rather than issueing:
-*)
echo "Unrecognized option \`$option'" 1>&2
The burn program can eventually add padding. xorriso -as cdrecord will by default use write mode SAO if the file size is detectable.
------------------------------------------------
Another 64 to 126 kB can be saved by hiding the fact that the target is a random access file. One would replace
-o ${output_image}
by
| cat >${output_image}This deprives the result of the capability to show on overwriteable media a table-of-content with older sessions.
------------------------------------------------
In my tests the size reduced result was 4 kB smaller than the result from grub-mkisofs.
Have a nice day :)
Thomas
Hi,
while my local bzr upgrade problems still persist i can view grub-mkrescue.in at
https://code.launchpad.net/~vcs-imports/grub/grub2-bzr
Quoted 1 line
xorriso -pathspecs on -as mkisofs
I would make this
xorriso -report_about HINT -as mkisofs -graft-points
Option -report_about HINT will reduce verbosity to the level of messages about unusual events and remedy proposals.
Since xorriso is run in mkisofs emulation, it seems clearer to use -graft-points rather than xorriso option -pathspecs.
Review
Quoted 2 lines
(quoted diff) +0
-2-as mkisofs ${grub_mkisofs_arguments} --protective-msdos-label -o ${output_image} -r ${iso9660_dir} ${source}
The potential content of ${grub_mkisofs_arguments} looks good so far.
I assume you have already tested your use cases.
There remain opportunities for result size reduction:
The result will be up to 426 kB larger than the one of grub-mkisofs. (Modern mkisofs or genisoimage would give you 300 kB extra.)
------------------------------------------------
You may add mkisofs option
-no-pad
to avoid trailing padding of 300 kB which is only needed if you later burn the image to a CD in write mode TAO.
Alternatively you could allow option -no-pad in the option interpreter of grub-mkrescue rather than issueing:
-*)
echo "Unrecognized option \`$option'" 1>&2
The burn program can eventually add padding. xorriso -as cdrecord will by default use write mode SAO if the file size is detectable.
------------------------------------------------
Another 64 to 126 kB can be saved by hiding the fact that the target is a random access file. One would replace
-o ${output_image}
by
| cat >${output_image}This deprives the result of the capability to show on overwriteable media a table-of-content with older sessions.
------------------------------------------------
In my tests the size reduced result was 4 kB smaller than the result from grub-mkisofs.
Have a nice day :)
Thomas
Hi,
reviewing my grub-mkrescue 1.98 test script i see these options which will cause the files in /boot to have low block addresses:
xorriso ... -as mkisofs ... \ --sort-weight 0 / --sort-weight 1 /boot \ ...
The boot catalog gets a low LBA by default.
I remember Vladimir mentioned that some BIOSes need low addresses.
So probably one should add these options to grub-mkrescue.in.
Quoted 2 lines · Vladimir Serbinenko
@Thomas: grub-mkisofs was partially translated. Could you look into reusing translation strings for xorriso?
Currently there is no internationalization in xorriso. I would probably need some advise and an interested translator to make it ready for that.
Have a nice day :)
Thomas
Quoted 10 lines · Thomas Schmitt
Hi,
reviewing my grub-mkrescue 1.98 test script i see these options which will cause the files in /boot to have low block addresses:
xorriso ... -as mkisofs ... \ --sort-weight 0 / --sort-weight 1 /boot \ ...
Quoted 8 lines
The boot catalog gets a low LBA by default.
I remember Vladimir mentioned that some BIOSes need low addresses.
So probably one should add these options to grub-mkrescue.in.
Ok, will do.
Quoted 12 lines
Quoted 3 lines · Vladimir Serbinenko
@Thomas: grub-mkisofs was partially translated. Could you look into reusing translation strings for xorriso?
Currently there is no internationalization in xorriso. I would probably need some advise and an interested translator to make it ready for that.
Actually it seems that xorriso doesn't have a lot of common strings with grub-mkisofs so probably there is no much value in reusing strings. As for advice: you already have automake so adding gettext should be easy change in Makefile.am followed by marking all translatable strings with _() and including proper header.
But the hic is if xorriso uses any likeprintf("Device %s is %s.", devname, valid ? "valid" : "invalid"); will need to be changed to:printf(valid ?_("Device %s is valid."):_("Device %s is invalid."), devname); since string operations are untranslatable.
Quoted 12 lines
Have a nice day :)
Thomas
_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel
Signature · 2 lines
Regards Vladimir 'φ-coder/phcoder' Serbinenko
Hi,
Quoted 3 lines
I'm thinking to allow passing arbitrary options to xorriso by just putting it on command line.
Do you recommend to switching to native xorriso interface?
There are differences how file names without "=" are handled.
xorriso maps /my/dir to /my/dir.
xorriso -as mkisofs maps /my/dir to /dir. Since i expect scripts to operate grub-mkrescue, i would be cautious with this change.
Lifting the ban on -*) would allow the user to switch to xorriso CLI by giving argument "--". grub-mkrescue would just have to put any unknown argument into ${source}.
E.g.
grub-mkrescue \
--output=result.iso \
-no-pad /my/os /my/payload \
-- \
-set_filter_r --zisofs /payload --(I imagine that /os would be able to read the
zisofs compressed /payload after booting.)
Quoted 4 lines
This size saving matters only for floppies.
Perhaps we should add an
option --pcfloppy which will additionally
disable all other platforms.
Sounds like a good idea.
Quoted 2 lines
Also I find the way of configuring with "| cat >" quite ugly. Is there a reason not to have an option for this behaviour?
It happens automatically deep under xorriso. xorriso sees the output file as libburn drive. libburn recognizes the file type and chooses an appropriate drive model: overwriteable or sequential. xorriso then reacts on this choice.
I could introduce an option. But one would then have to wait for the next xorriso release to become available in Debian.
So for now it seems better to use cat, if a thorough diet is desired.
Quoted 4 lines
Quoted 1 line
internationalization
[...] gettext [...]
But the hic is if xorriso uses any likeprintf("Device %s is %s.", devname, valid ? "valid" : "invalid");
I would have to review the code for this. xorriso -report_about HINT will not issue much entertaining messages anyway.
(In general i believe it helps world peace if
everybody learns some english.)
Quoted 3 lines · Seth Goldberg
Solaris uses a ISO9660 filesystem image with individual compressed files, [...]
The value to grub2, though, is unknown.
Compression seems appealing for CD images with large payload or for old USB sticks. Since the files of GRUB are small, one can restrict compression to the other files of the image, so that GRUB is not affected.
zisofs has the advantage to allow random access inside the compressed files. User space does not have to be aware of it. I have even experienced better read speed on slow media. The compression ratio is slightly inferior to plain gzip, though.
Have a nice day :)
Thomas