|Skip Navigation Links|
|Exit Print View|
|System Administration Guide: Devices and File Systems Oracle Solaris 10 1/13 Information Library|
The following guidelines and procedures are described in this section:
Keep the following considerations in mind when working with diskettes:
File system formats in Oracle Solaris consist of the basic “bit” formatting, in addition to the structure to support an Oracle Solaris file system. A complete format for a DOS file system consists of the basic “bit” formatting in addition the structure to support either an MS-DOS or an NEC-DOS file system. The procedures required to prepare a media for each type of file system are different. Therefore, before you format a diskette, consider which procedure to follow. For more information, see Managing Removable Media (Tasks).
For information on removable media names, see Using Removable Media Names.
Diskettes that are not named (that is, they have no “label”) are assigned the default name of unnamed_floppy.
Diskettes that are not named (that is, they have no “label”) are assigned the default name of floppy.
An Oracle Solaris system can format the following file system types:
ZFS or UFS
MS-DOS or NEC-DOS (PCFS)
On an Oracle Solaris system (either SPARC or x86), you can format diskettes with the following densities.
By default, the diskette drive formats a diskette to a like density. This default means that a 1.44 MB drive attempts to format a diskette for 1.44 MB, regardless of whether the diskette is, in fact, a 1.44 MB diskette, unless you instruct it otherwise. In other words, a diskette can be formatted to its capacity or lower, and a drive can format to its capacity or lower.
You can use the rmformat command to format and perform other management tasks on removable media. File systems are mounted automatically. So, you might have to unmount media before you can format it, if the media contains an existing file system.
The rmformat command has three formatting options:
quick – This option formats diskettes without certification or with limited certification of certain tracks on the media.
long – This option completely formats diskettes. For some devices, the use of this option might include the certification of the whole media by the drive.
force – This option formats completely without user confirmation. For diskettes with a password-protection mechanism, this option clears the password before formatting. This feature is useful when a password is forgotten. On diskettes without password protection, this option forces a long format.
For information about removable media hardware considerations, see Removable Media Considerations.
$ volcheck -v
Two status messages are possible:
Volume management detected the media and will attempt to mount it in the directory described in Using Removable Media Names.
If the media is formatted properly, no error messages appear in the console.
If the media is not formatted, the “media was found” message is still displayed. However, error messages similar to the following appear in the system console window:
fd0: unformatted diskette or no diskette in the drive
fd0: read failed (40 1 0)
fd0: bad format
You must format the media before volume management can mount it. For more information, see How to Format a Diskette (rmformat).
Volume management did not detect the media. Ensure that the media is inserted properly, and run volcheck again. If unsuccessful, check the media, which could be damaged. You can also try to mount the media manually.
For example, do the following for a diskette:
$ ls /media/floppy lost+found myfiles
# svcs hal dbus rmvolmgr STATE STIME FMRI online Apr_09 svc:/system/dbus:default online Apr_09 svc:/system/hal:default online Apr_09 svc:/system/filesystem/rmvolmgr:default
$ rmformat -F [ quick | long | force ] device-name
See Formatting Diskettes for more information on rmformat formatting options.
If the rmformat output indicates bad blocks, see How to Repair Bad Blocks on Removable Media.
$ rmformat -b label device-name
For information on creating a DOS label, see mkfs_pcfs(1M).
Example 1-1 Formatting a Diskette
This example shows how to format a diskette.
$ rmformat -F quick /dev/rdiskette Formatting will erase all the data on disk. Do you want to continue? (y/n) y .........................................................................
To format a USB diskette, use syntax similar to the following:
$ rmformat -F long /dev/rdsk/c11t0d0p0
$ rmformat -s slice-file device-name
A sample slice file appears similar to the following:
slices: 0 = 0, 30MB, "wm", "home" : 1 = 30MB, 51MB : 2 = 0, 94MB, "wm", "backup" : 6 = 81MB, 13MB
Create a PCFS file system. For example:
# mkfs -F pcfs -o nofdisk,size=9800 /dev/rdsk/c11t0d0p0
Create a UDFS file system. For example:
# mkfs -F udfs /dev/rdsk/c0t1d0p0
For example, create a UDFS file system, as follows:
# mkfs -F udfs /dev/rdsk/c0t0d0s2
For example, mount a UDFS file system, as follows:
# mount -F udfs /dev/dsk/c0t0d0s2 /mnt
# fsck -F udfs device-name
# fsck -F pcfs device-name
Example 1-2 Checking a PCFS File System on Removable Media
The following example shows how check the consistency of a PCFS file system on media.
# fsck -F pcfs /dev/rdsk/c0t4d0s2 ** /dev/rdsk/c0t4d0s2 ** Scanning file system meta-data ** Correcting any meta-data discrepancies 1457664 bytes. 0 bytes in bad sectors. 0 bytes in 0 directories. 0 bytes in 0 files. 1457664 bytes free. 512 bytes per allocation unit. 2847 total allocation units. 2847 available allocation units.
You can only use the rmformat command to verify, analyze, and repair bad sectors that are found during verification if the drive supports bad block management. Most USB memory sticks do not support bad block management.
If the drive supports bad block management, a best effort is made to rectify the bad block. If the bad block cannot be rectified despite the best effort mechanism, a message indicates the failure to repair the media.
$ rmformat -c block-numbers device-name
Supply the block number in decimal, octal, or hexadecimal format from a previous rmformat session.
$ rmformat -V read device-name
You can apply read protection or write protection, and set a password, on removable media that support this feature.
$ rmformat -p device-name
You can apply a password with a maximum of 32 characters for removable media that support this feature.
You will receive a warning message if you attempt to apply a password on media that does not support this feature.
$ rmformat -W enable device-name Please enter password (32 chars maximum): xxx Please reenter password:
$ rmformat -R enable device-name Please enter password (32 chars maximum): xxx Please reenter password:
$ rmformat -W disable device-name Please enter password (32 chars maximum): xxx
$ rmformat -R disable device-name Please enter password (32 chars maximum): xxx
$ rmformat -p device-name