[syslinux] Looking for testers and advise about ISOLINUX within ISO 9660

H. Peter Anvin hpa at zytor.com
Tue Oct 7 16:14:06 PDT 2008


Thomas Schmitt wrote:
> (Although "seek or die" is a very natural
> way to express the intention, i would need
> substantial time to understand the unpack()s.)
> We'll have to implement in C language.

It would be easier for me to rewrite it in C than writing a 
specification, I believe.  Most of this (until line 75), though, is 
specified elsewhere:  most of the code is there simply to parse the El 
Torito records to find out where isolinux.bin is stored in the 
filesystem; you would already have this information.

Once you have that information, the algorith is simply:

- Look for the magic number FB C0 78 70 at offset 64 of isolinux.bin;
- Pad the image with zeroes to a megabyte boundary;
- Write a MBR-style partition table with a single entry which covers the
   entire disk, *starting at zero*.  The code part comes from
   mbr/isohdpfx.S, and at offset 432 we put the LBA of isolinux.bin.


pack() and unpack() are ways to convert between numbers and binary 
strings in Perl.  In C you would usually use a structure for the saem thing.

"C" = unsigned byte
"V" = littleendian 32-bit number
"v" = littleendian 16-bit number
"a" = ASCII scharacter

A number following means "this many"; in particular "a71V" means a 
71-byte ASCII string (not necessarily null-terminated!) followed by a 
32-bit littleendian number.

	-hpa




More information about the Syslinux mailing list