This tutorial covers the use of DOS formatted floppies with Linux.
Typically a formatted floppy diskette with a filesystem requires the diskette
to be mounted before use.
The following commands do not require mounting of the filesystem.
It is a prerequisite however that the floppy have a DOS filesystem formatted
on the diskette if it is to read from or written to.
The DOS floppy diskette utilities are included in the Red Hat mtools RPM.
The fdformat command is part of the util-linux RPM package.
Floppy device description:
/dev/fd
0
-
-
First Floppy Drive A:\
-
1
-
-
Second Floppy Drive B:\
-
-
d
-
Low density 5.25 in
-
-
D
-
Low density 3.5 in
-
-
h
-
High density 5.25 in
-
-
H
-
High density 3.5 in
-
-
-
360
720
1200
Capacities for
5.25 in
-
-
-
360
720
1440
Capacities for
3.5 in
Example: /dev/fd0H1440
Floppy Device drive A, high density 3.5 inch, 1.4Mb capacity.
Format Floppy GUI Tools:
GUI format tools: DOS or native ext2 file formats.
Gnome: gfloppy
Package:
RH RPM: gnome-utils
Gfloppy gives you the option to specify the device directly:
/usr/bin/gfloppy --device=/dev/fd0H1440
Default is /dev/fd0
KDE: kfloppy
Package:
RH RPM: kdeutils
Advanced Floppy Diskette System Configuration:
The pre-defined floppy configurations are specified in floppy disk
parameter table in /etc/fdprm.
If referring to the floppy as /dev/fd0H1440, the user has already
determined the floppy density and can thus reference the device explicitly.
When using the Linux device reference /dev/fd0, /dev/fd1, etc,
auto-floppy device detection will determine the floppy density.
Auto-detecting floppy devices (/dev/fd0, etc) can be configured with
the setfdprm command.
Checking a floppy for bad blocks:
/sbin/badblocks /dev/fd0H1440 1440
This will list the block numbers for all the bad blocks on the floppy.
One can also mount a floppy:
Red Hat 6 to 9: mount -t msdos /dev/fd0 /mnt/floppy
Fedora Core 3: mount -t msdos /dev/fd0 /media/floppy
Remember to umount /mnt/floppy when done.
(or for fedora Core 3: /media/floppy)
The DOS floppy utilities (mtools) do not mount the floppy in the traditional
manner but give DOS like access.
Repair bad blocks so that the blocks can be ignored and floppy can be used.
/sbin/dosfsck -at /dev/fd0H1440
Man pages:
mkdosfs - Create an MS-DOS file system under Linux