You can use the rmformat command to format removable media, including the following types of diskettes:
Double density -- 720 Kbytes (3.5 inch)
High density -- 1.44 Mbytes (3.5 inch)
The rmformat command is a non-superuser utility that can format and protect rewritable removable media. The rmformat command has three formatting options:
quick -- This formats removable media without certification or with limited certification of certain tracks on the media.
long -- This formats removable media completely. For some devices this might include the certification of the whole media by the drive itself.
force -- This formats completely without user confirmation. For media with a password protection mechanism, it clears the password before formatting. This feature is useful when a password is forgotten. On media without password protection, this option forces a long format.
The rmformat command formats the media and by default creates two partitions on the media: partition 0 and partition 2 (the whole media).
Verify that volume manager is running, which means you can use the shorter nickname for the device name.
$ ps -ef | grep vold root 212 1 0 Nov 03 ? 0:01 /usr/sbin/vold |
See System Administration Guide, Volume I for information on determining removable media device names and starting volume manager if it is not running.
Format the removable media.
$ rmformat -F [ quick | long | force ] device-name |
See the section above for more information on rmformat formatting options.
If the rmformat output indicates bad blocks, see the procedure below for repairing bad blocks.
(Optional) Label the removable media with an 8-character label to be used in the Solaris environment.
$ rmformat -b label device-name |
See mkfs_pcfs(1M) for information on creating a DOS label.
This example formats a diskette.
$ rmformat -H /dev/rdiskette Formatting will erase all the data on disk. Do you want to continue? (y/n) y ......................................................................... |
This example formats a Zip drive.
$ rmformat -F quick zip0 Formatting will erase all the data on disk. Do you want to continue? (y/n) y ......................................................................... |
Format the media.
$ rmformat -F quick device-name |
(Optional) Create an alternate Solaris partition table.
$ rmformat -s slice-file device-name |
A sample slice file looks like the following:
slices: 0 = 0, 30MB, "wm", "home" : 1 = 30MB, 51MB : 2 = 0, 94MB, "wm", "backup" : 6 = 81MB, 13MB |
See System Administration Guide, Volume I for information on creating an alternate Solaris partition table.
Become superuser.
Determine the appropriate file system type and select one of the following:
The following example formats a diskette and creates a UFS file system.
$ rmformat -F quick /dev/rdiskette Formatting will erase all the data on disk. Do you want to continue? (y/n)y $ su # newfs /dev/rdiskette newfs: construct a new file system /dev/rdiskette: (y/n)? y /dev/rdiskette: 2880 sectors in 80 cylinders of 2 tracks, 18 sectors 1.4MB in 5 cyl groups (16 c/g, 0.28MB/g, 128 i/g) super-block backups (for fsck -F ufs -o b=#) at: 32, 640, 1184, 1792, 2336, # |
Format the removable media.
$ rmformat -F quick device-name |
Become superuser.
(Optional) Create an alternate Solaris fdisk partition table.
# fdisk device-name |
See System Administration Guide, Volume I for information on creating an fdisk partition.
Create a PCFS file system.
# mkfs -F pcfs device-name |
This example includes how to create an alternate fdisk partition.
$ rmformat -F quick /dev/rdsk/c0t4d0s2:c Formatting will erase all the data on disk. Do you want to continue? (y/n)y $ su # fdisk /dev/rdsk/c0t4d0s2:c # mkfs -F pcfs /dev/rdsk/c0t4d0s2:c Construct a new FAT file system on /dev/rdsk/c0t4d0s2:c: (y/n)? y # |
This example describes how to create a PCFS file system without an fdisk partition.
$ rmformat -F quick /dev/rdiskette Formatting will erase all the data on disk. Do you want to continue? (y/n)y $ su # mkfs -F pcfs -o nofdisk,size=2 /dev/rdiskette Construct a new FAT file system on /dev/rdiskette: (y/n)? y # |
# 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 found during verification if the drive supports bad block management. Most diskettes and PCMCIA memory cards 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 a failure to repair.