8980 BIOS clock is sometimes one hour fast
[unleashed.git] / usr / src / man / man1m / format.1m
blob292a9ccea502961b86fc391585a996dc356e37d6
1 '\" te
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 1M "Sep 25, 2008"
8 .SH NAME
9 format \- disk partitioning and maintenance utility
10 .SH SYNOPSIS
11 .LP
12 .nf
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]
16 .fi
18 .SH DESCRIPTION
19 .sp
20 .LP
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.
27 .sp
28 .LP
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.
38 .sp
39 .LP
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.
46 .sp
47 .LP
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.
51 .SH OPTIONS
52 .sp
53 .LP
54 The following options are supported:
55 .sp
56 .ne 2
57 .na
58 \fB\fB-d\fR \fIdisk-name\fR\fR
59 .ad
60 .RS 21n
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.
64 .RE
66 .sp
67 .ne 2
68 .na
69 \fB\fB-e\fR\fR
70 .ad
71 .RS 21n
72 Enable \fBSCSI\fR expert menu. Note this option is not recommended for casual
73 use.
74 .RE
76 .sp
77 .ne 2
78 .na
79 \fB\fB-f\fR \fIcommand-file\fR\fR
80 .ad
81 .RS 21n
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
90 \fIcommand-file\fR.
91 .RE
93 .sp
94 .ne 2
95 .na
96 \fB\fB-l\fR \fIlog-file\fR\fR
97 .ad
98 .RS 21n
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.
104 .ne 2
106 \fB\fB-m\fR\fR
108 .RS 21n
109 Enable extended messages. Provides more detailed information in the event of an
110 error.
114 .ne 2
116 \fB\fB-M\fR\fR
118 .RS 21n
119 Enable extended and diagnostic messages. Provides extensive information on the
120 state of a \fBSCSI\fR device's mode pages, during formatting.
124 .ne 2
126 \fB\fB-p\fR \fIpartition-name\fR\fR
128 .RS 21n
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.
136 .ne 2
138 \fB\fB-s\fR\fR
140 .RS 21n
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.
146 .ne 2
148 \fB\fB-t\fR \fIdisk-type\fR\fR
150 .RS 21n
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.
157 .ne 2
159 \fB\fB-x\fR \fIdata-file\fR\fR
161 .RS 21n
162 Use the list of disks contained in \fIdata-file\fR.
165 .SH USAGE
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:
185 .ne 2
187 \fBanalyze\fR
189 .RS 13n
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.
196 .ne 2
198 \fBbackup\fR
200 .RS 13n
201 Search for backup labels.
205 .ne 2
207 \fBcache\fR
209 .RS 13n
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..
216 .ne 2
218 \fBcurrent\fR
220 .RS 13n
221 Display the device name, the disk geometry, and the pathname to the disk
222 device.
226 .ne 2
228 \fBdefect\fR
230 .RS 13n
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:
235 .in +2
237 Controller does not support defect management
238 or disk supports automatic defect management.
240 .in -2
246 .ne 2
248 \fBdisk\fR
250 .RS 13n
251 Choose the disk that will be used in subsequent operations (known as the
252 current disk.)
256 .ne 2
258 \fBfdisk\fR
260 .RS 13n
261 Run the \fBfdisk\fR(1M) program to create a \fBfdisk\fR partition for Solaris
262 software (x86 based systems only).
266 .ne 2
268 \fBformat\fR
270 .RS 13n
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:
275 .in +2
277 Cannot format this drive. Please use your
278 manufacturer-supplied formatting utility.
280 .in -2
286 .ne 2
288 \fBinquiry\fR
290 .RS 13n
291 Display the vendor, product name, and revision level of the current drive.
295 .ne 2
297 \fBlabel\fR
299 .RS 13n
300 Write a new label to the current disk.
304 .ne 2
306 \fBpartition\fR
308 .RS 13n
309 Create and modify slices.
313 .ne 2
315 \fBquit\fR
317 .RS 13n
318 Exit the format menu.
322 .ne 2
324 \fBrepair\fR
326 .RS 13n
327 Repair a specific block on the disk.
331 .ne 2
333 \fBsave\fR
335 .RS 13n
336 Save new disk and slice information.
340 .ne 2
342 \fBtype\fR
344 .RS 13n
345 Select (define) a disk type.
349 .ne 2
351 \fBverify\fR
353 .RS 13n
354 Read and display labels. Print information such as the number of cylinders,
355 alternate cylinders, heads, sectors, and the partition table.
359 .ne 2
361 \fBvolname\fR
363 .RS 13n
364 Label the disk with a new eight character volume name.
367 .SH ENVIRONMENT VARIABLES
369 .ne 2
371 \fB\fBFORMAT_PATH\fR\fR
373 .RS 15n
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.
379 .SH FILES
381 .ne 2
383 \fB\fB/etc/format.dat\fR\fR
385 .RS 19n
386 default data file
389 .SH SEE ALSO
392 \fBfmthard\fR(1M), \fBprtvtoc\fR(1M), \fBrmformat\fR(1), \fBformat.dat\fR(4),
393 \fBattributes\fR(5), \fBsd\fR(7D)
396 \fI\fR
397 .SS "x86 Only"
400 \fBfdisk\fR(1M)
401 .SH WARNINGS
404 When the \fBformat\fR function is selected to format the Maxtor 207MB disk, the
405 following message displays:
407 .in +2
409 Mode sense page(4) reports rpm value as 0, adjusting it to 3600
411 .in -2
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.
436 .SH NOTES
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
458 this algorithm.