1 .\" Copyright (C) 1993, 1994, 1995, 2001 by Joerg Wunsch, Dresden
2 .\" All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
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.
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.
32 .Nd format floppy disks
43 utility formats a floppy disk at
47 may either be given as a full path
48 name of a device node for a floppy disk drive
51 or using an abbreviated name that will be looked up
57 The options are as follows:
58 .Bl -tag -width ".Fl s Ar fmtstr"
62 as the fill byte for newly formatted sectors.
66 must be a number in the range 0 through 255 using common C
71 Specify the density settings for a
73 kilobyte format, as described in
76 Specify the density settings using explicit parameters, as
80 Do not verify floppy after formatting.
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
86 Do not format, verify only.
88 Do not ask for confirmation whether to format the floppy disk but
89 still report formatting status.
92 For non-autoselecting subdevices, neither
96 may be specified, since the preconfigured media density settings
97 from the kernel driver will always be used.
100 is a device with automatic media density selection (see
102 both methods can be used to override the density settings for the
103 newly formatted medium (without permanently changing the density
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
118 does only perform low-level formatting.
120 a file system on the medium, see the commands
131 An exit status of 0 is returned upon successful operation.
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).
137 To format a new double-sided, high-density (HD) 1.44 MB disk
138 inserted in the first floppy disk drive, issue:
140 .Dl "/usr/sbin/fdformat -f 1440 /dev/fd0"
142 After low-level formatting the disk with
144 create a disk label so that the system can determine the size and
145 geometry of the disk.
146 The supported geometry values are listed in
151 To write the disk label, use
154 .Dl "/sbin/bsdlabel -B -w /dev/fd0 fd1440"
156 The floppy is now ready to be high-level formatted with a file system.
157 To format the floppy disk with FAT, issue:
159 .Dl "/sbin/newfs_msdos /dev/fd0"
163 has been specified, a single letter is printed to standard output
164 to inform the user about the progress of work.
167 is printed when the track is being formatted, then a
169 while it is being verified, and if an error has been detected, it
170 will finally change to
172 Detailed status information (cylinder, head and sector number, and the
173 exact cause of the error) will be printed for up to 10 errors after the
174 entire formatting process has completed.
185 has been developed for
187 and upgraded to the new
190 It later became part of the
195 it uses the unified density specifications as described in
199 The program has been contributed by
201 Dresden, with changes by
204 .An Andrey A. Chernov ,