1.\" $OpenBSD: fdformat.1,v 1.21 2018/09/17 15:44:16 jmc Exp $ 2.\" 3.\" Copyright (C) 1993, 1994 by Joerg Wunsch, Dresden 4.\" All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 9.\" 1. Redistributions of source code must retain the above copyright 10.\" notice, this list of conditions and the following disclaimer. 11.\" 2. Redistributions in binary form must reproduce the above copyright 12.\" notice, this list of conditions and the following disclaimer in the 13.\" documentation and/or other materials provided with the distribution. 14.\" 15.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS 16.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18.\" DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, 19.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 21.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 23.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24.\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25.\" POSSIBILITY OF SUCH DAMAGE. 26.\" 27.Dd $Mdocdate: September 17 2018 $ 28.Dt FDFORMAT 1 29.Os 30.Sh NAME 31.Nm fdformat 32.Nd format floppy disks 33.Sh SYNOPSIS 34.Nm fdformat 35.Bk -words 36.Op Fl nqv 37.Op Fl c Ar cyls 38.Op Fl F Ar fillbyte 39.Op Fl g Ar gap3len 40.Op Fl h Ar heads 41.Op Fl i Ar intleave 42.Op Fl r Ar rate 43.Op Fl S Ar secshft 44.Op Fl s Ar secs 45.Op Fl t Ar steps_per_track 46.Ar device_name 47.Ek 48.Sh DESCRIPTION 49.Nm fdformat 50formats a floppy disk at device 51.Ar device_name . 52.Ar device_name 53should be a character device; it may be given either with a full path 54name of a raw device node for a floppy disk drive 55.Pq e.g., Pa /dev/rfd0c , 56or default name in an abbreviated form, 57.Pq e.g., Em fd0 . 58Note that any geometry constraints of the device node 59.Pq minor device number 60are meaningless, since they're overridden by 61.Nm fdformat . 62.Pp 63The options are as follows: 64.Bl -tag -width Ds 65.It Fl c Ar cyls 66Number of cylinders 67.Pq 40 or 80 . 68.It Fl F Ar fillbyte 69Use 70.Ar fillbyte 71as fill byte. 72.It Fl g Ar gap3len 73Length of gap at the end of any sector 74.Pq Dq gap 3 . 75.It Fl h Ar heads 76Number of floppy heads 77.Pq 1 or 2 . 78.It Fl i Ar intleave 79Sector interleave to be used. 80.It Fl n 81Don't verify floppy after formatting. 82.It Fl q 83Suppress any normal output from the command, and don't ask the 84user for confirmation whether to format the floppy disk at 85.Ar device_name . 86.It Fl r Ar rate 87Data transfer rate in kilobyte/sec 88.Pq 250, 300, or 500 . 89.It Fl S Ar secshft 90Sector size code: 0 for 128, 1 for 256, and 2 for 512 byte 91sectors. 92.It Fl s Ar secs 93Number of sectors per track 94.Pq 9, 10, 15, or 18 . 95.It Fl t Ar steps_per_track 96Number of steps per track. 97An alternate method to specify the 98geometry data to write to the floppy disk. 99.It Fl v 100Don't format; verify only. 101.El 102.Pp 103If the 104.Fl q 105flag has not been specified, the user is asked for confirmation 106of the intended formatting process. 107In order to continue, an answer of 108.Dq y 109must be given. 110.Sh EXIT STATUS 111An exit status of 0 is returned upon successful operation. 112Exit status 1131 is returned on any errors during floppy formatting, and an exit status 114of 2 reflects invalid arguments given to the program (along with 115appropriate information written to diagnostic output). 116.Sh DIAGNOSTICS 117Unless 118.Fl q 119has been specified, a single letter is printed to standard output 120to inform the user about the progress of work. 121First, an 122.Dq F 123is printed when the track(s) is being formatted, then a 124.Dq V 125while it's being verified, and if an error has been detected, it 126will finally change to 127.Dq E . 128.Sh SEE ALSO 129.Xr fdc 4 130.Sh HISTORY 131.Nm fdformat 132was developed for 386BSD 0.1 and upgraded to the new 133.Xr fdc 4 134floppy disk driver. 135It later became part of 136.Fx 1.1 , 137and was then ported to 138.Ox 1.2 . 139.Sh AUTHORS 140.An -nosplit 141The program was contributed by 142.An Joerg Wunsch , 143Dresden, with changes by 144.An Serge Vakulenko 145and 146.An Andrew A. Chernov , 147Moscow. 148