1995-11-05 19:23:42 +00:00
|
|
|
.\" Copyright (C) 1993, 1994, 1995 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
|
|
|
.\"
|
1994-01-26 23:44:34 +00:00
|
|
|
.Dd September 16, 1993
|
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
|
1997-09-17 06:32:45 +00:00
|
|
|
.Op Fl q
|
2000-06-01 22:27:30 +00:00
|
|
|
.Op Fl y
|
1997-09-17 06:32:45 +00:00
|
|
|
.Op Fl v | Fl n
|
|
|
|
.Op Fl f Ar capacity
|
|
|
|
.Op Fl c Ar cyls
|
|
|
|
.Op Fl s Ar secs
|
|
|
|
.Op Fl h Ar heads
|
2000-11-20 20:10:44 +00:00
|
|
|
.Nm
|
1997-09-17 06:32:45 +00:00
|
|
|
.Op Fl r Ar rate
|
|
|
|
.Op Fl g Ar gap3len
|
|
|
|
.Op Fl i Ar intleave
|
|
|
|
.Op Fl S Ar secshft
|
|
|
|
.Op Fl F Ar fillbyte
|
|
|
|
.Op Fl t Ar steps_per_track
|
1994-01-26 23:44:34 +00:00
|
|
|
.Ar device_name
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
.Nm Fdformat
|
|
|
|
formats a floppy disk at device
|
|
|
|
.Ar device_name .
|
|
|
|
.Ar Device_name
|
2000-01-23 12:49:42 +00:00
|
|
|
may be given either with a full path
|
|
|
|
name of a device node for a floppy disk drive
|
|
|
|
.Pq e.g. Pa /dev/fd0 ,
|
|
|
|
or a default name in an abbreviated form
|
|
|
|
.Pq e.g. Em fd0 .
|
1994-01-26 23:44:34 +00:00
|
|
|
In the latter case, the name is constructed by prepending
|
2000-01-23 12:49:42 +00:00
|
|
|
.Pa /dev/
|
1994-05-22 17:43:34 +00:00
|
|
|
and appending a
|
1994-01-26 23:44:34 +00:00
|
|
|
.Em .capacity
|
|
|
|
to the
|
|
|
|
.Ar device_name .
|
|
|
|
Note that any geometry constraints of the device node
|
|
|
|
.Pq minor device number
|
|
|
|
are meaningless, since they're overridden by
|
2000-11-20 20:10:44 +00:00
|
|
|
.Nm .
|
1994-01-26 23:44:34 +00:00
|
|
|
.Pp
|
|
|
|
The options are as follows:
|
|
|
|
.Bl -tag -width 10n -offset indent
|
|
|
|
.It Fl q
|
1997-09-17 06:32:45 +00:00
|
|
|
Suppress any normal output from the command, and don't ask the
|
1994-01-26 23:44:34 +00:00
|
|
|
user for a confirmation whether to format the floppy disk at
|
|
|
|
.Ar device_name .
|
2000-06-01 22:27:30 +00:00
|
|
|
.It Fl y
|
|
|
|
Suppress confirmation request by automagically responding "yes", but still
|
|
|
|
report format status.
|
1994-01-26 23:44:34 +00:00
|
|
|
.It Fl f Ar capacity
|
|
|
|
The normal way to specify the desired formatting parameters.
|
|
|
|
.Ar Capacity
|
2000-03-01 14:09:25 +00:00
|
|
|
is the number of kilobytes to format.
|
|
|
|
Valid choices are 360, 720, 800, 820,
|
1997-09-17 06:32:45 +00:00
|
|
|
1200, 1440, 1480 or 1720.
|
1994-01-26 23:44:34 +00:00
|
|
|
.It Fl n
|
|
|
|
Don't verify floppy after formatting.
|
|
|
|
.It Fl v
|
|
|
|
Don't format, verify only.
|
|
|
|
.It Fl c Ar cyls
|
1997-09-17 06:32:45 +00:00
|
|
|
Number of cylinders: 40 or 80.
|
1994-01-26 23:44:34 +00:00
|
|
|
.It Fl s Ar secs
|
1997-09-17 06:32:45 +00:00
|
|
|
Number of sectors per track: 9, 10, 15 or 18.
|
1994-01-26 23:44:34 +00:00
|
|
|
.It Fl h Ar heads
|
1997-09-17 06:32:45 +00:00
|
|
|
Number of floppy heads: 1 or 2.
|
1994-01-26 23:44:34 +00:00
|
|
|
.It Fl r Ar rate
|
1997-09-17 06:32:45 +00:00
|
|
|
Data rate: 250, 300 or 500 kbps.
|
1994-01-26 23:44:34 +00:00
|
|
|
.It Fl g Ar gap3len
|
1997-09-17 06:32:45 +00:00
|
|
|
Gap length.
|
1994-01-26 23:44:34 +00:00
|
|
|
.It Fl i Ar intleave
|
1997-09-17 06:32:45 +00:00
|
|
|
Interleave factor.
|
1994-01-26 23:44:34 +00:00
|
|
|
.It Fl S Ar secshft
|
1997-09-17 06:32:45 +00:00
|
|
|
Sector size: 0=128, 1=256, 2=512 bytes.
|
1994-01-26 23:44:34 +00:00
|
|
|
.It Fl F Ar fillbyte
|
1997-09-17 06:32:45 +00:00
|
|
|
Fill byte.
|
1994-01-26 23:44:34 +00:00
|
|
|
.It Fl t Ar steps_per_track
|
1997-09-17 06:32:45 +00:00
|
|
|
Number of steps per track.
|
1994-01-26 23:44:34 +00:00
|
|
|
An alternate method to specify the geometry data to write to the floppy disk.
|
|
|
|
.El
|
2000-12-27 15:30:30 +00:00
|
|
|
.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
|
|
|
|
.Dq y
|
|
|
|
must be given.
|
1995-11-05 19:23:42 +00:00
|
|
|
.Pp
|
|
|
|
Note that
|
|
|
|
.Nm
|
|
|
|
does only perform low-level formatting. In case you wish to create
|
|
|
|
a file system on the medium, see the commands
|
|
|
|
.Xr newfs 8
|
|
|
|
for an
|
|
|
|
.Em ufs
|
|
|
|
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
|
|
|
|
.Em MS-DOS (FAT)
|
|
|
|
file system.
|
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
|
|
|
|
.Sq Em F
|
|
|
|
is printed when the track(s) is being formatted, then a
|
|
|
|
.Sq Em V
|
|
|
|
while it's being verified, and if an error has been detected, it
|
|
|
|
will finally change to
|
|
|
|
.Sq Em E .
|
1994-01-26 23:44:34 +00:00
|
|
|
.Pp
|
2000-03-01 14:09:25 +00:00
|
|
|
An exit status of 0 is returned upon successful operation.
|
|
|
|
Exit status
|
1994-01-26 23:44:34 +00:00
|
|
|
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).
|
|
|
|
.Sh SEE ALSO
|
1995-11-05 19:23:42 +00:00
|
|
|
.Xr fdc 4 ,
|
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
|
|
|
|
.Nm Fdformat
|
1994-02-11 21:41:44 +00:00
|
|
|
has been developed for 386BSD 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.
|
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.
|