[syslinux] "isolinux.bin missing or corrupt" when booting USB flash drive in old PC

Martin Str|mberg
Mon, 20 Mar 2017 04:42:44 -0000

David Christensen wrote:
> This is how I prepared an ADATA USB Flash Drive 4 GB:
...
install-mbr /dev/sdb
...
[Rest of very clear description snipped.]

What's that? That desn't exist in the Debian I'm running.
Otherwise you gave a very good description of what you're doing.


>From another message:
> Please provide a URL for documentation that explains how to build a
> bootable USB flash drive equivalent to debian-8.7.1-i386-xfce-CD-1.iso.

x3!

Well it would be very easy to reply: why don't you ask Debian? How/Why
should/could we know what Debian has done?


But you gave a very good desription so here is what I do that I
wrote/pasted to a file while doing it. My case of 9GB is overkill for
you, 2GB should be plenty and the other_stuff can be ignored. In
hindsight it could be more clear. Slightly edited:

This was done from a Debian 7.1 live booted from an USB stick.


Make one VFAT partition of at least 9 GB, labeled X-install. If
there is any extra space, make another logical VFAT partition labeled
other_stuff.
Note that the USB stick that are being partitioned, formatted and
bootable in this instruction shows up as /dev/sdc (this isn't
necessarily so for another run):

root at debian:/# fdisk -lu /dev/sdc

Disk /dev/sdc: 32.0 GB, 32023511040 bytes
255 heads, 63 sectors/track, 3893 cylinders, total 62545920 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
Disk identifier: 0x8d63aff7

   Device Boot      Start         End      Blocks   Id  System
   /dev/sdc1   *        2048    32767999    16382976    b  W95 FAT32
   /dev/sdc2        32768000    62545919    14888960    5  Extended
   /dev/sdc5        32770048    62545919    14887936    b  W95 FAT32

user at debian:~$ df -HT
...
/dev/sdc5      vfat       16G  8.2k   16G   1% /media/other_stuff
/dev/sdc1      vfat       17G  8.2k   17G   1% /media/X-install


Copy contents of .iso install cd to X-install:

mount -o loop /media/OS/X-install.iso /mnt3
cp -R -L /mnt3/. /media/X-install/

Make the stick bootable:

mkdir /media/X-install/syslinux
cp /media/X-install/isolinux/* /media/X-install/syslinux/
mv /media/X-install/syslinux/isolinux.cfg /media/X-install/syslinux/syslinux.cfg

Edit syslinux.cfg (necessary?).

umount /media/X-install
syslinux -i -d syslinux /dev/sdc1
dd if=/usr/lib/syslinux/mbr.bin of=/dev/sdc

Done.


But note that if syslinux you're installing differs from the
isolinux/syslinux from the .iso, you should replace all and any
syslinux modules that were copied to the /media/X-install/syslinux
directory with the ones the syslinux you use is delivered with.


--
MartinS