format [-f command-file] [-l log-file] [-x data-file] [-d disk-name] [-t disk-type] [-p partition-name] [-s] [-m] [-M] [-e] [disk-list]
format enables you to format, label, repair, and analyze disks on your system. Unlike previous disk maintenance programs, format runs under SunOS. Because there are limitations to what can be done to the system disk while the system is running, format is also supported within the memory-resident system environment. For most applications, however, running format under SunOS is the more convenient approach.
format first uses the disk list defined in data-file if the -x option is used. format then checks for the FORMAT_PATH environment variable, a colon-separated list of filenames and/or directories. In the case of a directory, format searches for a file named format.dat in that directory; a filename should be an absolute pathname, and is used without change. format adds all disk and partition definitions in each specified file to the working set. Multiple identical definitions are silently ignored. If FORMAT_PATH is not set, the path defaults to /etc/format.dat.
disk-list is a list of disks in the form c?t?d? or /dev/rdsk/c?t?d?s?. With the latter form, shell wildcard specifications are supported. For example, specifying /dev/rdsk/c2* causes format to work on all drives connected to controller c2 only. If no disk-list is specified, format lists all the disks present in the system that can be administered by format.
Removable media devices are listed only when users execute format in expert mode (option -e). This feature is provided for backward compatibility. Use rmformat(1) for rewritable removable media devices.
The following options are supported:
When you invoke format with no options or with the -e, -l, -m, -M, or -s options, the program displays a numbered list of available disks and prompts you to specify a disk by list number. If the machine has more than 10 disks, press SPACE to see the next screenful of disks.
You can specify a disk by list number even if the disk is not displayed in the current screenful. For example, if the current screen shows disks 11-20, you can enter 25 to specify the twenty-fifth disk on the list. If you enter a number for a disk that is not currently displayed, format prompts you to verify your selection. If you enter a number from the displayed list, format silently accepts your selection.
After you specify a disk, format displays its main menu. This menu enables you to perform the following tasks:
Controller does not support defect management or disk supports automatic defect management.
Cannot format this drive. Please use your manufacturer-supplied formatting utility.
See attributes(5) for descriptions of the following attributes:
fmthard(1M), prtvtoc(1M), rmformat(1), format.dat(4), attributes(5), sd(7D)
When the format function is selected to format the Maxtor 207MB disk, the following message displays:
Mode sense page(4) reports rpm value as 0, adjusting it to 3600
This is a drive bug that may also occur with older third party drives. The above message is not an error; the drive will still function correctly.
Cylinder 0 contains the partition table (disk label), which can be overwritten if used in a raw disk partition by third party software.
format supports writing EFI-compliant disk labels in order to support disks or LUNs with capacities greater than one terabyte. However, care should be exercised since many software components, such as filesystems and volume managers, are still restricted to capacities of one terabyte or less. See the System Administration Guide: Basic Administration for additional information.
By default, on an unlabeled disk, EFI labels will be written on disks larger than 2 TB. When format is invoked with the -e option, on writing the label, the label type can be chosen. Booting is not currently supported on a disk with an EFI label.
format provides a help facility you can use whenever format is expecting input. You can request help about what information is expected by simply entering a question mark (?) and format prints a brief description of what type of input is needed. If you enter a ? at the menu prompt, a list of available commands is displayed.
For SCSI disks, formatting is done with both Primary and Grown defects list by default. However, if only Primary list is extracted in defect menu before formatting, formatting will be done with Primary list only.
Changing the state of the caches is only supported on SCSI devices, and not all SCSI devices support changing or saving the state of the caches.
The NCSC-TG-025 algorithm for overwriting meets the DoD 5200.28-M (ADP Security Manual) Eraser Procedures specification. The NIST Guidelines for Media Sanitization (NIST SP 800-88) also reference this algorithm.