2001-07-02 21:24:03 +00:00
|
|
|
.\" Copyright (C) 1993, 1994, 1995, 2001 by Joerg Wunsch, Dresden
|
1994-01-26 23:44:34 +00:00
|
|
|
.\" 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.
|
|
|
|
.\"
|
1994-05-22 17:43:34 +00:00
|
|
|
.\" 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.
|
1994-01-26 23:44:34 +00:00
|
|
|
.\"
|
1999-08-28 01:35:59 +00:00
|
|
|
.\" $FreeBSD$
|
1999-07-12 20:12:29 +00:00
|
|
|
.\"
|
2001-12-25 21:21:18 +00:00
|
|
|
.Dd December 25, 2001
|
1994-05-22 17:43:34 +00:00
|
|
|
.Os
|
1994-01-26 23:44:34 +00:00
|
|
|
.Dt FDFORMAT 1
|
|
|
|
.Sh NAME
|
|
|
|
.Nm fdformat
|
|
|
|
.Nd format floppy disks
|
|
|
|
.Sh SYNOPSIS
|
2000-11-20 20:10:44 +00:00
|
|
|
.Nm
|
2001-12-25 21:21:18 +00:00
|
|
|
.Op Fl F Ar fill
|
|
|
|
.Op Fl f Ar fmt
|
|
|
|
.Op Fl s Ar fmtstr
|
|
|
|
.Op Fl nqvy
|
|
|
|
.Ar device
|
1994-01-26 23:44:34 +00:00
|
|
|
.Sh DESCRIPTION
|
2001-12-25 21:21:18 +00:00
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility formats a floppy disk at
|
|
|
|
.Ar device ,
|
|
|
|
where
|
|
|
|
.Ar device
|
|
|
|
may either be given as a full path
|
2000-01-23 12:49:42 +00:00
|
|
|
name of a device node for a floppy disk drive
|
2001-08-07 15:48:51 +00:00
|
|
|
(e.g.\&
|
|
|
|
.Pa /dev/fd0 ) ,
|
2001-12-25 21:21:18 +00:00
|
|
|
or using an abbreviated name that will be looked up
|
|
|
|
under
|
|
|
|
.Pa /dev
|
2001-08-07 15:48:51 +00:00
|
|
|
(e.g.\&
|
2002-01-10 17:00:36 +00:00
|
|
|
.Dq Li fd0 ) .
|
1994-01-26 23:44:34 +00:00
|
|
|
.Pp
|
|
|
|
The options are as follows:
|
2002-01-10 17:04:10 +00:00
|
|
|
.Bl -tag -width ".Fl s Ar fmtstr"
|
2001-12-25 21:21:18 +00:00
|
|
|
.It Fl F Ar fill
|
|
|
|
Use
|
|
|
|
.Ar fill
|
|
|
|
as the fill byte for newly formatted sectors.
|
|
|
|
.Ar fill
|
|
|
|
must be a number in the range 0 through 255 using common C
|
2002-01-10 17:00:36 +00:00
|
|
|
language notation.
|
|
|
|
The default value is
|
|
|
|
.Dq Li 0xf5 .
|
2001-12-25 21:21:18 +00:00
|
|
|
.It Fl f Ar fmt
|
|
|
|
Specify the density settings for a
|
|
|
|
.Ar fmt
|
|
|
|
kilobyte format, as described in
|
|
|
|
.Xr fdcontrol 8 .
|
|
|
|
.It Fl s Ar fmtstr
|
|
|
|
Specify the density settings using explicit parameters, as
|
|
|
|
described in
|
|
|
|
.Xr fdcontrol 8 .
|
|
|
|
.It Fl n
|
2002-01-10 17:00:36 +00:00
|
|
|
Do not verify floppy after formatting.
|
1994-01-26 23:44:34 +00:00
|
|
|
.It Fl q
|
2002-01-10 17:00:36 +00:00
|
|
|
Suppress any normal output from the command, and do not ask the
|
1994-01-26 23:44:34 +00:00
|
|
|
user for a confirmation whether to format the floppy disk at
|
2001-12-25 21:21:18 +00:00
|
|
|
.Ar device .
|
1994-01-26 23:44:34 +00:00
|
|
|
.It Fl v
|
2002-01-10 17:00:36 +00:00
|
|
|
Do not format, verify only.
|
2001-12-25 21:21:18 +00:00
|
|
|
.It Fl y
|
|
|
|
Do not ask for confirmation whether to format the floppy disk but
|
|
|
|
still report formatting status.
|
1994-01-26 23:44:34 +00:00
|
|
|
.El
|
2000-12-27 15:30:30 +00:00
|
|
|
.Pp
|
2001-12-25 21:21:18 +00:00
|
|
|
For non-autoselecting subdevices, neither
|
|
|
|
.Fl f Ar fmt
|
|
|
|
nor
|
|
|
|
.Fl s Ar fmtstr
|
|
|
|
may be specified, since the preconfigured media density settings
|
2002-01-10 17:00:36 +00:00
|
|
|
from the kernel driver will always be used.
|
|
|
|
However, if
|
2001-12-25 21:21:18 +00:00
|
|
|
.Ar device
|
|
|
|
is a device with automatic media density selection (see
|
|
|
|
.Xr fdc 4 ) ,
|
|
|
|
both methods can be used to override the density settings for the
|
|
|
|
newly formatted medium (without permanently changing the density
|
|
|
|
settings of
|
|
|
|
.Ar device ) .
|
|
|
|
.Pp
|
1994-01-26 23:44:34 +00:00
|
|
|
If the
|
|
|
|
.Fl q
|
|
|
|
flag has not been specified, the user is asked for a confirmation
|
2000-03-01 14:09:25 +00:00
|
|
|
of the intended formatting process.
|
|
|
|
In order to continue, an answer
|
1994-01-26 23:44:34 +00:00
|
|
|
of
|
2002-01-10 17:00:36 +00:00
|
|
|
.Ql y
|
1994-01-26 23:44:34 +00:00
|
|
|
must be given.
|
1995-11-05 19:23:42 +00:00
|
|
|
.Pp
|
|
|
|
Note that
|
|
|
|
.Nm
|
2002-01-10 17:00:36 +00:00
|
|
|
does only perform low-level formatting.
|
|
|
|
In order to create
|
1995-11-05 19:23:42 +00:00
|
|
|
a file system on the medium, see the commands
|
|
|
|
.Xr newfs 8
|
2002-01-10 17:00:36 +00:00
|
|
|
for a
|
|
|
|
.Tn UFS
|
1995-11-05 19:23:42 +00:00
|
|
|
file system, or
|
1998-09-29 17:31:28 +00:00
|
|
|
.Xr newfs_msdos 8
|
1995-11-05 19:23:42 +00:00
|
|
|
for an
|
2002-01-10 17:00:36 +00:00
|
|
|
.Tn MS-DOS
|
|
|
|
(FAT)
|
1995-11-05 19:23:42 +00:00
|
|
|
file system.
|
2005-01-18 09:17:49 +00:00
|
|
|
.Sh EXIT STATUS
|
|
|
|
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).
|
1994-01-26 23:44:34 +00:00
|
|
|
.Sh DIAGNOSTICS
|
1994-02-11 21:41:44 +00:00
|
|
|
Unless
|
1994-01-26 23:44:34 +00:00
|
|
|
.Fl q
|
1994-02-11 21:41:44 +00:00
|
|
|
has been specified, a single letter is printed to standard output
|
|
|
|
to inform the user about the progress of work.
|
|
|
|
First, an
|
2002-01-10 17:00:36 +00:00
|
|
|
.Ql F
|
|
|
|
is printed when the track is being formatted, then a
|
|
|
|
.Ql V
|
|
|
|
while it is being verified, and if an error has been detected, it
|
1994-02-11 21:41:44 +00:00
|
|
|
will finally change to
|
2002-01-10 17:00:36 +00:00
|
|
|
.Ql E .
|
2001-07-02 21:24:03 +00:00
|
|
|
Detailed status information (cylinder, head and sector number, and the
|
2001-12-25 21:21:18 +00:00
|
|
|
exact cause of the error) will be printed for up to 10 errors after the
|
|
|
|
entire formatting process has completed.
|
1994-01-26 23:44:34 +00:00
|
|
|
.Sh SEE ALSO
|
1995-11-05 19:23:42 +00:00
|
|
|
.Xr fdc 4 ,
|
2001-12-25 21:21:18 +00:00
|
|
|
.Xr fdcontrol 8 ,
|
1998-09-29 17:31:28 +00:00
|
|
|
.Xr newfs 8 ,
|
|
|
|
.Xr newfs_msdos 8
|
1994-01-26 23:44:34 +00:00
|
|
|
.Sh HISTORY
|
2002-01-10 17:00:36 +00:00
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility
|
2001-08-14 10:01:54 +00:00
|
|
|
has been developed for
|
|
|
|
.Bx 386 0.1
|
1994-01-26 23:44:34 +00:00
|
|
|
and upgraded to the new
|
1998-04-20 11:34:47 +00:00
|
|
|
.Xr fdc 4
|
2000-03-01 14:09:25 +00:00
|
|
|
floppy disk driver.
|
|
|
|
It later became part of the
|
1997-09-17 06:32:45 +00:00
|
|
|
.Fx 1.1
|
|
|
|
system.
|
2001-12-25 21:21:18 +00:00
|
|
|
Starting with
|
|
|
|
.Fx 5.0 ,
|
|
|
|
it uses the unified density specifications as described in
|
|
|
|
.Xr fdcontrol 8 .
|
1998-03-23 08:31:20 +00:00
|
|
|
.Sh AUTHORS
|
2000-11-22 09:35:58 +00:00
|
|
|
.An -nosplit
|
1994-01-26 23:44:34 +00:00
|
|
|
The program has been contributed by
|
2000-11-10 17:46:15 +00:00
|
|
|
.An J\(:org Wunsch ,
|
1998-03-23 08:31:20 +00:00
|
|
|
Dresden, with changes by
|
|
|
|
.An Serge Vakulenko
|
|
|
|
and
|
|
|
|
.An Andrey A. Chernov ,
|
|
|
|
Moscow.
|