]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.sbin/fdformat/fdformat.1
This commit was generated by cvs2svn to compensate for changes in r161818,
[FreeBSD/FreeBSD.git] / usr.sbin / fdformat / fdformat.1
1 .\" Copyright (C) 1993, 1994, 1995, 2001 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 .\" $FreeBSD$
26 .\"
27 .Dd December 25, 2001
28 .Os
29 .Dt FDFORMAT 1
30 .Sh NAME
31 .Nm fdformat
32 .Nd format floppy disks
33 .Sh SYNOPSIS
34 .Nm
35 .Op Fl F Ar fill
36 .Op Fl f Ar fmt
37 .Op Fl s Ar fmtstr
38 .Op Fl nqvy
39 .Ar device
40 .Sh DESCRIPTION
41 The
42 .Nm
43 utility formats a floppy disk at
44 .Ar device ,
45 where
46 .Ar device
47 may either be given as a full path
48 name of a device node for a floppy disk drive
49 (e.g.\&
50 .Pa /dev/fd0 ) ,
51 or using an abbreviated name that will be looked up
52 under
53 .Pa /dev
54 (e.g.\&
55 .Dq Li fd0 ) .
56 .Pp
57 The options are as follows:
58 .Bl -tag -width ".Fl s Ar fmtstr"
59 .It Fl F Ar fill
60 Use
61 .Ar fill
62 as the fill byte for newly formatted sectors.
63 .Ar fill
64 must be a number in the range 0 through 255 using common C
65 language notation.
66 The default value is
67 .Dq Li 0xf6 .
68 .It Fl f Ar fmt
69 Specify the density settings for a
70 .Ar fmt
71 kilobyte format, as described in
72 .Xr fdcontrol 8 .
73 .It Fl s Ar fmtstr
74 Specify the density settings using explicit parameters, as
75 described in
76 .Xr fdcontrol 8 .
77 .It Fl n
78 Do not verify floppy after formatting.
79 .It Fl q
80 Suppress any normal output from the command, and do not ask the
81 user for a confirmation whether to format the floppy disk at
82 .Ar device .
83 .It Fl v
84 Do not format, verify only.
85 .It Fl y
86 Do not ask for confirmation whether to format the floppy disk but
87 still report formatting status.
88 .El
89 .Pp
90 For non-autoselecting subdevices, neither
91 .Fl f Ar fmt
92 nor
93 .Fl s Ar fmtstr
94 may be specified, since the preconfigured media density settings
95 from the kernel driver will always be used.
96 However, if
97 .Ar device
98 is a device with automatic media density selection (see
99 .Xr fdc 4 ) ,
100 both methods can be used to override the density settings for the
101 newly formatted medium (without permanently changing the density
102 settings of
103 .Ar device ) .
104 .Pp
105 If the
106 .Fl q
107 flag has not been specified, the user is asked for a confirmation
108 of the intended formatting process.
109 In order to continue, an answer
110 of
111 .Ql y
112 must be given.
113 .Pp
114 Note that
115 .Nm
116 does only perform low-level formatting.
117 In order to create
118 a file system on the medium, see the commands
119 .Xr newfs 8
120 for a
121 .Tn UFS
122 file system, or
123 .Xr newfs_msdos 8
124 for an
125 .Tn MS-DOS
126 (FAT)
127 file system.
128 .Sh EXIT STATUS
129 An exit status of 0 is returned upon successful operation.
130 Exit status
131 1 is returned on any errors during floppy formatting, and an exit status
132 of 2 reflects invalid arguments given to the program (along with an
133 appropriate information written to diagnostic output).
134 .Sh DIAGNOSTICS
135 Unless
136 .Fl q
137 has been specified, a single letter is printed to standard output
138 to inform the user about the progress of work.
139 First, an
140 .Ql F
141 is printed when the track is being formatted, then a
142 .Ql V
143 while it is being verified, and if an error has been detected, it
144 will finally change to
145 .Ql E .
146 Detailed status information (cylinder, head and sector number, and the
147 exact cause of the error) will be printed for up to 10 errors after the
148 entire formatting process has completed.
149 .Sh SEE ALSO
150 .Xr fdc 4 ,
151 .Xr fdcontrol 8 ,
152 .Xr newfs 8 ,
153 .Xr newfs_msdos 8
154 .Sh HISTORY
155 The
156 .Nm
157 utility
158 has been developed for
159 .Bx 386 0.1
160 and upgraded to the new
161 .Xr fdc 4
162 floppy disk driver.
163 It later became part of the
164 .Fx 1.1
165 system.
166 Starting with
167 .Fx 5.0 ,
168 it uses the unified density specifications as described in
169 .Xr fdcontrol 8 .
170 .Sh AUTHORS
171 .An -nosplit
172 The program has been contributed by
173 .An J\(:org Wunsch ,
174 Dresden, with changes by
175 .An Serge Vakulenko
176 and
177 .An Andrey A. Chernov ,
178 Moscow.