[syslinux] "isolinux.bin missing or corrupt" when booting USB flash drive in old PC
David Christensen
dpchrist at holgerdanske.com
Sat Mar 18 19:40:57 PDT 2017
On 03/18/2017 03:02 PM, Thomas Schmitt via Syslinux wrote:
> Hi,
>
> David Christensen wrote:
>> I use this USB flash drive for bootable installer images; I do not
>> attempt to mount it. I don't know that I could, even if I wanted to:
>
> mkdir /mnt/iso
> mount /dev/sdc /mnt/iso
>
> or, because partition 1 starts at block 0, you may mount it too
>
> mount /dev/sdc1 /mnt/iso
Or, using a loop device and the *.iso file:
2017-03-18 17:31:22 root at cd2533 ~
# mkdir /mnt/iso
2017-03-18 17:48:16 root at cd2533 ~
# losetup -d /dev/loop0
2017-03-18 17:51:32 root at cd2533 ~
# losetup -r -f
/var/local/data/dpchrist/iso/debian/8.7.1/i386/debian-8.7.1-i386-xfce-CD-1.iso
2017-03-18 17:52:13 root at cd2533 ~
# losetup -a
/dev/loop0: [fe02]:126616474
(/var/local/data/dpchrist/iso/debian/8.7.1/i386/debian-8.7.1-i386-xfce-CD-1.iso)
2017-03-18 17:52:48 root at cd2533 ~
# mount /dev/loop0 /mnt/iso
mount: block device /dev/loop0 is write-protected, mounting read-only
2017-03-18 17:53:50 root at cd2533 ~
# mount | grep loop0
/dev/loop0 on /mnt/iso type iso9660 (ro,relatime)
2017-03-18 17:53:53 root at cd2533 ~
# ll /mnt/iso
total 1152
dr-xr-xr-x 1 root root 4096 2017/01/16 02:11:29 ./
drwxr-xr-x 7 root root 4096 2017/03/18 17:31:46 ../
dr-xr-xr-x 1 root root 2048 2017/01/16 02:11:29 .disk/
-r--r--r-- 1 root root 9473 2017/01/16 02:11:29 README.html
-r--r--r-- 1 root root 190914 2017/01/14 05:52:20 README.mirrors.html
-r--r--r-- 1 root root 103482 2017/01/14 05:52:20 README.mirrors.txt
-r--r--r-- 1 root root 461 2017/01/16 02:09:49 README.source
-r--r--r-- 1 root root 6001 2017/01/16 02:11:29 README.txt
-r--r--r-- 1 root root 146 2017/01/16 02:09:47 autorun.inf
dr-xr-xr-x 1 root root 2048 2017/01/16 02:09:49 boot/
dr-xr-xr-x 1 root root 2048 2017/01/16 02:09:47 css/
lr-xr-xr-x 1 root root 1 2017/01/16 02:09:45 debian -> ./
dr-xr-xr-x 1 root root 2048 2017/01/16 02:09:47 dists/
dr-xr-xr-x 1 root root 4096 2017/01/16 02:09:46 doc/
dr-xr-xr-x 1 root root 2048 2017/01/16 02:09:49 efi/
dr-xr-xr-x 1 root root 2048 2017/01/16 02:09:59 firmware/
-r--r--r-- 1 root root 180335 2017/01/10 13:19:04 g2ldr
-r--r--r-- 1 root root 8192 2017/01/10 13:19:04 g2ldr.mbr
dr-xr-xr-x 1 root root 2048 2017/01/16 02:09:45 install/
dr-xr-xr-x 1 root root 2048 2017/01/16 02:09:49 install.386/
dr-xr-xr-x 1 root root 4096 2017/01/16 02:09:49 isolinux/
-r--r--r-- 1 root root 268674 2017/01/16 02:11:29 md5sum.txt
dr-xr-xr-x 1 root root 4096 2017/01/16 02:09:47 pics/
dr-xr-xr-x 1 root root 2048 2017/01/16 02:09:50 pool/
-r--r--r-- 1 root root 368480 2017/01/10 13:19:04 setup.exe
dr-xr-xr-x 1 root root 2048 2017/01/16 02:09:47 tools/
-r--r--r-- 1 root root 228 2017/01/16 02:09:47 win32-loader.ini
>> I need a debugging version of whatever program is generating the error
>> message "isolinux.bin missing or corrupt".
>
> That would be the MBR code at bytes 0 to 432 of the ISO.
> Source code (assembler) is at
> http://git.zytor.com/syslinux/syslinux.git/tree/mbr/isohdpfx.S
I see the source code for the error message:
bad_signature:
call error
.ascii "isolinux.bin missing or corrupt.\r\n"
And the machine code:
2017-03-18 18:06:56 root at cd2533 ~
# dd
if=/var/local/data/dpchrist/iso/debian/8.7.1/i386/debian-8.7.1-i386-xfce-CD-1.iso
bs=1 skip=177 count=37 2>/dev/null | hexdump -C
00000000 e8 83 00 69 73 6f 6c 69 6e 75 78 2e 62 69 6e 20
|...isolinux.bin |
00000010 6d 69 73 73 69 6e 67 20 6f 72 20 63 6f 72 72 75 |missing or
corru|
00000020 70 74 2e 0d 0a |pt...|
00000025
It looks like the call to "error" (line 276) is made if a summation of
the bytes in the first four sectors of a partition don't add up to
HYBRID_MAGIC (?).
> It's a very narrow piece of space for a program. One may re-use the
> "nop" bytes at label "_start:". They serve as fake Apple Partition Map
> header block.
> If the first ".byte 0x33, 0xed" before the "nop"s gets removed then the
> second one after the "nop"s needs to be removed, too.
>
> One could hardcode the block address of "isolinux.bin" (8444 decimal)
> and inspect or print the bytes read from there via BIOS INT 13H
> (see https://en.wikipedia.org/wiki/INT_13H).
> Next one would try on Linux to find the block iaddress which yields that
> content.
>
> Further one could try to find out whether "we have EBIOS" with LBA
> addressing or "CBIOS" with Cylinder/Head/Sector addressing.
> If CBIOS, INT 13 with AH 6 is used for reading, else AH 42.
> If C/H/S and if the EBIOS assumes a different size of head and cylinder
> than the MBR does ... that would explain a mislead read attempt.
> But i understand that INT 13 with AH 8 is used to inquire the C/H/S
> factors from the BIOS in line 176 ff. So if the BIOS does not lie then
> the computation at label "read_sector_cbios:" should be correct.
>
> Regrettably i still have 4560 pages of the Intel processor manual to read
> before i can start to handcode an MBR. ~:o)
There is the processor, and then there is the system (chipset, BIOS) in
which the processor resides.
Figuring out why debian-8.7.1-i386-xfce-CD-1.iso works on CD, but
doesn't work on USB, in my D8765GBFLK systems would require more effort
that I am interested in expending.
Hundreds of millions of 32-bit Intel Pentium 4-class and higher
computers have been manufactured since 2000, many of which still work
and could be put to use.
debian-8.7.1-i386-xfce-CD-1.iso is really a 32-bit live Linux image with
just a few applications -- rescue shell, installer, etc.. I'd like to
create my own custom live Linux images with the applications of my
choosing for computers such as the above. USB images are of more
interest to me than CD images, because optical drives wear out in older
computers and many newer computers omit optical drives.
Is there a way I can build live 32-bit Debian GNU/Linux USB images
without isohdpfx.S and syslinux.bin?
Is there another 32-bit GNU/Linux distribution that is better suited to
my purpose?
David
More information about the Syslinux
mailing list