source: trunk/minix/man/man4/fd.4@ 11

Last change on this file since 11 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 2.9 KB
RevLine 
[9]1.TH FD 4
2.SH NAME
3fd \- floppy disk
4.SH DESCRIPTION
5The
6.B fd*
7devices refer to the Floppy disk driver using the NEC PD765 floppy disk
8controller. These diskettes are arrays of 512 byte sectors, although MINIX 3
9always works with two sectors at a time due to its 1024 byte block size. You
10can read or write any number of bytes however, MINIX 3 takes care of cutting
11and pasting incomplete blocks together.
12.PP
13The driver is normally configured for two floppy disk devices
14.B fd0
15and
16.BR fd1 .
17It can handle two more, but it is unlikely that the average PC can.
18.PP
19On the first access to an
20.B fd
21device (by
22.BR open (2)
23or
24.BR mount (2)),
25the driver will execute a series of read tests to determine the floppy type.
26This works ok for all floppy types except the true 360k type, because it
27is indistinguishable from the 720k type. This only means that the size of
28the floppy is not estimated right.
29.PP
30Bits 2\-6 of the minor device number may be set to the floppy disk type
31to make it known to the driver what type of diskette it is reading or
32writing. The non-auto devices should be used for formatting, or when one wants to
33be absolutely sure that the device is accessed right. These devices exist for
34drive 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
51Type 4 may also be used for the rarely seen 720k, 5.25" floppies (type 2 made
52them obsolete fast.) Note that these "types" only describe the floppies from
53a software point of view, type 1 and 4 drives use the same parameters.
54.PP
55If the format bit (bit 7) is set, then the driver interprets write commands
56as track formatting requests. This is used by the
57.BR format (1)
58command.
59.PP
60If the type bits are set to 28, 29, 30, or 31, then the driver uses a
61partition table found in sector 0 to partition the floppy. The partitions
62of
63.B fd0
64may be accessed as
65.B fd0p0
66through
67.BR fd0p3 .
68See
69.BR controller (4)
70for 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
79The driver does not know the size of a 360k diskette in a 360k 5.25"
80drive, because it uses the 720k parameters for it. So it will happily try
81to read past the end making all kinds of interesting noises. It's a good
82thing these drives are practically obsolete.
83.PP
84The partition table is only read when the drive motor is off and only for
85an auto or partition device. The driver assumes that a floppy in a drive
86with a running motor can't have been replaced all of a sudden.
87.SH AUTHOR
88Kees J. Bot (kjb@cs.vu.nl)
Note: See TracBrowser for help on using the repository browser.