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