2 .\" Copyright (c) 2002, Sun Microsystems, Inc. All Rights Reserved
3 .\" Copyright 1989 AT&T
4 .\" 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.
5 .\" 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.
6 .\" 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]
7 .TH FORMAT 8 "Sep 25, 2008"
9 format \- disk partitioning and maintenance utility
13 \fBformat\fR [\fB-f\fR \fIcommand-file\fR] [\fB-l\fR \fIlog-file\fR] [\fB-x\fR \fIdata-file\fR]
14 [\fB-d\fR \fIdisk-name\fR] [\fB-t\fR \fIdisk-type\fR] [\fB-p\fR \fIpartition-name\fR]
15 [\fB-s\fR] [\fB-m\fR] [\fB-M\fR] [\fB-e\fR] [\fIdisk-list\fR]
21 \fBformat\fR enables you to format, label, repair, and analyze disks on your
22 system. Unlike previous disk maintenance programs, \fBformat\fR runs under
23 SunOS. Because there are limitations to what can be done to the system disk
24 while the system is running, \fBformat\fR is also supported within the
25 memory-resident system environment. For most applications, however, running
26 \fBformat\fR under SunOS is the more convenient approach.
29 \fBformat\fR first uses the disk list defined in \fIdata-file\fR if the
30 \fB-x\fR option is used. \fBformat\fR then checks for the \fBFORMAT_PATH\fR
31 environment variable, a colon-separated list of filenames and/or directories.
32 In the case of a directory, \fBformat\fR searches for a file named
33 \fBformat.dat\fR in that directory; a filename should be an absolute pathname,
34 and is used without change. \fBformat\fR adds all disk and partition
35 definitions in each specified file to the working set. Multiple identical
36 definitions are silently ignored. If \fBFORMAT_PATH\fR is not set, the path
37 defaults to \fB/etc/format.dat\fR.
40 \fIdisk-list\fR is a list of disks in the form \fBc?t?d?\fR or
41 \fB/dev/rdsk/c?t?d?s?\fR. With the latter form, shell wildcard specifications
42 are supported. For example, specifying \fB/dev/rdsk/c2*\fR causes \fBformat\fR
43 to work on all drives connected to controller \fBc2\fR only. If no
44 \fIdisk-list\fR is specified, \fBformat\fR lists all the disks present in the
45 system that can be administered by \fBformat\fR.
48 Removable media devices are listed only when users execute \fBformat\fR in
49 expert mode (option \fB-e\fR). This feature is provided for backward
50 compatibility. Use \fBrmformat\fR(1) for rewritable removable media devices.
54 The following options are supported:
58 \fB\fB-d\fR \fIdisk-name\fR\fR
61 Specify which disk should be made current upon entry into the program. The disk
62 is specified by its logical name (for instance, \fB-d\fR \fBc0t1d0\fR). This
63 can also be accomplished by specifying a single disk in the disk list.
72 Enable \fBSCSI\fR expert menu. Note this option is not recommended for casual
79 \fB\fB-f\fR \fIcommand-file\fR\fR
82 Take command input from \fIcommand-file\fR rather than the standard input. The
83 file must contain commands that appear just as they would if they had been
84 entered from the keyboard. With this option, \fBformat\fR does not issue
85 \fBcontinue?\fR prompts; there is no need to specify y(es) or n(o) answers in
86 the \fIcommand-file\fR. In non-interactive mode, \fBformat\fR does not
87 initially expect the input of a disk selection number. The user must specify
88 the current working disk with the \fB-d\fR \fIdisk-name\fR option when format
89 is invoked, or specify \fBdisk\fR and the disk selection number in the
96 \fB\fB-l\fR \fIlog-file\fR\fR
99 Log a transcript of the \fBformat\fR session to the indicated \fIlog-file\fR,
100 including the standard input, the standard output and the standard error.
109 Enable extended messages. Provides more detailed information in the event of an
119 Enable extended and diagnostic messages. Provides extensive information on the
120 state of a \fBSCSI\fR device's mode pages, during formatting.
126 \fB\fB-p\fR \fIpartition-name\fR\fR
129 Specify the partition table for the disk which is current upon entry into the
130 program. The table is specified by its name as defined in the data file. This
131 option can be used only if a disk is being made current, and its type is either
132 specified or available from the disk label.
141 Silent. Suppress all of the standard output. Error messages are still
142 displayed. This is generally used in conjunction with the \fB-f\fR option.
148 \fB\fB-t\fR \fIdisk-type\fR\fR
151 Specify the type of disk which is current upon entry into the program. A disk's
152 type is specified by name in the data file. This option can only be used if a
153 disk is being made current as described above.
159 \fB\fB-x\fR \fIdata-file\fR\fR
162 Use the list of disks contained in \fIdata-file\fR.
168 When you invoke format with no options or with the \fB-e\fR, \fB-l\fR,
169 \fB-m\fR, \fB-M\fR, or \fB-s\fR options, the program displays a numbered list
170 of available disks and prompts you to specify a disk by list number. If the
171 machine has more than 10 disks, press SPACE to see the next screenful of disks.
174 You can specify a disk by list number even if the disk is not displayed in the
175 current screenful. For example, if the current screen shows disks 11-20, you
176 can enter \fB25\fR to specify the twenty-fifth disk on the list. If you enter a
177 number for a disk that is not currently displayed, \fBformat\fR prompts you to
178 verify your selection. If you enter a number from the displayed list,
179 \fBformat\fR silently accepts your selection.
182 After you specify a disk, \fBformat\fR displays its main menu. This menu
183 enables you to perform the following tasks:
190 Run read, write, compare tests, and data purge. The data purge function
191 implements the National Computer Security Center Guide to Understanding Data
192 Remnance (\fBNCSC-TG-025\fR version 2) Overwriting Algorithm. See NOTES.
201 Search for backup labels.
210 Enable, disable, and query the state of the write cache and read cache. This
211 menu item only appears when \fBformat\fR is invoked with the \fB-e\fR option,
212 and is only supported on \fBSCSI\fR devices..
221 Display the device name, the disk geometry, and the pathname to the disk
231 Retrieve and print defect lists. This option is supported only on \fBSCSI\fR
232 devices. \fBIDE\fR disks perform automatic defect management. Upon using the
233 \fBdefect\fR option on an \fBIDE\fR disk, you receive the message:
237 Controller does not support defect management
238 or disk supports automatic defect management.
251 Choose the disk that will be used in subsequent operations (known as the
261 Run the \fBfdisk\fR(8) program to create a \fBfdisk\fR partition for Solaris
262 software (x86 based systems only).
271 Format and verify the current disk. This option is supported only on \fBSCSI\fR
272 devices. \fBIDE\fR disks are pre-formatted by the manufacturer. Upon using the
273 \fBformat\fR option on an \fBIDE\fR disk, you receive the message:
277 Cannot format this drive. Please use your
278 manufacturer-supplied formatting utility.
291 Display the vendor, product name, and revision level of the current drive.
300 Write a new label to the current disk.
309 Create and modify slices.
318 Exit the format menu.
327 Repair a specific block on the disk.
336 Save new disk and slice information.
345 Select (define) a disk type.
354 Read and display labels. Print information such as the number of cylinders,
355 alternate cylinders, heads, sectors, and the partition table.
364 Label the disk with a new eight character volume name.
367 .SH ENVIRONMENT VARIABLES
371 \fB\fBFORMAT_PATH\fR\fR
374 a colon-separated list of filenames and/or directories of disk and partition
375 definitions. If a directory is specified, \fBformat\fR searches for the file
376 \fBformat.dat\fR in that directory.
383 \fB\fB/etc/format.dat\fR\fR
392 \fBfmthard\fR(8), \fBprtvtoc\fR(8), \fBrmformat\fR(1), \fBformat.dat\fR(4),
393 \fBattributes\fR(5), \fB sd\fR(7D)
404 When the \fBformat\fR function is selected to format the Maxtor 207MB disk, the
405 following message displays:
409 Mode sense page(4) reports rpm value as 0, adjusting it to 3600
416 This is a drive bug that may also occur with older third party drives. The
417 above message is not an error; the drive will still function correctly.
420 Cylinder 0 contains the partition table (disk label), which can be overwritten
421 if used in a raw disk partition by third party software.
424 \fBformat\fR supports writing \fBEFI\fR-compliant disk labels in order to
425 support disks or \fBLUN\fRs with capacities greater than one terabyte. However,
426 care should be exercised since many software components, such as filesystems
427 and volume managers, are still restricted to capacities of one terabyte or
428 less. See the \fISystem Administration Guide: Basic Administration\fR for
429 additional information.
432 By default, on an unlabeled disk, EFI labels will be written on disks larger
433 than 2 TB. When \fBformat\fR is invoked with the \fB-e\fR option, on writing
434 the label, the label type can be chosen. Booting is not currently supported on
435 a disk with an EFI label.
439 \fBformat\fR provides a help facility you can use whenever format is expecting
440 input. You can request help about what information is expected by simply
441 entering a question mark (\fB?\fR) and \fBformat\fR prints a brief description
442 of what type of input is needed. If you enter a \fB?\fR at the menu prompt, a
443 list of available commands is displayed.
446 For \fBSCSI\fR disks, formatting is done with both Primary and Grown defects
447 list by default. However, if only Primary list is extracted in defect menu
448 before formatting, formatting will be done with Primary list only.
451 Changing the state of the caches is only supported on \fBSCSI\fR devices, and
452 not all \fBSCSI\fR devices support changing or saving the state of the caches.
455 The \fBNCSC-TG-025\fR algorithm for overwriting meets the \fBDoD\fR 5200.28-M
456 (\fBADP\fR Security Manual) Eraser Procedures specification. The \fBNIST\fR
457 Guidelines for Media Sanitization (\fBNIST\fR \fBSP\fR 800-88) also reference