[syslinux] port syslinux isohybrid perl script to C

Thomas Schmitt scdbackup at gmx.net
Sat Apr 10 12:53:31 PDT 2010


Hi,

i have implemented the prescriptions of
  http://syslinux.zytor.com/archives/2010-March/014054.html

by xorriso -as mkisofs emulation option

  -isohybrid-mbr FILE    Set SYSLINUX mbr/isohdp[fp]x*.bin for isohybrid

which copies up to 32 kB from FILE to the start
of the ISO image and then applies the prescribed
isohybrid procedure.

Only the prescribed default values get applied
yet. If testers show up, then adjustable
parameters might get implemented.


------------------------------------------------

Question to hpa about the legal status:

Do you claim copyright on the implementation 
of 2010-March/014054.html ?

If so, then:
  Do you agree that it is a contribution to the
  existing isohybrid code in libisofs which is
  currently
     copyright 2002-2008 H. Peter Anvin
           and 2008-2009 Thomas Schmitt
     under "either the LGPL or the MIT/ISC/2-clause BSD licenses"
  and would become
     copyright 2002-2010 H. Peter Anvin
           and 2008-2010 Thomas Schmitt
     under "either the LGPL or the MIT/ISC/2-clause BSD licenses"

  If not:
     What license would be possible ?

If no copyright claim is made, then i would make
it
     copyright 2002-2008 H. Peter Anvin
           and 2008-2010 Thomas Schmitt
     under "either the LGPL or the MIT/ISC/2-clause BSD licenses"

I plan to offer it to cdrkit and cdrtools.
It could also be the core function of an
isohybrid.c program which replaces isohybrid.pl.


The new MBR manipulation code can be inspected at
  http://bazaar.launchpad.net/%7Elibburnia-team/libisofs/scdbackup/annotate/head%3A/libisofs/make_isohybrid_mbr.c#L238

(The old deprecated function is still available
 in libisofs but not reachable by xorriso any
 more, unless an undocumented compile time macro
 is set.) 


------------------------------------------------

Small problem within the prescription:

  -> Head count		(default 64, range 1-256)

contradicts

  if (c >= 1024):
     ...
     h = head_count

Either the range is (1-255) of h has to become
     h = head_count - 1

Which alternative to choose ?


------------------------------------------------

The name of the option might get changed if
genisoimage or mkisofs are willing to adopt it.
xorriso -as mkisofs will nevertheless continue
to understand "-isohybrid-mbr" additionally to
any new names.


------------------------------------------------

As test i exercised the mkisofs example of
  http://syslinux.zytor.com/wiki/index.php/ISOLINUX
with the new option added.

I installed
  http://scdbackup.sourceforge.net/xorriso-0.5.3.tar.gz
by
  tar xzf xorriso-0.5.3.tar.gz
  cd xorriso-0.5.3
  ./configure && make

As file set i used the ISO image of RIPLinux-9.3
which is already treated by isohybrid.pl.
So i took it as source of the files and of the
System Area data:

  dd if=RIPLinux-9.3-non-X.iso bs=32K count=1 of=mbr_file
  mount -t iso9660 -o loop RIPLinux-9.3-non-X.iso /mnt
  find /mnt -name isolinux.bin
  find /mnt -name boot.cat

I packed it up into a new image by help
of the freshly compiled program:

  ./xorriso/xorriso -as mkisofs -o output.iso \
     -b boot/isolinux/isolinux.bin -c boot/boot.cat \
     -no-emul-boot -boot-load-size 4 -boot-info-table \
     -isohybrid-mbr mbr_file \
     /mnt

This boots from CD and from USB stick.

Image size and especially LBA of isolinux.bin differ
from the original RIPLinux-9.3-non-X.iso .
So it was a realistic test, i believe.


------------------------------------------------

Have a nice day :)

Thomas




More information about the Syslinux mailing list