[syslinux] "isolinux.bin missing or corrupt" when booting USB flash drive in old PC
Thomas Schmitt
scdbackup at gmx.net
Sun Mar 26 07:45:31 PDT 2017
Hi,
Gene Cumm wrote:
> it seems the stack format got
> set, changed, then mostly reverted back, with this code being the last
> piece missing from 2009.
The commit to isohdpfx.S of 2009-05-31 looks incomplete.
The sequence of the stack pointers was swapped, but the sequence of
stack pushes was not.
https://git.kernel.org/pub/scm/boot/syslinux/syslinux.git/commit/mbr/isohdpfx.S?id=2f92affcce5ffef4da90fe44bcac5a4db45df25f
> Finding a system that
> doesn't seem to properly support LBA/EBIOS reads is increasingly
> difficult due to age.
It is now easier to force C/H/S for both MBR and isolinux.bin because
of the "Clear EBIOS flag" code piece.
A isohdpfc with "jmp" instead of "jc" after INT 13 AH 41, derived from
the new code would instruct isolinux.bin to use C/H/S addressing, too.
I just tested this replacement by locating the "jc" instruction by its
neighbor "cmpw $0xaa55, %bx" at byte 88 and changing it to "jmp":
echo -n $'\xeb' | dd conv=notrunc bs=1 seek=88 count=1 of="$iso"
It still boots in qemu to the first graphical Debian menu.
The "ISOLINUX 6.03 ..." messages vanishes too fast for my eyes.
So i damage the ISO to prevent booting the Debian payload.
For that purpose i obtain the 2048-block address of isolinux.cfg
xorriso -indev "$iso" -find /isolinux/isolinux.cfg -exec report_lba --
This reports:
Report layout: xt , Startlba , Blocks , Filesize , ISO image path
File data lba: 0 , 303939 , 1 , 157 , '/isolinux/isolinux.cfg'
I flatten its content block to zero:
dd if=/dev/zero conv=notrunc bs=2048 count=1 seek=303939 of="$iso"
Now booting by qemu says
ISOLINUX 6.03 20150819 CHDD Copyright ...and.so.on...
No DEFAULT or UI configuration directive found!
boot:
"CHDD" confirms that the slightly modified MBR really told isolinux.bin
to use C/H/S addressing although SeaBIOS advertises LBA.
Our previous qemu experiments with the old MBR code did not bring
isolinux.bin to C/H/S so that Martin and i did not see the stack
interface problem on the first hand.
Have a nice day :)
Thomas
More information about the Syslinux
mailing list