[syslinux] isohybrid and ISO images whose size is not a multiple of 2048 bytes vs. VirtualBox

Thomas Schmitt scdbackup at gmx.net
Thu May 7 13:23:20 PDT 2015


Hi,

intrigeri wrote:
> Just to be clear, is what follows the patch that we at Tails are
> supposed to try?

Yes. It is supposed to implement Ady's proposal to increase
the number of cylinders if their size is not divisible by
2048 bytes. The smallest suitable number gets computed from
prime factor considerations.

Ady's proposal preserves the traditional cylinder size
for large images at the cost of possibly substantial padding.

My own proposal was to run unchanged isohybrid with -h 252 -s 63,
which yields a cylinder size of 8128512 = 3969 * 2048 and thus
cannot cause misalignment to 2048 bytes.


Ady wrote:
> Perhaps Thomas might be interested / curious to evaluate the image for 
> TAILS 1.4-RC

I'm always interested in boot equipment of ISOs.
http://dl.amnesia.boum.org/tails/alpha/tails-i386-1.4~rc1/tails-i386-1.4~rc1.iso

It's a BIOS-only isohybrid.
xorriso-1.3.9 proposes for re-building these -as mkisofs options:

  -isohybrid-mbr /local/disk/path/to/syslinux/file/isohdpfx.bin
  -partition_cyl_align on
  -partition_offset 0
  -partition_hd_cyl 255
  -partition_sec_hd 63

  -c '/isolinux/boot.cat'
  -b '/isolinux/isolinux.bin'
  -no-emul-boot
  -boot-load-size 4
  -boot-info-table

The first group of options is specific to xorriso.
The second group are traditional mkisofs options (although real
mkisofs would fail by the absolute paths in the ISO).

A repacking run with above options complains
  libisofs: WARNING : Cylinder size 8225280 not divisible by 2048. Cannot align partition.
and then produces a partition which is not cylinder aligned.
This lets fdisk issue its usual (and quite clueless) complaint:
  Partition 1 has different physical/logical endings:

The ISO image is always aligned to 2048 bytes, of course.

If i repack it with
  -partition_hd_cyl 252
then xorriso reports
  libisofs: NOTE : Aligned image size to cylinder size by 2474 blocks
and fdisk is happy.

If i do not give an explicit cylinder geometry but leave the choice
to xorriso, i get
  libisofs: NOTE : Aligned image size to cylinder size by 179 blocks
Inspection of the ISO shows that it has chosen 64 x 32.


intrigeri wrote:
> > Also, personally I feel welcome on this
> > mailing-list, and have no experience with the xorriso community.

Ady wrote:
> Well, Thomas (who wrote the patch for isohybrid you were referring to) 
> is the developer of xorriso, so you are in good hands :).

I try hard to stay neutral towards boot loader systems.
And as long as mkisofs or genisoimage suffice for the intended
purpose, there is no reason to replace them by xorriso.


Have a nice day :)

Thomas



More information about the Syslinux mailing list