David Christensen
2017-Mar-19 02:40 UTC
[syslinux] "isolinux.bin missing or corrupt" when booting USB flash drive in old PC
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/isoOr, 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.SI 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
Thomas Schmitt
2017-Mar-19 08:01 UTC
[syslinux] "isolinux.bin missing or corrupt" when booting USB flash drive in old PC
Hi, David Christensen wrote:> I see the source code for the error message: > .ascii "isolinux.bin missing or corrupt.\r\n"The riddle is why the MBR code does not get to see the expected bytes.> Figuring out why debian-8.7.1-i386-xfce-CD-1.iso works on CD, but doesn't > work on USB,The immediate reason is that from CD the program isolinux.bin is loaded and started by the BIOS (without checksum verification), whereas from USB stick, the MBR code has to load and start the program.> Is there a way I can build live 32-bit Debian GNU/Linux USB images without > isohdpfx.S and syslinux.bin?You could try https://www.debian.org/releases/jessie/i386/ch04s03.html.en#usb-copy-flexible This looks like what Ady proposed by:> > or I would be partitioning and formatting the USB deviceHave a nice day :) Thomas
Thomas Schmitt
2017-Mar-19 08:29 UTC
[syslinux] "isolinux.bin missing or corrupt" when booting USB flash drive in old PC
Hi, correction: i wrote:> isolinux.bin is loaded and started by the BIOS (without checksum > verification),It should have been "without magic number verification". Have a nice day :) Thomas
David Christensen
2017-Mar-19 23:03 UTC
[syslinux] "isolinux.bin missing or corrupt" when booting USB flash drive in old PC
On 03/19/2017 01:01 AM, Thomas Schmitt via Syslinux wrote:> David Christensen wrote: >> Is there a way I can build live 32-bit Debian GNU/Linux USB images without >> isohdpfx.S and syslinux.bin? > > You could try > https://www.debian.org/releases/jessie/i386/ch04s03.html.en#usb-copy-flexibleThis is how I prepared an ADATA USB Flash Drive 4 GB: # cat /etc/debian_version 8.7 # uname -a Linux hd-tracy 3.16.0-4-686-pae #1 SMP Debian 3.16.39-1+deb8u2 (2017-03-07) i686 GNU/Linux # dmesg | tail -n 17 [ 3427.672019] usb 5-2: new high-speed USB device number 2 using ehci-pci [ 3427.807674] usb 5-2: New USB device found, idVendor=125f, idProduct=c08a [ 3427.807680] usb 5-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 3427.807683] usb 5-2: Product: ADATA USB Flash Drive [ 3427.807686] usb 5-2: Manufacturer: ADATA [ 3427.807689] usb 5-2: SerialNumber: <redacted> [ 3427.899566] usb-storage 5-2:1.0: USB Mass Storage device detected [ 3427.900045] scsi4 : usb-storage 5-2:1.0 [ 3427.900331] usbcore: registered new interface driver usb-storage [ 3428.901275] scsi 4:0:0:0: Direct-Access ADATA USB Flash Drive 0.00 PQ: 0 ANSI: 4 [ 3428.901941] sd 4:0:0:0: Attached scsi generic sg2 type 0 [ 3428.904773] sd 4:0:0:0: [sdb] 7592960 512-byte logical blocks: (3.88 GB/3.62 GiB) [ 3428.905927] sd 4:0:0:0: [sdb] Write Protect is off [ 3428.905935] sd 4:0:0:0: [sdb] Mode Sense: 23 00 00 00 [ 3428.907021] sd 4:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA [ 3428.917749] sdb: unknown partition table [ 3428.953502] sd 4:0:0:0: [sdb] Attached SCSI removable disk # lsusb | grep DATA Bus 005 Device 002: ID 125f:c08a A-DATA Technology Co., Ltd. C008 Flash Drive # lsusb -v -s 005:002 Bus 005 Device 002: ID 125f:c08a A-DATA Technology Co., Ltd. C008 Flash Drive Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 idVendor 0x125f A-DATA Technology Co., Ltd. idProduct 0xc08a C008 Flash Drive bcdDevice 1.00 iManufacturer 1 ADATA iProduct 2 ADATA USB Flash Drive iSerial 3 <redacted> bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 32 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0x80 (Bus Powered) MaxPower 480mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 8 Mass Storage bInterfaceSubClass 6 SCSI bInterfaceProtocol 80 Bulk-Only iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x01 EP 1 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 1 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 1 Device Qualifier (for other device speed): bLength 10 bDescriptorType 6 bcdUSB 2.00 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 bNumConfigurations 1 Device Status: 0x0000 (Bus Powered) # time dd if=/dev/zero of=/dev/sdb bs=1M; sync dd: error writing '/dev/sdb': No space left on device 3708+0 records in 3707+0 records out 3887595520 bytes (3.9 GB) copied, 752.992 s, 5.2 MB/s real 12m32.996s user 0m0.004s sys 0m6.512s # parted /dev/sdb mklabel msdos Information: You may need to update /etc/fstab. # parted /dev/sdb mkpart primary fat16 0% 100% Information: You may need to update /etc/fstab. # parted /dev/sdb set 1 boot on Information: You may need to update /etc/fstab. # install-mbr /dev/sdb # mkdosfs /dev/sdb1 mkfs.fat 3.0.27 (2014-11-12) # syslinux /dev/sdb1 # mkdir /mnt/iso # mount /mnt/samba/data/dpchrist/iso/debian/8.7.1/i386/debian-8.7.1-i386-xfce-CD-1.iso /mnt/iso # mkdir /mnt/usb # mount /dev/sdb1 /mnt/usb # cp -ip /mnt/iso/install.386/vmlinuz /mnt/usb/. # cp -ip /mnt/iso/install.386/initrd.gz /mnt/usb/. # echo "default vmlinuz" >> /mnt/usb/syslinux.cfg # echo "append initrd=initrd.gz" >> /mnt/usb/syslinux.cfg # echo "append prompt 1" >> /mnt/usb/syslinux.cfg # cp -ip /mnt/samba/data/dpchrist/iso/debian/8.7.1/i386/debian-8.7.1-i386-xfce-CD-1.iso /mnt/usb/. cp: failed to preserve ownership for '/mnt/usb/./debian-8.7.1-i386-xfce-CD-1.iso': Operation not permitted 2017-03-19 15:19:34 root at hd-tracy ~ # umount /mnt/iso 2017-03-19 15:20:30 root at hd-tracy ~ # ls -l /mnt/usb total 671632 -rwxr-xr-x 1 root root 678428672 Mar 4 17:02 debian-8.7.1-i386-xfce-CD-1.iso -rwxr-xr-x 1 root root 6301268 Jan 16 02:09 initrd.gz -r-xr-xr-x 1 root root 116624 Mar 19 07:50 ldlinux.c32 -r-xr-xr-x 1 root root 61440 Mar 19 07:50 ldlinux.sys -rwxr-xr-x 1 root root 56 Mar 19 15:14 syslinux.cfg -rwxr-xr-x 1 root root 2830656 Jan 16 02:09 vmlinuz 2017-03-19 15:20:36 root at hd-tracy ~ # df /mnt/usb Filesystem 1K-blocks Used Available Use% Mounted on /dev/sdb1 3787528 671636 3115892 18% /mnt/usb 2017-03-19 15:20:44 root at hd-tracy ~ # mount | grep usb /dev/sdb1 on /mnt/usb type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=utf8,shortname=mixed,errors=remount-ro) 2017-03-19 15:20:49 root at hd-tracy ~ # umount /mnt/usb 2017-03-19 15:23:05 root at hd-tracy ~ # dd if=/dev/sdb count=1 2>/dev/null | hexdump -C 00000000 fc 31 c0 8e d0 31 e4 8e d8 8e c0 be 00 7c bf 00 |.1...1.......|..| 00000010 06 b9 00 01 f3 a5 be ee 07 b0 08 ea 20 06 00 00 |............ ...| 00000020 80 3e b6 07 ff 75 04 88 16 b6 07 80 3c 00 74 04 |.>...u......<.t.| 00000030 08 06 b2 07 83 ee 10 d0 e8 73 f0 cd 1a 89 16 00 |.........s......| 00000040 08 e8 33 01 81 3e b4 07 ff ff 74 46 f6 06 b3 07 |..3..>....tF....| 00000050 80 74 06 b4 01 cd 16 75 39 f6 06 b3 07 40 74 07 |.t.....u9.... at t.| 00000060 f6 06 17 04 0f 75 2b 31 c0 cd 1a 2b 16 00 08 2b |.....u+1...+...+| 00000070 16 b4 07 72 d7 a0 b3 07 24 07 3c 07 75 0b be be |...r....$.<.u...| 00000080 07 b0 00 b9 04 00 80 3c 00 75 66 fe c0 83 c6 10 |.......<.uf.....| 00000090 e2 f4 e8 e2 00 b4 0e be a0 07 8a 0e b2 07 ac d0 |................| 000000a0 e9 73 02 cd 10 08 c9 75 f5 b0 3a cd 10 31 c0 cd |.s.....u..:..1..| 000000b0 16 3c 00 74 f8 3c 0d 74 bc 3c 61 72 06 3c 7a 77 |.<.t.<.t.<ar.<zw| 000000c0 02 2c 20 88 c3 be a0 07 8a 0e b2 07 ac d0 e9 73 |., ............s| 000000d0 04 38 c3 74 06 08 c9 75 f3 eb d2 b8 0d 0e 31 db |.8.t...u......1.| 000000e0 cd 10 8d 84 5f 00 3c 07 75 07 b0 1f a2 b2 07 eb |...._.<.u.......| 000000f0 a1 e8 83 00 31 d2 b9 01 00 3c 04 74 11 73 f0 30 |....1....<.t.s.0| 00000100 e4 b1 04 d2 e0 be be 07 01 c6 8a 16 b6 07 bf 05 |................| 00000110 00 56 f6 c2 80 74 2b b4 41 bb aa 55 52 cd 13 5a |.V...t+.A..UR..Z| 00000120 5e 56 72 1e 81 fb 55 aa 75 18 f6 c1 01 74 13 8b |^Vr...U.u....t..| 00000130 44 08 8b 5c 0a be 90 07 89 44 08 89 5c 0a b4 42 |D..\.....D..\..B| 00000140 eb 0c 8a 74 01 8b 4c 02 b8 01 02 bb 00 7c 50 c6 |...t..L......|P.| 00000150 06 92 07 01 cd 13 58 5e 73 05 4f 75 b4 eb 90 81 |......X^s.Ou....| 00000160 3e fe 7d 55 aa 75 f6 31 db b8 0d 0e cd 10 b0 0a |>.}U.u.1........| 00000170 cd 10 ea 00 7c 00 00 50 b8 0d 0e 31 db cd 10 be |....|..P...1....| 00000180 8c 07 b9 04 00 ac cd 10 e2 fb 58 c3 4d 42 52 20 |..........X.MBR | 00000190 10 00 01 00 00 7c 00 00 00 00 00 00 00 00 00 00 |.....|..........| 000001a0 31 32 33 34 46 00 00 41 4e 44 54 6d 62 72 00 02 |1234F..ANDTmbr..| 000001b0 00 02 90 c7 12 00 80 00 52 ed 07 5f a8 01 80 20 |........R.._... | 000001c0 21 00 0e 92 7a d8 00 08 00 00 00 d0 73 00 00 00 |!...z.......s...| 000001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| 00000200 2017-03-19 15:23:15 root at hd-tracy ~ # fdisk -l /dev/sdb Disk /dev/sdb: 3.6 GiB, 3887595520 bytes, 7592960 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x5f07ed52 Device Boot Start End Sectors Size Id Type /dev/sdb1 * 2048 7591935 7589888 3.6G e W95 FAT16 (LBA) When I undock the HDD from my D865GBFLK Pentium 4 3.4E GHz computer and boot the USB drive, I see: MBR SYSLINUX 6.03 CHS 20150820 Copyright (C) 1994-2014 H. Peter Anvin et al Loading vmlinuz... After a few seconds, I see: [ 0.599372] CPU: 0 PID: 1 Comm: swapper Not tainted 3.16.0-4-586 #1 Debian3.216.39-1 [ 0.599429] Hardware name: BIOS BF86510A.86A.0077.P25.0508040031 08/04/2005 [ 0.599492] f6069f08 f6069f08 c1421c1b c14f3898 c16c0fc0 c152012b f6069f30 00008001 [ 0.599777] c14e63d1 f62d4000 c1608052 c14e68c4 f6069f30 c14e63d1 00000000 00000000 [ 0.600061] f6ee3a80 00000000 f62d40df 6e6b6e75 2d6e776f 636f6c62 2c30286b 00002930 [ 0.600346] Call Trace: [ 0.600395] [<c1421c1b>] ? panic+0x74/0x194 [ 0.600442] [<c1608052>] ? mount_block_root+0x250/0x258 [ 0.600490] [<c16081cd>] ? perpare_namespace+0x117/0x15d [ 0.600537] [<c1607d58>] ? kernel_init_freeable+0x1a6/0x1b1 [ 0.600585] [<c1607574>] ? initcall_blacklist+0x97/0x97 [ 0.600632] [<c141f620>] ? kernel_init+0x10/0xe0 [ 0.600680] [<c10607c7<] ? schedule_tail+0x17/0x40 [ 0.600728] [<c1427a40>] ? ret_from_kernel_thread+0x20/0x30 [ 0.600766] [<c141f610>] ? rest_init+0x60/0x60 [ 0.600823] Kernel Offset: 0x0 from 0xc1000000 (relocation range: 0xc0000000-0xf7ffdfff) [ 0.600883] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unkonwn-block(0,0) David
Reasonably Related 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
- Replicated Volume Crashed
- "isolinux.bin missing or corrupt" when booting USB flash drive in old PC
- 2 data frames - list in one out put , matrix in another ??