[syslinux] Proposal: isohybrid MBR template file format
Thomas Schmitt
scdbackup at gmx.net
Sun Mar 14 09:17:27 PDT 2010
Hi,
this is my initial proposal of a format for an
isohybrid MBR template file.
It shall be generated by Syslinux and read by
ISO 9660 generators like mkisofs, genisoimage,
or xorriso, to create an isohybrid image.
Goal is to separate the knowledge about Syslinux
and MBRs from the knowledge about the emerging
ISO image block addresses.
The file consists of a cleartext header section
and a binary payload section.
------------------------------------------------
Example derived from Syslinux-3.72 isohybrid.pl:
Isohybrid-mbr-template-version: 0
Num-h: 64
Num-s: 32
Limit-cc: 1024
Bin-block-field: 432
Payload-size: 512
End-of-headers
...binary.data...
------------------------------------------------
The length of a header line is limited to 255
characters including newline. I.e. it is safe
to read a line into char c[256] and to mark its
end by an extra 0 byte.
The header section begins at byte 0 by line
Isohybrid-mbr-template-version: <version string>
It ends after the newline character of the first
line that says
End-of-headers
The payload section ends after a fixed number
of bytes which is given in header
Payload-size: <number of bytes>
A isohybrid MBR template file shall not hold
more than 32 kB of binary payload.
ISO-variable parameters may get pointed to their
fields in the template.
Currently we have only one that might have a
variable field address. The LBA of isolinux.bin:
Bin-block-field: <Byte address in payload
where to store LBA * 4 >
The other ISO-variable is the number of 2 kB
blocks in the overall image. I understand this
goes to fixed field addresses in the partition
table.
Parameters needed by the ISO generator may be
set by
Num-h: <h as of isohybrid, default is 64>
Num-s: <s as of isohybrid, default is 32>
Limit-cc: <limit for number of cylinders in
partion table fields esect, ecyl,
default is 1024>
(More verbous names would be fine. Proposals ?)
The payload should be readily set up with dummy
values for partition 1 fields esect, ecyl, psize.
The ISO generator will overwrite these fields
with values that match the emerging image size.
Extra overwriting may happen for a field given
by header Bin-block-field.
------------------------------------------------
More headers and target fields may be defined
if needed. An ISO generator should refuse to
process if it encounters an unknown header that
does not begin by
X-
Such headers mark optional info.
Reserved for human readable remarks is
X-Comment: <text>
------------------------------------------------
For the related topic of non-zero offset for
partition 1, we could define header
Partition-1-offset: <number of bytes>
How would this influence the table fields
beginning at byte 446 ?
------------------------------------------------
Have a nice day :)
Thomas
More information about the Syslinux
mailing list