The driver is normally configured for two floppy disk devices fd0 and fd1 . It can handle two more, but it is unlikely that the average PC can.
On the first access to an fd device (by open (2) or mount (2)), the driver will execute a series of read tests to determine the floppy type. This works ok for all floppy types except the true 360k type, because it is indistinguishable from the 720k type. This only means that the size of the floppy is not estimated right.
Bits 2-6 of the minor device number may be set to the floppy disk type to make it known to the driver what type of diskette it is reading or writing. The non-auto devices should be used for formatting, or when one wants to be absolutely sure that the device is accessed right. These devices exist for drive 0:
type device minor media 0 fd0 0 autodetect 1 pc0 4 360k, 5.25" 2 at0 8 1.2M, 5.25" 3 qd0 12 360k in a 720k, 5.25" drive 4 ps0 16 720k, 3.5" 5 pat0 20 360k in a 1.2M, 5.25" drive 6 qh0 24 720k in a 1.2M, 5.25" drive 7 PS0 28 1.44M, 3.5"
Type 4 may also be used for the rarely seen 720k, 5.25" floppies (type 2 made them obsolete fast.) Note that these "types" only describe the floppies from a software point of view, type 1 and 4 drives use the same parameters.
If the format bit (bit 7) is set, then the driver interprets write commands as track formatting requests. This is used by the format (1) command.
If the type bits are set to 28, 29, 30, or 31, then the driver uses a partition table found in sector 0 to partition the floppy. The partitions of fd0 may be accessed as fd0p0 through fd0p3 . See controller (4) for a description of the partition table, and associated ioctl commands.
The partition table is only read when the drive motor is off and only for an auto or partition device. The driver assumes that a floppy in a drive with a running motor can't have been replaced all of a sudden.