MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


System Administration Commands                        fmthard(1M)



NAME
     fmthard - populate label on hard disks

SYNOPSIS
  SPARC
     fmthard -d data  -n volumename  -s datafile [-i] /dev/rdsk/c?
          [t?] d?s2


  x86
     fmthard -d data  -n volumename  -s datafile [-i] /dev/rdsk/c?
          [t?] d?s2


DESCRIPTION
     The fmthard command updates the VTOC (Volume Table  of  Con-
     tents) on hard disks and, on x86 systems, adds boot informa-
     tion to the Solaris fdisk partition.  One  or  more  of  the
     options -s datafile, -d data, or -n volumename must be used
     to request modifications to the disk label.  To  print  disk
     label  contents,  see  prtvtoc(1M). The /dev/rdsk/c?[t?]d?s2
     file must be the character special file of the device  where
     the  new label is to be installed. On x86 systems, fdisk(1M)
     must be run on the drive before fmthard.


     If you are using an x86 system, note that the term  ``parti-
     tion''  in  this  page refers to slices within the x86 fdisk
     partition on x86 machines. Do  not  confuse  the  partitions
     created by fmthard with the partitions created by fdisk.

OPTIONS
     The following options are supported:

     -d data

         The data argument of this option is a string  represent-
         ing  the  information  for a particular partition in the
         current  VTOC.  The  string  must  be  of   the   format
         part:tag:flag:start:size  where  part  is  the partition
         number, tag is the ID TAG of the partition, flag is  the
         set  of  permission  flags, start is the starting sector
         number of the partition, and size is the number of  sec-
         tors  in  the  partition.  See  the  description  of the
         datafile below for more information on these fields.


     -i

         This option allows the command  to  create  the  desired
         VTOC  table, but prints the information to standard out-
         put instead of modifying the VTOC on the disk.



SunOS 5.11          Last change: 25 Sep 2008                    1






System Administration Commands                        fmthard(1M)



     -n volumename

         This option is used to give the disk a volumename up to
         8 characters long.


     -s datafile

         This option is used to populate the VTOC according to  a
         datafile  created  by  the user. If the datafile is - (a
         hyphen), fmthard reads from standard input. The datafile
         format is described below. This option causes all of the
         disk partition timestamp fields to be set to zero.

         Every VTOC generated by fmthard will also have partition
         2, by convention, that corresponds to the whole disk. If
         the input in datafile does not specify an entry for par-
         tition  2,  a  default partition 2 entry will be created
         automatically in VTOC with the  tag  VBACKUP  and  size
         equal to the full size of the disk.

         The datafile contains one specification  line  for  each
         partition,  starting with partition 0. Each line is del-
         imited by a new-line character (\n). If the first  char-
         acter  of a line is an asterisk (*), the line is treated
         as a comment. Each line is composed of entries that  are
         position-dependent,  separated by white space and having
         the following format:

         partition tag flag startingsector sizeinsectors

         where the entries have the following values:

         partition

             The partition number. Currently, for Solaris  SPARC,
             a disk can have up to 8 partitions, 0-7. Even though
             the partition field has 4  bits,  only  3  bits  are
             currently  used.  For  x86,  all  4 bits are used to
             allow slices 0-15. Each Solaris fdisk partition  can
             have up to 16 slices.


         tag

             The partition tag: a decimal number.  The  following
             are  reserved codes: 0 (VUNASIGNED), 1 (VBOT), 2
             (VROT), 3 (VSWAP), 4  (VUSR),  5  (VBACKUP),  6
             (VSTAND), 7 (VAR), and 8 (VHOME).






SunOS 5.11          Last change: 25 Sep 2008                    2






System Administration Commands                        fmthard(1M)



         flag

             The  flag  allows  a  partition  to  be  flagged  as
             unmountable  or  read only, the masks being: VUNMNT
             0x01, and VRONLY 0x10. For mountable partitions use
             0x00.


         startingsector

             The sector number (decimal) on which  the  partition
             starts.


         sizeinsectors

             The number (decimal) of sectors occupied by the par-
             tition.

         You can save the output of a prtvtoc command to a  file,
         edit  the  file,  and use it as the datafile argument to
         the -s option.


ATRIBUTES
     See attributes(5) for descriptions of the  following  attri-
     butes:



     
           ATRIBUTE TYPE               ATRIBUTE VALUE       
    
     Availability                 SUNWcsu                     
    


SEE ALSO
     uname(1), format(1M), prtvtoc(1M), attributes(5)

  x86 Only
     fdisk(1M), installgrub(1M)

NOTES
     Special care should be exercised when overwriting an  exist-
     ing  VTOC, as incorrect entries could result in current data
     being inaccessible. As a precaution, save the old VTOC.


     For disks under two terabytes, fmthard cannot write  a  VTOC
     on an unlabeled disk. Use format(1M) for this purpose.




SunOS 5.11          Last change: 25 Sep 2008                    3



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™