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