1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
|
'\" 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 8 "August 29, 2021"
.SH NAME
format \- disk partitioning and maintenance utility
.SH SYNOPSIS
.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
\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
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
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(8) 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
.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
.ne 2
.na
\fB\fB/etc/format.dat\fR\fR
.ad
.RS 19n
default data file
.RE
.SH SEE ALSO
.BR rmformat (1),
.BR sd (4D),
.BR format.dat (5),
.BR attributes (7),
.BR fmthard (8),
.BR prtvtoc (8)
.sp
.LP
\fI\fR
.SS "x86 Only"
.BR fdisk (8)
.SH WARNINGS
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
\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.
|