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