Chapter 5. Using Floppy Disks

Table of Contents

Large Nonstandard Floppy Disk Device Files
Creating a Large Floppy Disk
Creating a Disk Image on Disk
Verifying a Disk
Tricks to Gain Even More Space on a Floppy
Preparing a Large Floppy Disk for Booting with LRP
Warnings about Large Floppy Disks
Common Floppy Disk Problems and Their Solutions

Large Nonstandard Floppy Disk Device Files

Before large floppy disks can be used under LRP, there must be device files for them. Most current releases have these; however, if not, this is how they are created:[8]

mknod /dev/fd0u1680 b 2 44 1.68M
mknod /dev/fd0u1722 b 2 60 1.72M
mknod /dev/fd0u1743 b 2 76 1.74M
mknod /dev/fd0u2880 b 2 32 2.88M

The technical details of several different floppy sizes are below[9] ; for most this can be skipped without adverse effects:

DeviceMajor Device NumberMinor Device NumberCylindersHeadsSectors
/dev/fd0u1440 22880218
/dev/fd0u1600 212480220
/dev/fd0u1680 24480221
/dev/fd0u1722 26082221
/dev/fd0u1743 27683221
/dev/fd0u1760 29680222
dev/fd0u1840 211680223
/dev/fd0u1940 210080224

