Martin Str|mberg
2017-Mar-20 05:41 UTC
[syslinux] "isolinux.bin missing or corrupt" when booting USB flash drive in old PC
Thomas Schmitt wrote:> So if we had a MBR which prints the content of the first 512 read bytes > we could tell whether they are block aligned and from which block they > come.Ok. I'll try. Is it the isohdppx or isohdpfx (or both) that is relevant? Meanwhile I have a hacked isohdppx.bin that prints: G if GPT M if MBR <nothing> if no partition info E if EBIOS C if not EBIOS (from "CHS"). For isohdpfx.bin it will print: E if EBIOS C if not EBIOS (from "CHS"). Is that interesting for you/us? Further how do I test that I haven't done anything really stupid? I have debian install .isos e. g. debian-8.7.0-i386-CD-1.iso and debian-8.7.0-i386-DVD-1.iso. I can boot these with qemu. But where shall I insert this creation of mine. -- MartinS
Thomas Schmitt
2017-Mar-20 07:57 UTC
[syslinux] "isolinux.bin missing or corrupt" when booting USB flash drive in old PC
Hi, MartinS wrote:> Is it the isohdppx or isohdpfx (or both) that is relevant?The file /.disk/mkisofs in the ISO tells that option -isohybrid-mbr syslinux/usr/lib/ISOLINUX/isohdpfx.bin was used. (This file is a Debian specialty.) I guess you can see at the first bytes of the ISO that the partition interpreter code is not there.> For isohdpfx.bin it will print: > E if EBIOS > C if not EBIOS (from "CHS"). > Is that interesting for you/us?It will tell us whether C/H/S addressing is a suspect. My main point of interest is which block is really loaded as first one of isolinux.bin. My program block_seq.c to create a stream with recognizable block content is: ------------------------------------------------------------------ #include <unistd.h> int main() { int ret; unsigned int i, j, k; char buf[512]; for(i= 0; ; i++) { for(j= 0; j < 128; j++) for(k= 0; k < 4; k++) buf[4 * j + k]= (i >> (24 - 8 * k)) & 0xff; ret= write(1, buf, 512); if(ret != 512) break; } return 0; } ------------------------------------------------------------------ (It could be shorter if i did not insist in big endian words.) To be compiled by cc -o block_seq block_seq.c and used like ./block_seq | dd bs=512 skip=1 count=1325055 seek=1 of=/dev/sdc to overwrite the ISO except the MBR. (1325056 blocks is the size of the Debian ISO in question. One could of course fill the whole stick until it throws an i/o error.) The block at LBA 1 bears as content 00 00 00 01 00 00 00 01 00 00 00 01 00 00 00 01 ... The last block at LBA 1325055: 00 14 37 ff 00 14 37 ff 00 14 37 ff 00 14 37 ff ... None of these blocks bears the isolinux.bin signature fb c0 78 70 anywhere. So the original MBR should bail out with the known message. It would be nice if it tells the block content before it ends.> Further how do I test that I haven't done anything really stupid? > I have debian install .isos e. g. debian-8.7.0-i386-CD-1.iso and > debian-8.7.0-i386-DVD-1.iso. I can boot these with qemu. But where > shall I insert this creation of mine.Just overwrite the first 432 bytes of the ISO. Make a backup of the original bytes, so you can restore it later. dd bs=1 count=432 if=debian-8.7.1-i386-xfce-CD-1.iso of=mbr.backup dd conv=notrunc bs=1 count=432 if=your_test_mbr \ of=debian-8.7.1-i386-xfce-CD-1.iso To restore the original MBR code: dd conv=notrunc bs=1 count=432 if=mbr.backup \ of=debian-8.7.1-i386-xfce-CD-1.iso Have a nice day :) Thomas
Thomas Schmitt
2017-Mar-20 11:52 UTC
[syslinux] "isolinux.bin missing or corrupt" when booting USB flash drive in old PC
Hi, add-on answer to Martin's question:> I can boot these with qemu.Just to make it clear for the archives: In order to get the MBR code started, the ISO must not be handed to qemu by option -cdrom, but rather by -hda or by some other hard-disk emulating option. With -cdrom, the BIOS would load the first 2048 bytes of isolinux.bin and start it, because it would read this instruction from the El Torito catalog of the ISO. The MBR code would not be involved. Have a nice day :) Thomas
Seemingly Similar Threads
- "isolinux.bin missing or corrupt" when booting USB flash drive in old PC
- "isolinux.bin missing or corrupt" when booting USB flash drive in old PC
- "isolinux.bin missing or corrupt" when booting USB flash drive in old PC
- "isolinux.bin missing or corrupt" when booting USB flash drive in old PC
- "isolinux.bin missing or corrupt" when booting USB flash drive in old PC