format(1M) manual page
Table of Contents
format - disk partitioning and maintenance utility
format
[ -f command-file ] [ -l log-file ] [ -x data-file ] [ -d disk-name ] [ -t disk-type
] [ -p partition-name ] [ -s ] [ -m ] [ -M ] [ -e ] [ disk-list ]
SUNWcsu
format enables you to format, label, repair and analyze disks
on your system. Unlike previous disk maintenance programs, format runs
under SunOS. Because there are limitations to what can be done to the system
disk while the system is running, format is also supported within the memory-resident
system environment. For most applications, however, running format under
SunOS is the more convenient approach.
format first uses the disk list defined
in data-file if the -x option is used. format then checks for the FORMAT_PATH
environment variable, a colon-separated list of filenames and/or directories.
In the case of a directory, format searches for a file named format.dat
in that directory; a filename should be an absolute pathname, and is used
without change. format adds all disk and partition definitions in each specified
file to the working set. Multiple identical definitions are silently ignored.
If FORMAT_PATH
is not set, the path defaults to /etc/format.dat.
disk-list
is a list of disks in the form c?t?d? or /dev/rdsk/c?t?d?s?. With the latter
form shell wildcard specifications are supported. For example, specifying
/dev/rdsk/c2* will cause format to work on all drives connected to controller
c2 only. If no disk-list is specified, format lists all the disks present
in the system.
The following options are supported:
- -f command-file
- Take command input from command-file 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, format does not issue continue?
prompts; there is no need to specify y(es) or n(o)
answers in the command-file.
In non-interactive mode, format does not initially expect the input of a
disk selection number. The user must specify the current working disk with
the -d disk-name option when format is invoked, or specify disk and the disk
selection number in the command-file.
- -l log-file
- Log a transcript of the format
session to the indicated log-file, including the standard input, the standard
output and the standard error.
- -x data-file
- Use the list of disks contained
in data-file.
- -d disk-name
- Specify which disk should be made current upon entry
into the program. The disk is specified by its logical name (for instance,
-c0t1d0). This can also be accomplished by specifying a single disk in the
disk list.
- -t disk-type
- 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.
- -p partition-name
- 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 only be used if a disk is being made
current, and its type is either specified or available from the disk label.
- -e
- Enable SCSI expert menu. Note this option is not recommended for casual
use.
- -s
- Silent. Suppress all of the standard output. Error messages are still
displayed. This is generally used in conjunction with the -f option.
- -m
- Enable
extended messages. Provides more detailed information in the event of an
error.
- -M
- Enable extended and diagnostic messages. Provides extensive information
on the state of an SCSI device’s mode pages, during formatting.
The
format utility’s main menu items allow you to do the following tasks:
- analyze
- Run read, write, and compare tests.
- backup
- Search for backup labels.
- current
- Display the device name, manufacturer and model of the current disk.
- defect
- Retrieve and print defect lists.
- disk
- Choose the disk that will be used
in subsequent operations (known as the current disk.)
- fdisk
- (x86 systems
only.) Run the fdisk(1M)
program to create a Solaris fdisk partition.
- format
- Format and verify the current disk.
- inquiry
- Display the vendor, product
name, and revision level of the current drive.
- label
- Write a new label to
the current disk.
- partition
- Create and modify slices.
- quit
- Exit the format
menu.
- repair
- Repair a specific block on the disk.
- save
- Save new disk and
slice information.
- type
- Identify the manufacturer and model of the current
disk.
- verify
- Print the following information about the disk: manufacturer
and model, number of cylinders, alternate cylinders, heads and sectors,
and partition table.
- volname
- Label the disk with a new eight character volume
name.
- FORMAT_PATH
- a colon-separated list of filenames and/or
directories of disk and partition definitions. If a directory is specified,
format searches for the file format.dat in that directory.
- /etc/format.dat
- default data file
fmthard(1M)
, prtvtoc(1M)
, format.dat(4)
, ipi(7D)
,
sd(7D)
See Disk Management in
fdisk(1M)
When the format
function is selected to format the Maxtor 207MB disk, the following message
displays:
Mode sense page(4)
reports rpm value as 0, adjusting it to 3600
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.
format 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 (?) and format prints a brief description of
what type of input is needed. If you enter a ? at the menu prompt, a list
of available commands is displayed.
For SCSI 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.
Table of Contents