[9] | 1 | .TH FD 4
|
---|
| 2 | .SH NAME
|
---|
| 3 | fd \- floppy disk
|
---|
| 4 | .SH DESCRIPTION
|
---|
| 5 | The
|
---|
| 6 | .B fd*
|
---|
| 7 | devices refer to the Floppy disk driver using the NEC PD765 floppy disk
|
---|
| 8 | controller. These diskettes are arrays of 512 byte sectors, although MINIX 3
|
---|
| 9 | always works with two sectors at a time due to its 1024 byte block size. You
|
---|
| 10 | can read or write any number of bytes however, MINIX 3 takes care of cutting
|
---|
| 11 | and pasting incomplete blocks together.
|
---|
| 12 | .PP
|
---|
| 13 | The driver is normally configured for two floppy disk devices
|
---|
| 14 | .B fd0
|
---|
| 15 | and
|
---|
| 16 | .BR fd1 .
|
---|
| 17 | It can handle two more, but it is unlikely that the average PC can.
|
---|
| 18 | .PP
|
---|
| 19 | On the first access to an
|
---|
| 20 | .B fd
|
---|
| 21 | device (by
|
---|
| 22 | .BR open (2)
|
---|
| 23 | or
|
---|
| 24 | .BR mount (2)),
|
---|
| 25 | the driver will execute a series of read tests to determine the floppy type.
|
---|
| 26 | This works ok for all floppy types except the true 360k type, because it
|
---|
| 27 | is indistinguishable from the 720k type. This only means that the size of
|
---|
| 28 | the floppy is not estimated right.
|
---|
| 29 | .PP
|
---|
| 30 | Bits 2\-6 of the minor device number may be set to the floppy disk type
|
---|
| 31 | to make it known to the driver what type of diskette it is reading or
|
---|
| 32 | writing. The non-auto devices should be used for formatting, or when one wants to
|
---|
| 33 | be absolutely sure that the device is accessed right. These devices exist for
|
---|
| 34 | drive 0:
|
---|
| 35 | .sp
|
---|
| 36 | .nf
|
---|
| 37 | .ta +4n +7n +9n +8n
|
---|
| 38 | type device minor media
|
---|
| 39 | .ta +5n +7n +9n +7n
|
---|
| 40 | 0 fd0 0 autodetect
|
---|
| 41 | 1 pc0 4 360k, 5.25"
|
---|
| 42 | 2 at0 8 1.2M, 5.25"
|
---|
| 43 | 3 qd0 12 360k in a 720k, 5.25" drive
|
---|
| 44 | 4 ps0 16 720k, 3.5"
|
---|
| 45 | 5 pat0 20 360k in a 1.2M, 5.25" drive
|
---|
| 46 | 6 qh0 24 720k in a 1.2M, 5.25" drive
|
---|
| 47 | 7 PS0 28 1.44M, 3.5"
|
---|
| 48 | .fi
|
---|
| 49 | .DT
|
---|
| 50 | .PP
|
---|
| 51 | Type 4 may also be used for the rarely seen 720k, 5.25" floppies (type 2 made
|
---|
| 52 | them obsolete fast.) Note that these "types" only describe the floppies from
|
---|
| 53 | a software point of view, type 1 and 4 drives use the same parameters.
|
---|
| 54 | .PP
|
---|
| 55 | If the format bit (bit 7) is set, then the driver interprets write commands
|
---|
| 56 | as track formatting requests. This is used by the
|
---|
| 57 | .BR format (1)
|
---|
| 58 | command.
|
---|
| 59 | .PP
|
---|
| 60 | If the type bits are set to 28, 29, 30, or 31, then the driver uses a
|
---|
| 61 | partition table found in sector 0 to partition the floppy. The partitions
|
---|
| 62 | of
|
---|
| 63 | .B fd0
|
---|
| 64 | may be accessed as
|
---|
| 65 | .B fd0p0
|
---|
| 66 | through
|
---|
| 67 | .BR fd0p3 .
|
---|
| 68 | See
|
---|
| 69 | .BR controller (4)
|
---|
| 70 | for a description of the partition table, and associated ioctl commands.
|
---|
| 71 | .SH FILES
|
---|
| 72 | /dev/fd[0\-3], /dev/pc[0\-3], /dev/at[0\-3], /dev/qd[0\-3], /dev/ps[0\-3],
|
---|
| 73 | /dev/pat[0\-3], /dev/qh[0\-3], /dev/PS[0\-3], /dev/fd[0\-3]p[0\-3]
|
---|
| 74 | .SH "SEE ALSO"
|
---|
| 75 | .BR format (1),
|
---|
| 76 | .BR controller (4),
|
---|
| 77 | .BR part (8).
|
---|
| 78 | .SH BUGS
|
---|
| 79 | The driver does not know the size of a 360k diskette in a 360k 5.25"
|
---|
| 80 | drive, because it uses the 720k parameters for it. So it will happily try
|
---|
| 81 | to read past the end making all kinds of interesting noises. It's a good
|
---|
| 82 | thing these drives are practically obsolete.
|
---|
| 83 | .PP
|
---|
| 84 | The partition table is only read when the drive motor is off and only for
|
---|
| 85 | an auto or partition device. The driver assumes that a floppy in a drive
|
---|
| 86 | with a running motor can't have been replaced all of a sudden.
|
---|
| 87 | .SH AUTHOR
|
---|
| 88 | Kees J. Bot (kjb@cs.vu.nl)
|
---|