How to boot a floppy when there is no floppy

Last modified: Sun Jun 2 10:49:27 EDT 2019

These instructions assume that you are running Linux with privileges sufficient to execute the commands shown.

Step 1, get floppy image

The canonical 3½-inch high density floppy is 2 sides × 80 tracks/side × 18 sectors/track × 512 bytes/sector = 1474560 bytes exactly, so floppy images are not hard to identify:

-rw-r--r--  1 dave users 1474560 Jul 14 13:35 W98SE.img

If you're starting with a physical floppy disk, you need to find a PC that has a floppy drive and copy in the image:

bash-4.3# cp /dev/fd0 W98SE.img

Or, if you're superstitious:

bash-4.3# dd if=/dev/fd0 of=W98SE.img bs=512

It works the same way with USB floppy drives, they just appear as /dev/sdh or somesuch instead of /dev/fd0.

USB flash drive

Caution:  The commands shown below will destroy whatever is currently on the device /dev/sdj.  Identify the correct device name for your USB flash drive and substitute it for /dev/sdj.

With my 2014 Gigabyte BIOS, all you have to do is copy a floppy image to the beginning of a USB flash drive:

bash-4.3# cp W98SE.img /dev/sdj

Or, if you're superstitious:

bash-4.3# dd if=W98SE.img of=/dev/sdj bs=512

Reboot, hit the hotkey to bring up the BIOS boot menu, select the USB flash drive, and boom, it boots as the A: drive.  It works automatically for typical FAT-formatted DOS-style boot disks.  If an atypical boot floppy is not recognized, the device can be set to "Forced FDD" in BIOS setup.

CD/DVD/BD

With optical discs it's a bit more complicated, but a boot floppy image can be rolled into a bootable iso like the following.  mkisofs is in Slackware package cdrtools.

mkdir /tmp/work
cp W98SE.img /tmp/work/BOOT.IMG
mkisofs -o W98SE.iso                   \
  -V "W98SE" -A "W98SE"                \
  -no-pad -iso-level 1 -J              \
  -b BOOT.IMG -c BOOT.CAT              \
  -hide BOOT.CAT -hide-joliet BOOT.CAT \
  /tmp/work
rm -rf /tmp/work

Then just burn the iso and boot it.  You magically get an A: drive.

Memdisk

The Syslinux package includes a shim called Memdisk that allows a floppy image to be booted from Grub2.  It works by hooking BIOS interrupts to emulate a floppy drive in RAM, so it won't work if the boot floppy conflicts with that or goes around it.

Copy the memdisk binary and the floppy image to your Linux /boot partition.  (On Slackware, the memdisk binary can be found at /usr/share/syslinux/memdisk.)  Then add a section like this to grub.cfg:

menuentry "W98SE boot floppy" {
  search --no-floppy --label --set=root boot
  linux16 /memdisk
  initrd16 /W98SE.img
}

Memdisk spews some text to the screen when it boots, but otherwise the floppy image boots to an A: prompt like it should.

If booting fails, try adding the raw parameter to the linux16 line as described in the Memdisk page.


KB
Home