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: src/usr.sbin/fdformat/fdformat.1,v 1.17.2.6 2002/06/21 16:40:26 charnier Exp $ 26.\" $DragonFly: src/usr.sbin/fdformat/fdformat.1,v 1.2 2003/06/17 04:29:53 dillon Exp $ 27.\" 28.Dd July 2, 2001 29.Os 30.Dt FDFORMAT 1 31.Sh NAME 32.Nm fdformat 33.Nd format floppy disks 34.Sh SYNOPSIS 35.Nm 36.Op Fl q 37.Op Fl y 38.Op Fl v | Fl n 39.Op Fl f Ar capacity 40.Op Fl c Ar cyls 41.Op Fl s Ar secs 42.Op Fl h Ar heads 43.Nm 44.Op Fl r Ar rate 45.Op Fl g Ar gap3len 46.Op Fl i Ar intleave 47.Op Fl S Ar secshft 48.Op Fl F Ar fillbyte 49.Op Fl t Ar steps_per_track 50.Ar device_name 51.Sh DESCRIPTION 52The 53.Nm 54utility formats a floppy disk at device 55.Ar device_name . 56.Ar Device_name 57may be given either with a full path 58name of a device node for a floppy disk drive 59(e.g.\& 60.Pa /dev/fd0 ) , 61or a default name in an abbreviated form 62(e.g.\& 63.Em fd0 ) . 64In the latter case, the name is constructed by prepending 65.Pa /dev/ 66and appending a 67.Em .capacity 68to the 69.Ar device_name . 70Note that any geometry constraints of the device node 71(minor device number) 72are meaningless, since they're overridden by 73.Nm . 74.Pp 75The options are as follows: 76.Bl -tag -width 10n -offset indent 77.It Fl q 78Suppress any normal output from the command, and don't ask the 79user for a confirmation whether to format the floppy disk at 80.Ar device_name . 81.It Fl y 82Suppress confirmation request by automagically responding "yes", but still 83report format status. 84.It Fl f Ar capacity 85The normal way to specify the desired formatting parameters. 86.Ar Capacity 87is the number of kilobytes to format. 88Valid choices are 360, 720, 800, 820, 891200, 1440, 1480 or 1720. 90.It Fl n 91Don't verify floppy after formatting. 92.It Fl v 93Don't format, verify only. 94.It Fl c Ar cyls 95Number of cylinders: 40 or 80. 96.It Fl s Ar secs 97Number of sectors per track: 9, 10, 15 or 18. 98.It Fl h Ar heads 99Number of floppy heads: 1 or 2. 100.It Fl r Ar rate 101Data rate: 250, 300 or 500 kbps. 102.It Fl g Ar gap3len 103Gap length. 104.It Fl i Ar intleave 105Interleave factor. 106.It Fl S Ar secshft 107Sector size: 0=128, 1=256, 2=512 bytes. 108.It Fl F Ar fillbyte 109Fill byte. 110.It Fl t Ar steps_per_track 111Number of steps per track. 112An alternate method to specify the geometry data to write to the floppy disk. 113.El 114.Pp 115If the 116.Fl q 117flag has not been specified, the user is asked for a confirmation 118of the intended formatting process. 119In order to continue, an answer 120of 121.Dq y 122must be given. 123.Pp 124Note that 125.Nm 126does only perform low-level formatting. In case you wish to create 127a file system on the medium, see the commands 128.Xr newfs 8 129for an 130.Em ufs 131file system, or 132.Xr newfs_msdos 8 133for an 134.Em MS-DOS (FAT) 135file system. 136.Sh DIAGNOSTICS 137Unless 138.Fl q 139has been specified, a single letter is printed to standard output 140to inform the user about the progress of work. 141First, an 142.Sq Em F 143is printed when the track(s) is being formatted, then a 144.Sq Em V 145while it's being verified, and if an error has been detected, it 146will finally change to 147.Sq Em E . 148Detailed status information (cylinder, head and sector number, and the 149exact cause of the error) will then be printed for up to 10 errors. 150.Pp 151An exit status of 0 is returned upon successful operation. 152Exit status 1531 is returned on any errors during floppy formatting, and an exit status 154of 2 reflects invalid arguments given to the program (along with an 155appropriate information written to diagnostic output). 156.Sh SEE ALSO 157.Xr fdc 4 , 158.Xr newfs 8 , 159.Xr newfs_msdos 8 160.Sh HISTORY 161The 162.Nm 163utility has been developed for 164.Bx 386 0.1 165and upgraded to the new 166.Xr fdc 4 167floppy disk driver. 168It later became part of the 169.Fx 1.1 170system. 171.Sh AUTHORS 172.An -nosplit 173The program has been contributed by 174.An J\(:org Wunsch , 175Dresden, with changes by 176.An Serge Vakulenko 177and 178.An Andrey A. Chernov , 179Moscow. 180