'\" te .\" Copyright (c) 2002, Sun Microsystems, Inc. All Rights Reserved .\" Copyright 1989 AT&T .\" 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. .\" 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. .\" 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] .TH FORMAT 1M "Sep 25, 2008" .SH NAME format \- disk partitioning and maintenance utility .SH SYNOPSIS .LP .nf \fBformat\fR [\fB-f\fR \fIcommand-file\fR] [\fB-l\fR \fIlog-file\fR] [\fB-x\fR \fIdata-file\fR] [\fB-d\fR \fIdisk-name\fR] [\fB-t\fR \fIdisk-type\fR] [\fB-p\fR \fIpartition-name\fR] [\fB-s\fR] [\fB-m\fR] [\fB-M\fR] [\fB-e\fR] [\fIdisk-list\fR] .fi .SH DESCRIPTION .sp .LP \fBformat\fR enables you to format, label, repair, and analyze disks on your system. Unlike previous disk maintenance programs, \fBformat\fR runs under SunOS. Because there are limitations to what can be done to the system disk while the system is running, \fBformat\fR is also supported within the memory-resident system environment. For most applications, however, running \fBformat\fR under SunOS is the more convenient approach. .sp .LP \fBformat\fR first uses the disk list defined in \fIdata-file\fR if the \fB-x\fR option is used. \fBformat\fR then checks for the \fBFORMAT_PATH\fR environment variable, a colon-separated list of filenames and/or directories. In the case of a directory, \fBformat\fR searches for a file named \fBformat.dat\fR in that directory; a filename should be an absolute pathname, and is used without change. \fBformat\fR adds all disk and partition definitions in each specified file to the working set. Multiple identical definitions are silently ignored. If \fBFORMAT_PATH\fR is not set, the path defaults to \fB/etc/format.dat\fR. .sp .LP \fIdisk-list\fR is a list of disks in the form \fBc?t?d?\fR or \fB/dev/rdsk/c?t?d?s?\fR. With the latter form, shell wildcard specifications are supported. For example, specifying \fB/dev/rdsk/c2*\fR causes \fBformat\fR to work on all drives connected to controller \fBc2\fR only. If no \fIdisk-list\fR is specified, \fBformat\fR lists all the disks present in the system that can be administered by \fBformat\fR. .sp .LP Removable media devices are listed only when users execute \fBformat\fR in expert mode (option \fB-e\fR). This feature is provided for backward compatibility. Use \fBrmformat\fR(1) for rewritable removable media devices. .SH OPTIONS .sp .LP The following options are supported: .sp .ne 2 .na \fB\fB-d\fR \fIdisk-name\fR\fR .ad .RS 21n Specify which disk should be made current upon entry into the program. The disk is specified by its logical name (for instance, \fB-d\fR \fBc0t1d0\fR). This can also be accomplished by specifying a single disk in the disk list. .RE .sp .ne 2 .na \fB\fB-e\fR\fR .ad .RS 21n Enable \fBSCSI\fR expert menu. Note this option is not recommended for casual use. .RE .sp .ne 2 .na \fB\fB-f\fR \fIcommand-file\fR\fR .ad .RS 21n Take command input from \fIcommand-file\fR rather than the standard input. The file must contain commands that appear just as they would if they had been entered from the keyboard. With this option, \fBformat\fR does not issue \fBcontinue?\fR prompts; there is no need to specify y(es) or n(o) answers in the \fIcommand-file\fR. In non-interactive mode, \fBformat\fR does not initially expect the input of a disk selection number. The user must specify the current working disk with the \fB-d\fR \fIdisk-name\fR option when format is invoked, or specify \fBdisk\fR and the disk selection number in the \fIcommand-file\fR. .RE .sp .ne 2 .na \fB\fB-l\fR \fIlog-file\fR\fR .ad .RS 21n Log a transcript of the \fBformat\fR session to the indicated \fIlog-file\fR, including the standard input, the standard output and the standard error. .RE .sp .ne 2 .na \fB\fB-m\fR\fR .ad .RS 21n Enable extended messages. Provides more detailed information in the event of an error. .RE .sp .ne 2 .na \fB\fB-M\fR\fR .ad .RS 21n Enable extended and diagnostic messages. Provides extensive information on the state of a \fBSCSI\fR device's mode pages, during formatting. .RE .sp .ne 2 .na \fB\fB-p\fR \fIpartition-name\fR\fR .ad .RS 21n Specify the partition table for the disk which is current upon entry into the program. The table is specified by its name as defined in the data file. This option can be used only if a disk is being made current, and its type is either specified or available from the disk label. .RE .sp .ne 2 .na \fB\fB-s\fR\fR .ad .RS 21n Silent. Suppress all of the standard output. Error messages are still displayed. This is generally used in conjunction with the \fB-f\fR option. .RE .sp .ne 2 .na \fB\fB-t\fR \fIdisk-type\fR\fR .ad .RS 21n Specify the type of disk which is current upon entry into the program. A disk's type is specified by name in the data file. This option can only be used if a disk is being made current as described above. .RE .sp .ne 2 .na \fB\fB-x\fR \fIdata-file\fR\fR .ad .RS 21n Use the list of disks contained in \fIdata-file\fR. .RE .SH USAGE .sp .LP When you invoke format with no options or with the \fB-e\fR, \fB-l\fR, \fB-m\fR, \fB-M\fR, or \fB-s\fR 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. .sp .LP 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 \fB25\fR to specify the twenty-fifth disk on the list. If you enter a number for a disk that is not currently displayed, \fBformat\fR prompts you to verify your selection. If you enter a number from the displayed list, \fBformat\fR silently accepts your selection. .sp .LP After you specify a disk, \fBformat\fR displays its main menu. This menu enables you to perform the following tasks: .sp .ne 2 .na \fBanalyze\fR .ad .RS 13n Run read, write, compare tests, and data purge. The data purge function implements the National Computer Security Center Guide to Understanding Data Remnance (\fBNCSC-TG-025\fR version 2) Overwriting Algorithm. See NOTES. .RE .sp .ne 2 .na \fBbackup\fR .ad .RS 13n Search for backup labels. .RE .sp .ne 2 .na \fBcache\fR .ad .RS 13n Enable, disable, and query the state of the write cache and read cache. This menu item only appears when \fBformat\fR is invoked with the \fB-e\fR option, and is only supported on \fBSCSI\fR devices.. .RE .sp .ne 2 .na \fBcurrent\fR .ad .RS 13n Display the device name, the disk geometry, and the pathname to the disk device. .RE .sp .ne 2 .na \fBdefect\fR .ad .RS 13n Retrieve and print defect lists. This option is supported only on \fBSCSI\fR devices. \fBIDE\fR disks perform automatic defect management. Upon using the \fBdefect\fR option on an \fBIDE\fR disk, you receive the message: .sp .in +2 .nf Controller does not support defect management or disk supports automatic defect management. .fi .in -2 .sp .RE .sp .ne 2 .na \fBdisk\fR .ad .RS 13n Choose the disk that will be used in subsequent operations (known as the current disk.) .RE .sp .ne 2 .na \fBfdisk\fR .ad .RS 13n Run the \fBfdisk\fR(1M) program to create a \fBfdisk\fR partition for Solaris software (x86 based systems only). .RE .sp .ne 2 .na \fBformat\fR .ad .RS 13n Format and verify the current disk. This option is supported only on \fBSCSI\fR devices. \fBIDE\fR disks are pre-formatted by the manufacturer. Upon using the \fBformat\fR option on an \fBIDE\fR disk, you receive the message: .sp .in +2 .nf Cannot format this drive. Please use your manufacturer-supplied formatting utility. .fi .in -2 .sp .RE .sp .ne 2 .na \fBinquiry\fR .ad .RS 13n Display the vendor, product name, and revision level of the current drive. .RE .sp .ne 2 .na \fBlabel\fR .ad .RS 13n Write a new label to the current disk. .RE .sp .ne 2 .na \fBpartition\fR .ad .RS 13n Create and modify slices. .RE .sp .ne 2 .na \fBquit\fR .ad .RS 13n Exit the format menu. .RE .sp .ne 2 .na \fBrepair\fR .ad .RS 13n Repair a specific block on the disk. .RE .sp .ne 2 .na \fBsave\fR .ad .RS 13n Save new disk and slice information. .RE .sp .ne 2 .na \fBtype\fR .ad .RS 13n Select (define) a disk type. .RE .sp .ne 2 .na \fBverify\fR .ad .RS 13n Read and display labels. Print information such as the number of cylinders, alternate cylinders, heads, sectors, and the partition table. .RE .sp .ne 2 .na \fBvolname\fR .ad .RS 13n Label the disk with a new eight character volume name. .RE .SH ENVIRONMENT VARIABLES .sp .ne 2 .na \fB\fBFORMAT_PATH\fR\fR .ad .RS 15n a colon-separated list of filenames and/or directories of disk and partition definitions. If a directory is specified, \fBformat\fR searches for the file \fBformat.dat\fR in that directory. .RE .SH FILES .sp .ne 2 .na \fB\fB/etc/format.dat\fR\fR .ad .RS 19n default data file .RE .SH SEE ALSO .sp .LP \fBfmthard\fR(1M), \fBprtvtoc\fR(1M), \fBrmformat\fR(1), \fBformat.dat\fR(4), \fBattributes\fR(5), \fB sd\fR(7D) .sp .LP \fI\fR .SS "x86 Only" .sp .LP \fBfdisk\fR(1M) .SH WARNINGS .sp .LP When the \fBformat\fR function is selected to format the Maxtor 207MB disk, the following message displays: .sp .in +2 .nf Mode sense page(4) reports rpm value as 0, adjusting it to 3600 .fi .in -2 .sp .sp .LP 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. .sp .LP Cylinder 0 contains the partition table (disk label), which can be overwritten if used in a raw disk partition by third party software. .sp .LP \fBformat\fR supports writing \fBEFI\fR-compliant disk labels in order to support disks or \fBLUN\fRs 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 \fISystem Administration Guide: Basic Administration\fR for additional information. .sp .LP By default, on an unlabeled disk, EFI labels will be written on disks larger than 2 TB. When \fBformat\fR is invoked with the \fB-e\fR option, on writing the label, the label type can be chosen. Booting is not currently supported on a disk with an EFI label. .SH NOTES .sp .LP \fBformat\fR 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 (\fB?\fR) and \fBformat\fR prints a brief description of what type of input is needed. If you enter a \fB?\fR at the menu prompt, a list of available commands is displayed. .sp .LP For \fBSCSI\fR 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. .sp .LP Changing the state of the caches is only supported on \fBSCSI\fR devices, and not all \fBSCSI\fR devices support changing or saving the state of the caches. .sp .LP The \fBNCSC-TG-025\fR algorithm for overwriting meets the \fBDoD\fR 5200.28-M (\fBADP\fR Security Manual) Eraser Procedures specification. The \fBNIST\fR Guidelines for Media Sanitization (\fBNIST\fR \fBSP\fR 800-88) also reference this algorithm.