Re: remastering ISOs to append boot options
Hello,
On Mon, Jul 06, 2009 at 10:46:01AM -0500, Joseph Rawson wrote:
> On Sunday 05 July 2009 19:42:19 Samuel Thibault wrote:
> > Hello,
> >
> > Some a11y people asked how to very easily remaster ISOs so as to append
> > parameters to the kernel command line, to e.g. setup the braille
> > configuration once for good before burning a CD. I've prepared a small
> > crude script to do that on
> >
> > http://people.debian.org/~sthibault/remaster-append.sh
> >
> > it depends on the bsdtar and genisoimage packages, sample use is
> >
> > remaster-append.sh "brltty=eu,ttyS-1,fr_FR"
> > debian-testing-i386-businesscard.iso myimage.iso
An easier way (for the non-iso-expert user) would be modifying the .iso
file directly by exchanging content inside the isolinux.cfg file with no
size change, using a script or program. We have done this in Knoppix a
while ago, in order to modify boot options right before burning the iso,
without the need to remaster, when we first only provided the german
versions of the image.
Ann (ancient) C program for modifying el torito floppy emulation
bootable iso9660 filesystem images can be found here:
http://ftp.uni-kl.de/pub/linux/knoppix/knoppix-customize/
Modern distros use "no emulation" boot, which is actually easier to
handle than the floppy-based method. The C program could be rewritten in
order to handle this, but personally, I think that a simple shell script
using sed or perl would suffice.
[Start of] discussion:
Changes to isolinux.cfg inside a .iso image must not
exceed or even change the space allocated by the file
inside the image. Therefore, dummy lines (comments)
could be used to pre-allocate space in isolinux.cfg, so
that it is possible to actually ADD stuff without having to overwrite
existing lines.
Advantage: You don't need additional space. With a pipe-mode script, you
can even feed the resulting image directly into cdrecord/wodim, so that
no writable disk or ram space is needed at all for intermediate steps.
Size and content as well as all file locations in the iso file remain
as they are.
Disadvantage: Space for changes is limited by the original isolinux.cfg
size, no files can be added, the method is only changing existing files.
Regards
-Klaus Knopper
Reply to: