Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

fd(4) [minix man page]

FD(4)							     Kernel Interfaces Manual							     FD(4)

NAME
fd - floppy disk DESCRIPTION
The fd* devices refer to the Floppy disk driver using the NEC PD765 floppy disk controller. These diskettes are arrays of 512 byte sec- tors, although Minix always works with two sectors at a time due to its 1024 byte block size. You can read or write any number of bytes however, Minix takes care of cutting and pasting incomplete blocks together. 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 par- titions of fd0 may be accessed as fd0a through fd0d. See hd(4) for a description of the partition table, and associated ioctl commands. FILES
/dev/fd[0-3], /dev/pc[0-3], /dev/at[0-3], /dev/qd[0-3], /dev/ps[0-3], /dev/pat[0-3], /dev/qh[0-3], /dev/PS[0-3], /dev/fd[0-3][a-d] SEE ALSO
format(1), hd(4), part(8). BUGS
The driver does not know the size of a 360k diskette in a 360k 5.25" drive, because it uses the 720k parameters for it. So it will happily try to read past the end making all kinds of interesting noises. It's a good thing these drives are practically obsolete. 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. AUTHOR
Kees J. Bot (kjb@cs.vu.nl) FD(4)

Check Out this Related Man Page

fddisk(8)						      System Manager's Manual							 fddisk(8)

NAME
fddisk - FDI disk maintenance utility SYNOPSIS
/sbin/fddisk options special OPTIONS
Unless this option is specified, an attempt to format or to install a file system fails in two cases. The first failure occurs when the device has been opened since the media was inserted. The second failure occurs if the device is currently opened by another process. For- mats the media to the density appropriate for that media. Copies a hex dump of sector number PSN to stdout. Uses the interleave factor nnn for formatting. If specified, ccc indicates an additional intercylinder interleave. Copies a packed-C hex dump of the entire disk to stdout. Specifies silent mode. This option blocks informational messages from appearing on stderr. Reads the entire media. The command fails if the utility finds a bad sector. Waits for media to be inserted into the drive if none is present. Waits for new media to be inserted into the drive if none is present or if the current media has been opened since it was last inserted. Reads the disk and reports on the format of the disk. OPERANDS
Specifies an unmounted, raw device pathname. This device must be an FDI interface (fd). DESCRIPTION
The fddisk utility, an FDI (integrated Floppy Disk Interface) disk maintenance program, can format a floppy disk, scan a floppy disk for bad blocks, and read and write selected blocks. It can be used in shell scripts for checking the status of floppy disks. Such status checks include checking for or waiting for the presence of media, and checking for or waiting for the user to change the media. RESTRICTIONS
The fddisk utility has the following restrictions: You must have read/write access to the device. The device must not be mounted. The program can only be used with a 3.5-inch floppy disk in the RX26 drive. In some cases, it might not be possible to format a floppy disk at a higher density than it is already formatted. If this situation occurs, the floppy disk must be bulk erased before it can be reformatted at a higher density. EXAMPLES
This example formats a floppy disk in drive zero: # /sbin/fddisk -fmt /dev/rdisk/floppy0a This example formats a floppy disk in drive zero when the disk has been read or written since it was inserted into the drive: # /sbin/fddisk -fmt -f /dev/rdisk/floppy0a SEE ALSO
Commands: mount(8), restore(8), uerf(8) Files: fd(7) fddisk(8)
Man Page