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