[syslinux] [PATCH] isohybrid: user options

Thomas Schmitt scdbackup at gmx.net
Fri May 15 13:43:02 PDT 2009


Hi,

H. Peter Anvin wrote:
> > > Another option we probably should consider is the non-zero-offset
> > > option,
me:
> > One could position the ISO image on media
> > so that it actually has the matching offset
> > without using it in its inner LBA addresses.
> > (I.e. the image may *not* be made aware of
> >  the offset by e.g. mkisofs option -C 0,offset)
H. Peter Anvin wrote:
> I have no idea what you're trying to say here.

You are right, it would not work.
By preparing a normal ISO image for /dev/sda1 with
non-zero offset it would become unusable with
/dev/sda resp. /dev/cdrom.
So it is not independent of the media type
any more and the charm of isohybrid is gone.

We'd need an unnormal ISO image for that. :))


> The real superblock has
> to be at LBA 16 (and the boot record at LBA 17), otherwise it will not
> boot when written to a real CD-ROM.

I could set it up that the BIOS sees the
MBR at LBA 0, Primary Volume Descriptor at
LBA 16 and El-Torito at LBA 17,
whereas other software sees a copy of them
at the same block addresses of /dev/sda1.

The decisive problem is with the LBA pointers
inside the image. The directory tree knows
the block addresses of data files. Similar
it is with the self-LBA known to boot image.

What could help is two superblocks, two
directory trees, and maybe two boot images.
The session layout would then be:
  Superblock 1 at block 0 of /dev/sda
  Superblock 2 at block 0 of /dev/sda1 
  Directory tree 1 refered by superblock 1 has LBAs for sda
  Directory tree 2 refered by superblock 2 has LBAs for sda1
  Boot image 1 refered from superblock 1 knows its LBA for sda
 (Boot image 2 refered from superblock 2 knows its LBA for sda1)
  Data blocks for files in both trees

Multiple directory trees in one ISO session
are not unusual: Joliet is implemented as
such a second tree.

I am not sure whether "Boot image 2" is needed.
Is it possible to boot in the address space of sda1 ?
If so, then that second boot image would be pointed
to by MBR and El-Torito in the second super block.


> The normal superblock sector is 16.

That's where the Primary Volume Descriptor
is located. But the image begins with 32 kB
of System Area.
mount -o sbsector= obviously refers to that
System Area address and not to the PVD address.

"Superblock" seems to mean the whole 64 kB
head section of an ISO image session.
So the first "superblock" is at LBA 0 of
the media. Each new session starts with
an own "superblock".


> I don't know if it would accept a negative
> sbsector offset

That would still not help with the LBA pointers
of the directory tree.
Example:
  On /dev/sda the content of File /x starts at
  LBA 10000. That would be the number written
  in the ISO directory record for /x.
  If you now mount /dev/sda1 -o sbsector=-64
  then the content of /x begins at sda1 block
  address 9936.
  The directory record (which is displaced itself,
  and will not be found) still bears the address
  10000.


Have a nice day :)

Thomas




More information about the Syslinux mailing list