.TH fdformat "" "" Command
.PC "Low-level format a floppy disk"
\fB/etc/fdformat [ \fIoption ...\fB ] \fIspecial\fR
.PP
.HS
.SH Options:
.IC "\fB\-a\fR"
Print information on stdout during format
.IC "\fB\-i\fI n\fR"
Interleave factor \fIn\fR (0-7; default, 6)
.IC "\fB\-o\fI n\fR"
Skew factor \fIn\fR for sector numbering (default, 0)
.IC "\fB\-v\fR"
Verify
.IC "\fB\-w\fI file\fR"
Copy \fIfile\fR to formatted floppy disk track by track
.HE
.B fdformat
formats a floppy disk.
The given
.I special
should be the name of the special file
that correspond to the floppy disk drive.
.PP
.B fdformat
recognizes the following options:
.IP "\fB-a\fR"
Print information on the standard output device during format.
As it formats a cylinder, it will print a line of the form
.DM
	hd=0 cyl=25
.DE
.sp \n(pDu
on your screen.
.IP "\fB-i \fInumber\fR"
Use
.I number
(0 through 7)
as the interleave factor in formatting.
Note that the default interleave is six.
.IP "\fB-o \fInumber\fR"
Use
.I number
(default, 0)
as the skew factor for sector numbering.
.IP "\fB-v\fR"
Verify formatting and verify data written with the
.B \-w
option.
.IP "\fB-w \fIfile\fR"
Format the floppy disk and then copy
.I file
to it track by track.
The raw device should be used.
.PP
The command
.B mkfs
builds a \*(CO file system on a formatted floppy disk.
The command
.B dosformat
builds a DOS file system on a formatted floppy disk.
The command
.B mount
mounts a floppy disk containing a file system to allow
access to it through the \*(CO directory structure.
The command
.B umount
unmounts a floppy disk.
.SH Examples
The following command
formats a 2880-block (1.44-megabyte),
3.5-inch floppy disk in drive 1 (otherwise known as
drive B):
.DM
	/etc/fdformat -v /dev/rfva1
.DE
.PP
The following command
formats a 2400-block (1.2-megabyte),
5.25-inch floppy disk in drive 0 (otherwise known
known as drive A):
.DM
	/etc/fdformat -v /dev/rfha0
.DE
.PP
Note that using the raw device (\fB/dev/rfha0\fR)
speeds up formatting noticeably.
.SH "See Also"
.Xr "commands," commands
.Xr "dosformat," dosformat
.Xr "fd," fd
.Xr "mkfs," mkfs
.Xr "mount," mount
.Xr "umount" umount
.SH Diagnostics
When errors occur on floppy-disk devices the driver prints on the system
console an error message that describes the error.
.SH Notes
.B fdformat
formats a track at a time.
.B fdformat
can be interrupted between tracks, which may result in a partially
formatted floppy disk.
