1fmthard(1M)             System Administration Commands             fmthard(1M)
2
3
4

NAME

6       fmthard - populate label on hard disks
7

SYNOPSIS

9   SPARC
10       fmthard -d data | -n volume_name | -s datafile [-i] /dev/rdsk/c?
11            [t?] d?s2
12
13
14   x86
15       fmthard -d data | -n volume_name | -s datafile [-i] /dev/rdsk/c?
16            [t?] d?s2
17
18

DESCRIPTION

20       The fmthard command updates the VTOC (Volume Table of Contents) on hard
21       disks and, on x86 systems, adds boot information to the  Solaris  fdisk
22       partition.  One or more of the options -s datafile, -d data, or -n vol‐
23       ume_name must be used to request modifications to the  disk  label.  To
24       print  disk  label  contents, see prtvtoc(1M). The /dev/rdsk/c?[t?]d?s2
25       file must be the character special file of the  device  where  the  new
26       label  is to be installed. On x86 systems, fdisk(1M) must be run on the
27       drive before fmthard.
28
29
30       If you are using an x86 system, note that  the  term  ``partition''  in
31       this  page  refers  to  slices  within  the  x86 fdisk partition on x86
32       machines. Do not confuse the partitions created  by  fmthard  with  the
33       partitions created by fdisk.
34

OPTIONS

36       The following options are supported:
37
38       -d data
39
40           The  data  argument  of  this  option  is a string representing the
41           information for a particular partition in  the  current  VTOC.  The
42           string must be of the format part:tag:flag:start:size where part is
43           the partition number, tag is the ID TAG of the partition,  flag  is
44           the set of permission flags, start is the starting sector number of
45           the partition, and size is the number of sectors in the  partition.
46           See  the  description of the datafile below for more information on
47           these fields.
48
49
50       -i
51
52           This option allows the command to create the  desired  VTOC  table,
53           but  prints the information to standard output instead of modifying
54           the VTOC on the disk.
55
56
57       -n volume_name
58
59           This option is used to give the disk a volume_name up to 8  charac‐
60           ters long.
61
62
63       -s datafile
64
65           This  option  is  used to populate the VTOC according to a datafile
66           created by the user. If the datafile is (a hyphen), fmthard reads
67           from  standard  input. The datafile format is described below. This
68           option causes all of the disk partition timestamp fields to be  set
69           to zero.
70
71           Every VTOC generated by fmthard will also have partition 2, by con‐
72           vention, that corresponds to  the  whole  disk.  If  the  input  in
73           datafile  does not specify an entry for partition 2, a default par‐
74           tition 2 entry will be created automatically in VTOC with  the  tag
75           V_BACKUP and size equal to the full size of the disk.
76
77           The  datafile  contains  one specification line for each partition,
78           starting with partition 0. Each line is  delimited  by  a  new-line
79           character  (\n).  If  the  first character of a line is an asterisk
80           (*), the line is treated as a comment. Each  line  is  composed  of
81           entries  that  are position-dependent, separated by white space and
82           having the following format:
83
84           partition tag flag starting_sector size_in_sectors
85
86           where the entries have the following values:
87
88           partition
89
90               The partition number. Currently, for Solaris SPARC, a disk  can
91               have  up  to 8 partitions, 07. Even though the partition field
92               has 4 bits, only 3 bits are currently used. For x86, all 4 bits
93               are used to allow slices 015. Each Solaris fdisk partition can
94               have up to 16 slices.
95
96
97           tag
98
99               The partition tag: a decimal number. The following are reserved
100               codes:  0 (V_UNASSIGNED), 1 (V_BOOT), 2 (V_ROOT), 3 (V_SWAP), 4
101               (V_USR), 5 (V_BACKUP), 6 (V_STAND), 7 (V_VAR), and 8 (V_HOME).
102
103
104           flag
105
106               The flag allows a partition to be  flagged  as  unmountable  or
107               read only, the masks being: V_UNMNT 0x01, and V_RONLY 0x10. For
108               mountable partitions use 0x00.
109
110
111           starting_sector
112
113               The sector number (decimal) on which the partition starts.
114
115
116           size_in_sectors
117
118               The number (decimal) of sectors occupied by the partition.
119
120           You can save the output of a prtvtoc command to a  file,  edit  the
121           file, and use it as the datafile argument to the -s option.
122
123

ATTRIBUTES

125       See attributes(5) for descriptions of the following attributes:
126
127
128
129
130       ┌─────────────────────────────┬─────────────────────────────┐
131       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
132       ├─────────────────────────────┼─────────────────────────────┤
133       │Availability                 │SUNWcsu                      │
134       └─────────────────────────────┴─────────────────────────────┘
135

SEE ALSO

137       uname(1), format(1M), prtvtoc(1M), attributes(5)
138
139   x86 Only
140       fdisk(1M), installgrub(1M)
141

NOTES

143       Special  care should be exercised when overwriting an existing VTOC, as
144       incorrect entries could result in current data being inaccessible. As a
145       precaution, save the old VTOC.
146
147
148       For  disks under two terabytes, fmthard cannot write a VTOC on an unla‐
149       beled disk. Use format(1M) for this purpose.
150
151
152
153SunOS 5.11                        25 Sep 2008                      fmthard(1M)
Impressum