Package: mount, umount, udev, kernel-2.6.32-5-686
Distribution: Debian 6.0.2.1-i386-DVD, Updated to Debian 6.0.3-i386-DVD, Using
Debian 6.0.3-i386-Update-DVD-Volumes 1 and 2
Hardware: MSI MS-7108 Motherboard with Intel Pentium 4, LGA 775, 3.0 GHz, Dual
Processor CPU,
Intel 848P, ICH5, 2 GB of 400 MHz DDR SDRAM, Floppy drive, 8 USB 2.0 ports (USB
1.1 compatible)
Files: <sys/mount.h>
Follow-up IV: Here is how to mount LINUX or MS-DOS or other kinds of floppies
without mounting
the floppy device /dev/fd0, as mount always fails to mount it while behaving as
if it has mounted it, on the
device /dev/fd0 which is made by the debian installer during installation.
The device /dev/fd0 is made by the debian installer during installation with
the following parameters (my comments
are in parentheses):
Device type: Block device
Device Major number: 2 (Floppy Device)
Device Minor Number: 0 (Autodetect the capacity and format of the drive)
It is the above choice of the device minor number which causes the failure.
The kernel fails to autodetect the capacity
and the format of the drive and causes "mount" to fail subsequently, without
any indication from "mount".
To fix this, one needs to make an explicit device entry with a device minor
number which has the capacity and the
format of the floppy clearly indicated. The floppy device minor number is
computed using:
Minor number = Format number in the kernel that corresponds to the drive
capacity and format * 4 +
Floppy disk controller number on the mother board *
128 +
Floppy drive number on the Floppy disk controller
selected above.
For a 1.44 MB, High-density (HD) floppy disk drive for LINUX, MS-DOS:
Format number in the kernel that corresponds to the drive capacity and format: 7
Floppy disk controller number on the motherboard: 0 (There is only one. Should
you have more, then the number
increases by one for each controller)
Floppy drive number on the Floppy disk controller selected above: 0 (There is
only one. Should you have more, then
the number increases by one for each floppy
drive)
Then, the device minor number is:
Minor number = 7 * 4 = 28
Now, one makes an explicit device entry in the /dev directory for this unit:
root@yg-pc-linux:~# mknod /dev/fd0HD1440 b 2 28
root@yg-pc-linux:~#
I chose the name fd0HD1440 corresponding to the first 3.5", High-Density, 1.44M
capacity, floppy drive.
Now, the mount will work, and you can use it normally. After inserting a
floppy in the drive with the indicated
capacity:
root@yg-pc-linux:~# mount /dev/fd0HD1440 /media/floppy
("mount" will type out a message, depending on the position of the write
inhibit tab of your floppy, about what
it has done).
root@yg-pc-linux:~#
You can access your files on the floppy in the /media/floppy directory, as
intended. When you are done, just
unmount the directory with the "umount" command.
Some floppy drive units can read and write other formats as well. For each of
those, one needs to make a
corresponding entry in the /dev/ directory. For example:
For a 720 KB, Double-density (DD) floppy disk drive for LINUX, MS-DOS:
Format number in the kernel that corresponds to the drive capacity and format: 4
Floppy disk controller number on the motherboard: 0 (There is only one. Should
you have more, then the number
increases by one for each controller)
Floppy drive number on the Floppy disk controller selected above: 0 (There is
only one. Should you have more, then
the number increases by one for each floppy
drive)
Then, the device minor number is:
Minor number = 4 * 4 = 16
Now, one makes an explicit device entry in the /dev directory for this unit as
well:
root@yg-pc-linux:~# mknod /dev/fd0DD720 b 2 16
root@yg-pc-linux:~#
I chose the name fd0DD720 corresponding to the first 3.5", Double-Density,
720KB capacity, floppy drive.
Now, the mount will work, and you can use it normally. After inserting a floppy
in the drive with the indicated
capacity:
root@yg-pc-linux:~# mount /dev/fd0DD720 /media/floppy
("mount" will type out a message, depending on the position of the write
inhibit tab of your floppy, about what
it has done).
root@yg-pc-linux:~#
You can access your files on the floppy in the /media/floppy directory, as
intended. When you are done, just
unmount the directory with the "umount" command.
-- Yekta
Yekta Gursel, Ph. D.
Address:
5444 Baldwin Avenue
Temple City
California, 91780-2624
Phone: (626) 454-4029
E-mail: [email protected]