1format(1M) System Administration Commands format(1M)
2
3
4
6 format - disk partitioning and maintenance utility
7
9 format [-f command-file] [-l log-file] [-x data-file]
10 [-d disk-name] [-t disk-type] [-p partition-name]
11 [-s] [-m] [-M] [-e] [disk-list]
12
13
15 format enables you to format, label, repair, and analyze disks on your
16 system. Unlike previous disk maintenance programs, format runs under
17 SunOS. Because there are limitations to what can be done to the system
18 disk while the system is running, format is also supported within the
19 memory-resident system environment. For most applications, however,
20 running format under SunOS is the more convenient approach.
21
22
23 format first uses the disk list defined in data-file if the -x option
24 is used. format then checks for the FORMAT_PATH environment variable, a
25 colon-separated list of filenames and/or directories. In the case of a
26 directory, format searches for a file named format.dat in that direc‐
27 tory; a filename should be an absolute pathname, and is used without
28 change. format adds all disk and partition definitions in each speci‐
29 fied file to the working set. Multiple identical definitions are
30 silently ignored. If FORMAT_PATH is not set, the path defaults to
31 /etc/format.dat.
32
33
34 disk-list is a list of disks in the form c?t?d? or /dev/rdsk/c?t?d?s?.
35 With the latter form, shell wildcard specifications are supported. For
36 example, specifying /dev/rdsk/c2* causes format to work on all drives
37 connected to controller c2 only. If no disk-list is specified, format
38 lists all the disks present in the system that can be administered by
39 format.
40
41
42 Removable media devices are listed only when users execute format in
43 expert mode (option -e). This feature is provided for backward compati‐
44 bility. Use rmformat(1) for rewritable removable media devices.
45
47 The following options are supported:
48
49 -d disk-name Specify which disk should be made current upon
50 entry into the program. The disk is specified by
51 its logical name (for instance, -d c0t1d0). This
52 can also be accomplished by specifying a single
53 disk in the disk list.
54
55
56 -e Enable SCSI expert menu. Note this option is not
57 recommended for casual use.
58
59
60 -f command-file Take command input from command-file rather than
61 the standard input. The file must contain commands
62 that appear just as they would if they had been
63 entered from the keyboard. With this option, for‐
64 mat does not issue continue? prompts; there is no
65 need to specify y(es) or n(o) answers in the com‐
66 mand-file. In non-interactive mode, format does
67 not initially expect the input of a disk selection
68 number. The user must specify the current working
69 disk with the -d disk-name option when format is
70 invoked, or specify disk and the disk selection
71 number in the command-file.
72
73
74 -l log-file Log a transcript of the format session to the
75 indicated log-file, including the standard input,
76 the standard output and the standard error.
77
78
79 -m Enable extended messages. Provides more detailed
80 information in the event of an error.
81
82
83 -M Enable extended and diagnostic messages. Provides
84 extensive information on the state of a SCSI
85 device's mode pages, during formatting.
86
87
88 -p partition-name Specify the partition table for the disk which is
89 current upon entry into the program. The table is
90 specified by its name as defined in the data file.
91 This option can be used only if a disk is being
92 made current, and its type is either specified or
93 available from the disk label.
94
95
96 -s Silent. Suppress all of the standard output. Error
97 messages are still displayed. This is generally
98 used in conjunction with the -f option.
99
100
101 -t disk-type Specify the type of disk which is current upon
102 entry into the program. A disk's type is specified
103 by name in the data file. This option can only be
104 used if a disk is being made current as described
105 above.
106
107
108 -x data-file Use the list of disks contained in data-file.
109
110
112 When you invoke format with no options or with the -e, -l, -m, -M, or
113 -s options, the program displays a numbered list of available disks and
114 prompts you to specify a disk by list number. If the machine has more
115 than 10 disks, press SPACE to see the next screenful of disks.
116
117
118 You can specify a disk by list number even if the disk is not displayed
119 in the current screenful. For example, if the current screen shows
120 disks 11-20, you can enter 25 to specify the twenty-fifth disk on the
121 list. If you enter a number for a disk that is not currently displayed,
122 format prompts you to verify your selection. If you enter a number from
123 the displayed list, format silently accepts your selection.
124
125
126 After you specify a disk, format displays its main menu. This menu
127 enables you to perform the following tasks:
128
129 analyze Run read, write, compare tests, and data purge. The data
130 purge function implements the National Computer Security
131 Center Guide to Understanding Data Remnance (NCSC-TG-025
132 version 2) Overwriting Algorithm. See NOTES.
133
134
135 backup Search for backup labels.
136
137
138 cache Enable, disable, and query the state of the write cache
139 and read cache. This menu item only appears when format is
140 invoked with the -e option, and is only supported on SCSI
141 devices..
142
143
144 current Display the device name, the disk geometry, and the path‐
145 name to the disk device.
146
147
148 defect Retrieve and print defect lists. This option is supported
149 only on SCSI devices. IDE disks perform automatic defect
150 management. Upon using the defect option on an IDE disk,
151 you receive the message:
152
153 Controller does not support defect management
154 or disk supports automatic defect management.
155
156
157
158
159 disk Choose the disk that will be used in subsequent operations
160 (known as the current disk.)
161
162
163 fdisk Run the fdisk(1M) program to create a fdisk partition for
164 Solaris software (x86 based systems only).
165
166
167 format Format and verify the current disk. This option is sup‐
168 ported only on SCSI devices. IDE disks are pre-formatted
169 by the manufacturer. Upon using the format option on an
170 IDE disk, you receive the message:
171
172 Cannot format this drive. Please use your
173 manufacturer-supplied formatting utility.
174
175
176
177
178 inquiry Display the vendor, product name, and revision level of
179 the current drive.
180
181
182 label Write a new label to the current disk.
183
184
185 partition Create and modify slices.
186
187
188 quit Exit the format menu.
189
190
191 repair Repair a specific block on the disk.
192
193
194 save Save new disk and slice information.
195
196
197 type Select (define) a disk type.
198
199
200 verify Read and display labels. Print information such as the
201 number of cylinders, alternate cylinders, heads, sectors,
202 and the partition table.
203
204
205 volname Label the disk with a new eight character volume name.
206
207
209 FORMAT_PATH a colon-separated list of filenames and/or directories
210 of disk and partition definitions. If a directory is
211 specified, format searches for the file format.dat in
212 that directory.
213
214
216 /etc/format.dat default data file
217
218
220 See attributes(5) for descriptions of the following attributes:
221
222
223
224
225 ┌─────────────────────────────┬─────────────────────────────┐
226 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
227 ├─────────────────────────────┼─────────────────────────────┤
228 │Availability │SUNWcsu │
229 └─────────────────────────────┴─────────────────────────────┘
230
232 fmthard(1M), prtvtoc(1M), rmformat(1), format.dat(4), attributes(5),
233 sd(7D)
234
235
236
237
238 x86 Only
239 fdisk(1M)
240
242 When the format function is selected to format the Maxtor 207MB disk,
243 the following message displays:
244
245 Mode sense page(4) reports rpm value as 0, adjusting it to 3600
246
247
248
249
250 This is a drive bug that may also occur with older third party drives.
251 The above message is not an error; the drive will still function cor‐
252 rectly.
253
254
255 Cylinder 0 contains the partition table (disk label), which can be
256 overwritten if used in a raw disk partition by third party software.
257
258
259 format supports writing EFI-compliant disk labels in order to support
260 disks or LUNs with capacities greater than one terabyte. However, care
261 should be exercised since many software components, such as filesystems
262 and volume managers, are still restricted to capacities of one terabyte
263 or less. See the System Administration Guide: Basic Administration for
264 additional information.
265
266
267 By default, on an unlabeled disk, EFI labels will be written on disks
268 larger than 2 TB. When format is invoked with the -e option, on writing
269 the label, the label type can be chosen. Booting is not currently sup‐
270 ported on a disk with an EFI label.
271
273 format provides a help facility you can use whenever format is expect‐
274 ing input. You can request help about what information is expected by
275 simply entering a question mark (?) and format prints a brief descrip‐
276 tion of what type of input is needed. If you enter a ? at the menu
277 prompt, a list of available commands is displayed.
278
279
280 For SCSI disks, formatting is done with both Primary and Grown defects
281 list by default. However, if only Primary list is extracted in defect
282 menu before formatting, formatting will be done with Primary list only.
283
284
285 Changing the state of the caches is only supported on SCSI devices, and
286 not all SCSI devices support changing or saving the state of the
287 caches.
288
289
290 The NCSC-TG-025 algorithm for overwriting meets the DoD 5200.28-M (ADP
291 Security Manual) Eraser Procedures specification. The NIST Guidelines
292 for Media Sanitization (NIST SP 800-88) also reference this algorithm.
293
294
295
296SunOS 5.11 25 Sep 2008 format(1M)