1 '\" te
   2 .\"  Copyright 2001, Sun Microsystems, Inc All Rights Reserved
   3 .\"  Copyright 2014 Andrew Stormont.
   4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
   5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
   6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
   7 .TH FDFORMAT 1 "May 2, 2014"
   8 .SH NAME
   9 fdformat \- format floppy diskette or PCMCIA memory card
  10 .SH SYNOPSIS
  11 .LP
  12 .nf
  13 \fBfdformat\fR [\fB-dDeEfHlLmMUqvx\fR] [\fB-b\fR \fIlabel\fR] [\fB-B\fR \fIfilename\fR]
  14      [\fB-t\fR \fIdostype\fR] [\fIdevname\fR]
  15 .fi
  16 
  17 .SH DESCRIPTION
  18 .sp
  19 .LP
  20 The \fBfdformat\fR utility has been superseded by \fBrmformat\fR(1), which
  21 provides most but not all of \fBfdformat\fR's functionality.
  22 .sp
  23 .LP
  24 \fBfdformat\fR is used to format diskettes and \fBPCMCIA\fR memory cards. All
  25 new blank diskettes or \fBPCMCIA\fR memory cards must be formatted before they
  26 can be used.
  27 .sp
  28 .LP
  29 \fBfdformat\fR formats and verifies the media and indicates whether any bad
  30 sectors were encountered. All existing data on the diskette or \fBPCMCIA\fR
  31 memory card, if any, is destroyed by formatting. If no device name is given,
  32 \fBfdformat\fR uses the diskette as a default.
  33 .sp
  34 .LP
  35 By default, \fBfdformat\fR uses the configured capacity of the drive to format
  36 the diskette. A \fB3.5\fR inch high-density drive uses diskettes with a
  37 formatted capacity of \fB1.44MB\fR. A \fB5.25\fR inch high-density drive uses
  38 diskettes with a formatted capacity of \fB1.2MB\fR. In either case, a density
  39 option does not have to be specified to \fBfdformat\fR. However, a density
  40 option must be specified when using a diskette with a lower capacity than the
  41 drive's default. Use the \fB-H\fR option to format high-density diskettes
  42 (\fB1.44MB\fR capacity) in an extra-high-density (\fBED\fR) drive. Use the
  43 \fB-D\fR option, the \fB-l\fR option, or the \fB-L\fR option to format double-
  44 density (or low-density) diskettes (\fB720KB\fR capacity) in an \fBHD\fR or
  45 \fBED\fR drive. To format medium-density diskettes (\fB1.2MB\fR capacity), use
  46 the \fB-M\fR option with \fB-t\fR \fBnec\fR (this is the same as using the
  47 \fB-m\fR option with \fB-t\fR \fBnec\fR).
  48 .sp
  49 .LP
  50 Extended density uses double-sided, extended-density or extra-high-density
  51 (\fBDS\fR/\fBED\fR) diskettes. Medium and high densities use the same media:
  52 double-sided, high-density (\fBDS\fR/\fBHD\fR) diskettes. Double (low) density
  53 uses double-sided, double-density (\fBDS\fR/\fBDD\fR
  54 .sp
  55 .LP
  56 \fBD\fR) diskettes. Substituting diskettes of one density for diskettes of
  57 either a higher or lower density generally does not work. Data integrity cannot
  58 be assured whenever a diskette is formatted to a capacity not matching its
  59 density.
  60 .sp
  61 .LP
  62 A \fBPCMCIA\fR memory card with densities from \fB512KB\fR to \fB64MB\fR may be
  63 formatted.
  64 .sp
  65 .LP
  66 \fBfdformat\fR writes new identification and data fields for each sector on all
  67 tracks unless the \fB-x\fR option is specified. For diskettes, each sector is
  68 verified if the \fB-v\fR option is specified.
  69 .sp
  70 .LP
  71 After formatting and verifying, \fBfdformat\fR writes an operating-system label
  72 on block \fB0\fR. Use the \fB-t\fR \fBdos\fR option (same as the \fB-d\fR
  73 option) to put an \fBMS-DOS\fR file system on the diskette or \fBPCMCIA\fR
  74 memory card after the format is done. Use the \fB-t\fR \fBnec\fR option with
  75 the \fB-M\fR option (same as the \fB-m\fR option) to put an \fBNEC-DOS\fR file
  76 system on a diskette. Otherwise, \fBfdformat\fR writes a \fBSunOS\fR label in
  77 block \fB0\fR.
  78 .SH OPTIONS
  79 .sp
  80 .LP
  81 The following options are supported:
  82 .sp
  83 .ne 2
  84 .na
  85 \fB\fB-b\fR \fIlabel\fR\fR
  86 .ad
  87 .RS 15n
  88 Labels the media with volume label. A SunOS volume label is restricted to 8
  89 characters. A \fBDOS\fR volume label is restricted to 11 upper-case characters.
  90 .RE
  91 
  92 .sp
  93 .ne 2
  94 .na
  95 \fB\fB-B\fR \fIfilename\fR\fR
  96 .ad
  97 .RS 15n
  98 Installs special boot loader in filename on an \fBMS-DOS\fR diskette. This
  99 option is only meaningful when the \fB-d\fR option (or \fB-t\fR \fBdos\fR) is
 100 also specified.
 101 .RE
 102 
 103 .sp
 104 .ne 2
 105 .na
 106 \fB\fB-D\fR\fR
 107 .ad
 108 .RS 15n
 109 Formats a \fB720KB\fR (3.5 inch) or \fB360KB\fR (5.25 inch) double-density
 110 diskette (same as the \fB-l\fR or \fB-L\fR options). This is the default for
 111 double-density type drives. It is needed if the drive is a high- or
 112 extended-density type.
 113 .RE
 114 
 115 .sp
 116 .ne 2
 117 .na
 118 \fB\fB-e\fR\fR
 119 .ad
 120 .RS 15n
 121 Ejects the diskette when done. This feature is not available on all systems.
 122 .RE
 123 
 124 .sp
 125 .ne 2
 126 .na
 127 \fB\fB-E\fR\fR
 128 .ad
 129 .RS 15n
 130 Formats a \fB2.88MB\fR (3.5 inch) extended-density diskette. This is the
 131 default for extended-density type drives.
 132 .RE
 133 
 134 .sp
 135 .ne 2
 136 .na
 137 \fB\fB-f\fR\fR
 138 .ad
 139 .RS 15n
 140 Forces formatting, that is, this option does not ask for confirmation before
 141 starting format.
 142 .RE
 143 
 144 .sp
 145 .ne 2
 146 .na
 147 \fB\fB-H\fR\fR
 148 .ad
 149 .RS 15n
 150 Formats a \fB1.44MB\fR (3.5 inch) or \fB1.2MB\fR (5.25 inch) high-density
 151 diskette. This is the default for high-density type drives; it is needed if the
 152 drive is the extended-density type.
 153 .RE
 154 
 155 .sp
 156 .ne 2
 157 .na
 158 \fB\fB-M\fR\fR
 159 .ad
 160 .RS 15n
 161 Writes a \fB1.2MB\fR (3.5 inch) medium-density format on a high-density
 162 diskette (use only with the -t nec option). This is the same as using \fB-m\fR.
 163 .sp
 164 This feature is not available on all systems.
 165 .RE
 166 
 167 .sp
 168 .ne 2
 169 .na
 170 \fB\fB-q\fR\fR
 171 .ad
 172 .RS 15n
 173 Quiet; does not print status messages.
 174 .RE
 175 
 176 .sp
 177 .ne 2
 178 .na
 179 \fB\fB-t\fR \fBdos\fR\fR
 180 .ad
 181 .RS 15n
 182 Installs an \fBMS-DOS\fR file system and boot sector formatting. This is
 183 equivalent to the \fBDOS\fR format command or the \fB-d\fR option.
 184 .RE
 185 
 186 .sp
 187 .ne 2
 188 .na
 189 \fB\fB-t\fR \fBnec\fR\fR
 190 .ad
 191 .RS 15n
 192 Installs an \fBNEC-DOS\fR file system and boot sector on the disk after
 193 formatting. This should be used only with the \fB-M\fR option. This feature is
 194 not available on all systems.
 195 .RE
 196 
 197 .sp
 198 .ne 2
 199 .na
 200 \fB\fB-U\fR\fR
 201 .ad
 202 .RS 15n
 203 Performs \fBumount\fR on any file systems and then formats. See
 204 \fBmount\fR(1M).
 205 .RE
 206 
 207 .sp
 208 .ne 2
 209 .na
 210 \fB\fB-v\fR\fR
 211 .ad
 212 .RS 15n
 213 Verifies each block of the diskette after the format.
 214 .RE
 215 
 216 .sp
 217 .ne 2
 218 .na
 219 \fB\fB-x\fR\fR
 220 .ad
 221 .RS 15n
 222 Skips the format and only writes a SunOS label or an \fBMS-DOS\fR file system.
 223 .RE
 224 
 225 .SH OPERANDS
 226 .sp
 227 .LP
 228 The following operands are supported:
 229 .sp
 230 .ne 2
 231 .na
 232 \fB\fIdevname\fR\fR
 233 .ad
 234 .RS 11n
 235 Replaces \fIdevname\fR with \fBrdiskette0\fR (systems without volume
 236 management) or \fBfloppy0\fR (systems with volume management) to use the first
 237 drive or rdiskette1 (systems without volume management) or \fBfloppy1\fR
 238 (systems with volume management) to use the second drive. If \fIdevname\fR is
 239 omitted, the first drive, if one exists, is used. For \fBPCMCIA\fR memory
 240 cards, replace \fIdevname\fR with the device name for the \fBPCMCIA\fR memory
 241 card which resides in \fB/dev/rdsk/c\fIN\fRt\fIN\fRd\fIN\fRs\fIN\fR\fR or
 242 /dev/dsk/c\fIN\fRt\fIN\fRd\fIN\fRs\fIN\fR. If \fIdevname\fR is omitted, the
 243 default diskette drive, if one exists, is used.
 244 .sp
 245 If devname is omitted, the default diskette drive, if one exists, will be used.
 246 \fIN\fR represents a decimal number and can be specified as follows:
 247 .sp
 248 .ne 2
 249 .na
 250 \fBc\fIN\fR\fR
 251 .ad
 252 .RS 6n
 253 Controller \fIN\fR
 254 .RE
 255 
 256 .sp
 257 .ne 2
 258 .na
 259 \fBt\fIN\fR\fR
 260 .ad
 261 .RS 6n
 262 Technology type \fIN\fR:
 263 .sp
 264 .in +2
 265 .nf
 266 
 267 0x1       ROM
 268 0x2       OTPROM
 269 0x3       EPROM
 270 0x4       EEPROM
 271 0x5       FLASH
 272 0x6       SRAM
 273 0x7       DRAM
 274 .fi
 275 .in -2
 276 .sp
 277 
 278 .RE
 279 
 280 .sp
 281 .ne 2
 282 .na
 283 \fBd\fIN\fR\fR
 284 .ad
 285 .RS 6n
 286 Technology region in type \fIN\fR.
 287 .RE
 288 
 289 .sp
 290 .ne 2
 291 .na
 292 \fBs\fIN\fR\fR
 293 .ad
 294 .RS 6n
 295 Slice \fIN\fR.
 296 .RE
 297 
 298 The following options are provided for compatibility with previous versions of
 299 \fBfdformat\fR. Their use is discouraged.
 300 .sp
 301 .ne 2
 302 .na
 303 \fB\fB-d\fR\fR
 304 .ad
 305 .RS 6n
 306 Formats an \fBMS-DOS\fR floppy diskette or \fBPCMCIA\fR memory card (same as
 307 \fB-t\fR \fBdos\fR). This is equivalent to the \fBMS-DOS FORMAT\fR command.
 308 .RE
 309 
 310 .sp
 311 .ne 2
 312 .na
 313 \fB\fB-l\fR\fR
 314 .ad
 315 .RS 6n
 316 Formats a \fB720KB\fR (3.5 inch) or \fB360KB\fR (5.25 inch) double-density
 317 diskette (same as \fB-D\fR or \fB-L\fR). This is the default for double-density
 318 type drives; it is needed if the drive is the high- or extended-density type.
 319 .RE
 320 
 321 .sp
 322 .ne 2
 323 .na
 324 \fB\fB-L\fR\fR
 325 .ad
 326 .RS 6n
 327 Formats a \fB720KB\fR (3.5 inch) or \fB360KB\fR (5.25 inch) double-density
 328 diskette (same as \fB-l\fR or \fB-D\fR). This is the default for double-density
 329 type drives.
 330 .RE
 331 
 332 .sp
 333 .ne 2
 334 .na
 335 \fB\fB-m\fR\fR
 336 .ad
 337 .RS 6n
 338 Writes a \fB1.2 MB\fR (3.5 inch) medium- density format on a high-density
 339 diskette (use only with the \fB-t\fR \fBnec\fR option). This is the same as
 340 using \fB-M\fR. This feature is not available on all systems.
 341 .RE
 342 
 343 .RE
 344 
 345 .SH FILES
 346 .sp
 347 .ne 2
 348 .na
 349 \fB/dev/diskette0\fR
 350 .ad
 351 .RS 24n
 352 Directory providing block device access for the media in floppy drive \fB0\fR.
 353 .RE
 354 
 355 .sp
 356 .ne 2
 357 .na
 358 \fB/dev/diskette0\fR
 359 .ad
 360 .RS 24n
 361 Directory providing character device access for the media in floppy drive
 362 \fB0\fR.
 363 .RE
 364 
 365 .sp
 366 .ne 2
 367 .na
 368 \fB/dev/aliases/floppy0\fR
 369 .ad
 370 .RS 24n
 371 Symbolic link to the character device for the media in floppy drive \fB0\fR.
 372 .RE
 373 
 374 .sp
 375 .ne 2
 376 .na
 377 \fB/dev/rdiskette\fR
 378 .ad
 379 .RS 24n
 380 Directory providing character device access for the media in the primary floppy
 381 drive, usually drive \fB0\fR.
 382 .RE
 383 
 384 .sp
 385 .ne 2
 386 .na
 387 \fB/dev/dsk/c\fIN\fRt\fIN\fRd\fIN\fRs\fIN\fR\fR
 388 .ad
 389 .RS 24n
 390 Directory providing block device access for the \fBPCMCIA\fR memory card. See
 391 OPERANDS for a description of \fIN\fR.
 392 .RE
 393 
 394 .sp
 395 .ne 2
 396 .na
 397 \fB/dev/rdsk/c\fIN\fRt\fIN\fRd\fIN\fRs\fIN\fR\fR
 398 .ad
 399 .RS 24n
 400 Directory providing character device access for the \fBPCMCIA\fR memory card.
 401 See OPERANDS for a description of \fIN\fR.
 402 .RE
 403 
 404 .sp
 405 .ne 2
 406 .na
 407 \fB/dev/aliases/pcmem\fIS\fR\fR
 408 .ad
 409 .RS 24n
 410 Symbolic link to the character device for the \fBPCMCIA\fR memory card in
 411 socket \fIS\fR where \fIS\fR represents a \fBPCMCIA\fR socket number.
 412 .RE
 413 
 414 .sp
 415 .ne 2
 416 .na
 417 \fB/dev/rdsk/c\fIN\fRt\fIN\fRd\fIN\fRs\fIN\fR\fR
 418 .ad
 419 .RS 24n
 420 Directory providing character device access for the \fBPCMCIA\fR memory card.
 421 See OPERANDS for a description of \fIN\fR.
 422 .RE
 423 
 424 .sp
 425 .ne 2
 426 .na
 427 \fB/dev/dsk/c\fIN\fRt\fIN\fRd\fIN\fRs\fIN\fR\fR
 428 .ad
 429 .RS 24n
 430 Directory providing block device access for the \fBPCMCIA\fR memory card. See
 431 OPERANDS for a description of \fIN\fR.
 432 .RE
 433 
 434 .SH SEE ALSO
 435 .sp
 436 .LP
 437 \fBcpio\fR(1), \fBeject\fR(1), \fBrmformat\fR(1), \fBtar\fR(1),
 438 \fBvolcheck\fR(1), \fBmount\fR(1M), \fBnewfs\fR(1M), \fBprtvtoc\fR(1M),
 439 \fBattributes\fR(5), \fBpcfs\fR(7FS)
 440 .SS "x86 Only"
 441 .sp
 442 .LP
 443 \fBfd\fR(7D)
 444 .SH NOTES
 445 .sp
 446 .LP
 447 A diskette or \fBPCMCIA\fR memory card containing a \fBufs\fR file system
 448 created on a SPARC based system (by using \fBfdformat\fR and \fBnewfs\fR(1M)),
 449 is not identical to a diskette or \fBPCMCIA\fR memory card containing a ufs
 450 file system created on an x86 based system. Do not interchange ufs diskettes or
 451 memory cards between these platforms. Use \fBcpio\fR(1) or \fBtar\fR(1) to
 452 transfer files on diskettes or memory cards between them. A diskette or
 453 \fBPCMCIA\fR memory card formatted using the \fB-t\fR \fBdos\fR option (or
 454 \fB-d\fR) for \fBMS-DOS\fR does not have the necessary system files, and is
 455 therefore not bootable. Trying to boot from it on a \fBPC\fR produces the
 456 following message:
 457 .sp
 458 .in +2
 459 .nf
 460 Non-System disk or disk error.
 461 Replace and strike any key when ready
 462 .fi
 463 .in -2
 464 .sp
 465 
 466 .SH BUGS
 467 .sp
 468 .LP
 469 Currently, bad sector mapping is not supported on floppy diskettes or
 470 \fBPCMCIA\fR memory cards. Therefore, a diskette or memory card is unusable if
 471 \fBfdformat\fR finds an error (bad sector).