summaryrefslogtreecommitdiffstats
path: root/usr.sbin/fdformat/fdformat.1
blob: e5ba6ce39ef7bf6ce16facd1b552eed8f4420f00 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
.\" Copyright (C) 1993, 1994, 1995, 2001 by Joerg Wunsch, Dresden
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS
.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
.\" DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT,
.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
.\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.\" $FreeBSD$
.\"
.Dd July 2, 2001
.Os
.Dt FDFORMAT 1
.Sh NAME
.Nm fdformat
.Nd format floppy disks
.Sh SYNOPSIS
.Nm
.Op Fl q
.Op Fl y
.Op Fl v | Fl n
.Op Fl f Ar capacity
.Op Fl c Ar cyls
.Op Fl s Ar secs
.Op Fl h Ar heads
.Nm
.Op Fl r Ar rate
.Op Fl g Ar gap3len
.Op Fl i Ar intleave
.Op Fl S Ar secshft
.Op Fl F Ar fillbyte
.Op Fl t Ar steps_per_track
.Ar device_name
.Sh DESCRIPTION
.Nm Fdformat
formats a floppy disk at device
.Ar device_name .
.Ar Device_name
may be given either with a full path
name of a device node for a floppy disk drive
(e.g.\&
.Pa /dev/fd0 ) ,
or a default name in an abbreviated form
(e.g.\&
.Em fd0 ) .
In the latter case, the name is constructed by prepending
.Pa /dev/
and appending a
.Em .capacity
to the
.Ar device_name .
Note that any geometry constraints of the device node
(minor device number)
are meaningless, since they're overridden by
.Nm .
.Pp
The options are as follows:
.Bl -tag -width 10n -offset indent
.It Fl q
Suppress any normal output from the command, and don't ask the
user for a confirmation whether to format the floppy disk at
.Ar device_name .
.It Fl y
Suppress confirmation request by automagically responding "yes", but still
report format status.
.It Fl f Ar capacity
The normal way to specify the desired formatting parameters.
.Ar Capacity
is the number of kilobytes to format.
Valid choices are 360, 720, 800, 820,
1200, 1440, 1480 or 1720.
.It Fl n
Don't verify floppy after formatting.
.It Fl v
Don't format, verify only.
.It Fl c Ar cyls
Number of cylinders: 40 or 80.
.It Fl s Ar secs
Number of sectors per track: 9, 10, 15 or 18.
.It Fl h Ar heads
Number of floppy heads: 1 or 2.
.It Fl r Ar rate
Data rate: 250, 300 or 500 kbps.
.It Fl g Ar gap3len
Gap length.
.It Fl i Ar intleave
Interleave factor.
.It Fl S Ar secshft
Sector size: 0=128, 1=256, 2=512 bytes.
.It Fl F Ar fillbyte
Fill byte.
.It Fl t Ar steps_per_track
Number of steps per track.
An alternate method to specify the geometry data to write to the floppy disk.
.El
.Pp
If the
.Fl q
flag has not been specified, the user is asked for a confirmation
of the intended formatting process.
In order to continue, an answer
of
.Dq y
must be given.
.Pp
Note that
.Nm
does only perform low-level formatting.  In case you wish to create
a file system on the medium, see the commands
.Xr newfs 8
for an
.Em ufs
file system, or
.Xr newfs_msdos 8
for an
.Em MS-DOS (FAT)
file system.
.Sh DIAGNOSTICS
Unless
.Fl q
has been specified, a single letter is printed to standard output
to inform the user about the progress of work.
First, an
.Sq Em F
is printed when the track(s) is being formatted, then a
.Sq Em V
while it's being verified, and if an error has been detected, it
will finally change to
.Sq Em E .
Detailed status information (cylinder, head and sector number, and the
exact cause of the error) will then be printed for up to 10 errors.
.Pp
An exit status of 0 is returned upon successful operation.
Exit status
1 is returned on any errors during floppy formatting, and an exit status
of 2 reflects invalid arguments given to the program (along with an
appropriate information written to diagnostic output).
.Sh SEE ALSO
.Xr fdc 4 ,
.Xr newfs 8 ,
.Xr newfs_msdos 8
.Sh HISTORY
.Nm Fdformat
has been developed for 386BSD 0.1
and upgraded to the new
.Xr fdc 4
floppy disk driver.
It later became part of the
.Fx 1.1
system.
.Sh AUTHORS
.An -nosplit
The program has been contributed by
.An J\(:org Wunsch ,
Dresden, with changes by
.An Serge Vakulenko
and
.An Andrey A. Chernov ,
Moscow.
OpenPOWER on IntegriCloud