The disk device files with ‘D’, ‘H’, and ‘E’ in the names (for the 3.5" disk formats) are no longer used. [10] Some distributions may not have any of these device files, in which case they will have to be created.

Creating a Large Floppy Disk

To create a large floppy disk under Linux (or LRP), several steps are required. For an example, a 1.68 megabyte disk will be used; others require changing the device file ( /dev/fd0u* ) to the appropriate device file for that disk size.

  1. Format the disk. This creates the basic formatting required for the disk. Two ways to do this are:fdformat /dev/fd0u1680 orsuperformat /dev/fd0u1680

  2. Format the disk for use with MSDOS. This can be accomplished using one of these sequences: mformat -t 80 -h 2 -s 21 a: mbadblocks a: or mkfs.msdos /dev/fd0u1680

    To use mformat, the tracks (-t), heads (-h), and sectors (-s) are needed; they can be read from the table above.

  3. Apply syslinux to the disk to make the large disk bootable:syslinux -s /dev/fd0u1680

Creating a Disk Image on Disk

Creating a large floppy disk image in the filesystem is not hard. Follow these steps:

  1. Create a file of the right size: dd if=/dev/zero of=/tmp/disk.ima bs=1024 count=1680 With GNU dd, you can use 1k instead of 1024 for the block size; it means the same thing.

  2. Format the disk for use with MSDOS. This can be accomplished this way: mkfs.msdos /tmp/disk.ima

    VFAT (mkfs.vfat) will also work, but syslinux does not understand the VFAT filesystem. Thus, for files used by syslinux you must stay within the MSDOS limitations for it to work. The Linux kernel must then support the VFAT filesystem.

    Most LRP kernels do not understand the VFAT filesystem; for best compatability stay with the MSDOS filesystem. The ability to use long filenames is lost, however.

  3. Apply syslinux [11]

  4. Mount in the system if desired: mount -o loop /tmp/disk.ima /mnt

  5. Now copy everything desired to be on the floppy disk to /mnt. Unmount when done: umount /mnt

Verifying a Disk

Put the disk into an appropriate drive, then use the following command: dd if=/dev/fd0u1680 of=/dev/null

This assumes that a 1.68M disk is in the first floppy drive; adjust and correct the device file as necessary. If the disk reads correctly, then the output should be (in this case):

3360+0 records in
3360+0 records out

If the two numbers do not match, or the system generates errors, then the disk is at best unreliable — use another. The number of records reported should match the appropriate number of blocks listed in the previous table.

Tricks to Gain Even More Space on a Floppy

Each MSDOS formatted floppy allocates 512 byte sectors, 2 sectors per cluster, and 112 or 224 entries for filenames in the root directory. By reducing this to 512 byte sectors, 1 sector per cluster, and 96 root directory entries, you can gain a few more kilobytes on the disk. This is done with some options to mkfs: mkfs.vfat -S 512 -s 1 -r 96 /tmp/disk.ima

The S option specifies bytes per sector, the s option sectors per cluster, and the r option root entries.

Preparing a Large Floppy Disk for Booting with LRP

Once the disk is created in whatever size desired, then several files must be added to the disk:

  1. The syslinux configuration files, including syslinux.cfg

  2. The Linux kernel (linux).

  3. The base packages [12] for LRP:

    root.lrp [13]
    doc.lrp (Oxygen distribution only)
    home.lrp (Oxygen distribution only)
    usr.lrp (Oxygen distribution only)
  4. Other required packages (such as init.lrp, inetd.lrp, cron.lrp, etc.)

  5. Any added packages (such as psentry.lrp)

  6. Configuration files (such as oxygen.cfg, lrpkg.cfg, or others...)

Most commonly, these files can be added just be copying the files on a working boot disk to the new boot disk.

Once this is complete, it will be necessary to modify syslinux.cfg so that Linux knows what format the floppy is so Linux can read the floppy properly. Look for a line that starts with append= and change the entry boot=/dev/fd0to boot=/dev/fd0u1680 or to whatever device file is appropriate for the disk that has been created. Note that /dev/fd0 is the first drive, fd1 is the second, et al. Note too, that when fd0 or fd1 (or whatever) is used, then the standard 1.44M format is assumed.

If this additional configuration in syslinux.cfg is not done, then there will be a message like: LINUXRC: Loading packages - local(nf!) etc(nf!) modules(nf!) - done. or similar. The system would then ask for an “run level.” To fix this, make sure the boot device entry is correct as detailed above.

Warnings about Large Floppy Disks

There are several things to remember about large, non-standard, floppy disks:

  • Windows NT does not reliably write any of the non-standard formats.

  • Any size over 1.68M has very unstable and undependable support among floppy disk drive hardware.

  • The traditionally used rawrite utility for MSDOS cannot write large floppy formats — use WinImage instead.

  • Under Windows NT, WinImage has problems writing disks over 1.68M.

  • Some drives cannot handle large format floppy disks; the Toshiba Tecra notebook and its floppy drive, for example.

Common Floppy Disk Problems and Their Solutions

Problem: I/O Errors on Mount

Symptom: end_request: I/O error, dev 02:2c (floppy), sector 19 end_request: I/O error, dev 02:2c (floppy), sector 20

Solution: This is a standard 1.44M floppy being mounted as a 1.68M floppy. Mount it with the appropriate device file name: mount /dev/fd0u1440 /mnt

Problem: Many I/O Errors on Sectors 19 and 20


end_request: I/O error, dev 02:2c (floppy), sector 19
Directory sread (sector 0x13) failed
end_request: I/O error, dev 02:2c (floppy), sector 20
Directory sread (sector 0x14) failed

Solution: If the two errors on mount were ignored, and an ls command is performed, these are the errors that ensue — over 10 of each pair. All that can be done is to wait the errors out and to remount the disk with the proper device file name instead: mount /dev/fd0u1440 /mnt

Problem: Minix Filesystem Not Found


VFS: Can't find a Minix or Minix V2 filesystem on device 02:1c.

Solution: This isn't an error at all. It can come up when a MSDOS disk is mounted. It may be accompanied by errors declaring other filesystems not being found. To eliminate this “error,” mount the disk with the appropriate filesystem type: mount -t msdos /dev/fd0u1680 /mnt The device number (02:1c) refers to the major and minor numbers of the disk driver. [14]

Problem: root.lrp Fails to Load

Symptom: Loading root.lrp .............. boot failed

Solution: root.lrp is probably corrupt; create a new one or use a backup disk.

Problem: Unable to mount root fs

Symptom: 03:05: rw=0, want=2, limit=0 dev 03:05 blksize=1024 blknr=1 sector=2 size=1024 count=1 MINIX-fs: unable to read superblock attempt to access beyond end of device 03:05: rw=0, want=1, limit=0 dev 03:05 blksize=1024 blknr=1 sector=2 size=1024 count=1 FAT bread failed Kernel panic: VFS: Unable to mount root fs on 03:05

Solution: This is the result of not having a BOOT parameter in the configuration file and booting with IDE support in a system with an IDE hard drive. In this case, it is attempting to read the root filesystem from device 03:05 (major device number 3, minor device number 5) — which is /dev/hda3. It attempts to read it as a MINIX volume, and fails since /dev/hda3 is a Linux ext2 volume.

Inserting the parameter BOOT=/dev/fd0u1680,msdos fixes the problem.

[8] Ray Olszewski (LRP mailing list, 3 September 2000, 22:14:09)

[9] Ibid.

[10] Linux 2.2.18 kernel documentation: linux/Documentation/devices.txt.

[11] The version of syslinux being used can be gotten from a UNIX environment this way: strings ldlinux.sys | head -n 1

[12] This varies according to which distribution is used; typically Oxygen requires many more packages.

[13] In a system using a Linux kernel without LRP patches, this should probably be called root.gz instead. This package is also not loaded by the package retrieval scripts, but rather by syslinux itself.

[14] To see the major and minor numbers, you can look at the kernel source in the file linux/Documentation/ devices.txt or in the directory listing of the appropriate files in /dev. The listing for the first disk drive with a standard 1.44M floppy in it is: brw-rw---- 1 dgd floppy 2, 28 Jun 4 2001 /dev/fd0u1440 The major number is 2 and the minor number is 28 ( 1c) listed to the left of the date - which makes for the report of 02:1c from the kernel.