As mentioned in "Hardware Considerations", a UFS diskette formatted on a SPARC platform can only be used on another SPARC platform, and a UFS diskette formatted on an x86 platform can only be used on an x86 platform running Solaris.
Formatting a diskette erases any pre-existing content.
File Manager automatically displays a formatting window when you insert an unformatted diskette. Unfortunately, File Manager formatting is unreliable. To avoid the window, quit from File Manager. If you prefer to keep File Manager open, quit the formatting window when it appears.
Make sure the diskette is write-enabled.
On both 3.5-inch and 5.25 inch diskettes, write-protection is controlled by a small tab in either the lower left or lower right corner. If you can see through the square hole behind the tab, the diskette is write-protected. If the hole is covered by the tab, the diskette is write-enabled. (If you need to eject the diskette to examine it, simply type eject floppy in a shell.)
Insert the diskette.
Make sure the diskette is completely inserted.
$ fdformat -v -U [density-options convenience-options] |
-v |
Verifies whether the diskette was formatted correctly. |
|
-U |
Unmounts the diskette if it is mounted. |
|
density-options |
If the drive density is 1.44 Mbytes, density-options are: |
|
|
--none-- |
Formats a 1.44 Mbyte diskette. |
|
-D |
Formats a 720 Kbyte diskette. |
|
|
A complete list of density-options appears in Table 13-3. |
convenience-options |
|
|
|
-e |
Ejects the diskette when done formatting. |
|
-f |
Forces formatting without asking for confirmation. |
|
-b label |
Names the diskette. label must be eight characters or less, upper or lower case. |
|
-z |
Lists all the options to the fdformat command, but does not format the diskette. |
If you try to format a 720 Kbyte (DD) diskette for 1.44 Mbytes, fdformat will not stop you unless you include the -v option. With the -v option, fdformat will format the diskette, but the verification will catch the error and notify you with the following message: fdformat: check diskette density, I/O error
The fdformat command displays a confirmation message (unless you used the -f option), indicating the type of formatting to be performed:
Formatting 1.44 M in /vol/dev/rdiskette0/unformatted Press return to start formatting floppy. |
Select one of the options in the table below.
To ... |
Press ... |
---|---|
Confirm the type of formatting |
Return (unless you used the -f option in the previous step, in which case no confirmation is necessary) |
Cancel formatting |
Control-c |
As the formatting progresses, a series of dots is displayed. As the verification progresses, a series of V's appears beneath the dots. When the series stops, the formatting is complete.
The diskette is now ready for raw character operations such as tar and cpio.
Following are several examples of UFS formatting. The first example formats a 1.44 Mbyte diskette on a 1.44 Mbyte drive:
$ fdformat -v -U Formatting 1.44 M in /vol/dev/rdiskette0/unformatted Press return to start formatting floppy. [ Return ] ....................................................... vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv |
The following example performs the same job, but assigns the diskette the name myfiles:
$ fdformat -v -U -b myfiles Formatting 1.44 M in /vol/dev/rdiskette0/unformatted Press return to start formatting floppy. [ Return ] ....................................................... vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv |
The following example formats a 720Kbyte diskette on a 1.44 Mbyte drive, and names it myfiles:
$ fdformat -v -U -D -b myfiles Formatting 720 KB in /vol/dev/rdiskette0/unformatted Press return to start formatting floppy. [ Return ] ....................................................... vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv |