Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ fmthard(1a) — NEWS-os 5.0.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

prtvtoc(1M)

disktab(7)



fmthard(1M)      SYSTEM ADMINISTRATION COMMANDS       fmthard(1M)



NAME
     fmthard - populate disk partition table on hard disks

SYNOPSIS
     /usr/sbin/fmthard [-d data] [-i] [-s datafile]
     [-n volume_name] character-special [disk-type]

DESCRIPTION
     The fmthard command use the disk-type option to look up  the
     type  of  the disk in the disk description file /etc/disktab
     and creates (or updates) the disk  partition  table  on  the
     hard  disk.  If no disk-type option is given, a default disk
     partition table is initialized with the first entry  in  the
     /etc/disktab file which matches the disk gemotry.

     The character-special (/dev/rdsk/c0d0s2) file  must  be  the
     character special file of the entire disk where the new disk
     partition table is to be installed.  The partition 2  (i.e.,
     /dev/rdsk/c0d0s2,  /dev/rdsk/c1d0s2)  in  the disk partition
     table is used for the whole disk.

     Building new filesystems on a new disk requires the  use  of
     format, which formats the disk, fmthard, which adds the disk
     partition table to the disk, newfs or  mkfs,  which  creates
     filesystems,  and  mount, which makes the filesystems avail-
     able for use.

OPTIONS
     The following options apply to fmthard:

     -d data
          The data argument of this option is a string represent-
          ing  the  information for a particular partition in the
          current disk partition table.  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  sectors  in  the  partition.   See the
          description of the datafile below for more  information
          on these fields.

     -i   Lets the command  create  the  desired  disk  partition
          table,  but  prints  the information to standard output
          instead of modifying the disk partition  table  on  the
          disk.

     -n volume_name
          Allows the disk to be given  a  volume_name  up  to  16
          characters long.

     -s datafile



                                                                1





fmthard(1M)      SYSTEM ADMINISTRATION COMMANDS       fmthard(1M)



          The disk partition table is populated  according  to  a
          datafile  created  by the user.  The datafile format is
          described below.

     The datafile contains one specification line for each parti-
     tion,  starting with partition 0.  Each line is delimited by
     a new-line character (\n).  If the first character 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  starting_sector  size_in_sectors

     where the entries have the following values.

     partition        The partition number: 0-7 decimal  or  0x0-
                      0x7 hexadecimal.

     tag              The partition tag:  a two-digit hex number.
                      The  following  are  reserved  codes:  0x01
                      (FS_BOOT), 0x02 (FS_ROOT), 0x03  (FS_SWAP),
                      0x04   (FS_USR),   0x05  (FS_BACKUP),  0x06
                      (FS_STAND) and 0x07 (FS_VAR).

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

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

     size in sectors  The number (decimal) of sectors occupied by
                      the partition.

     Note that 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. The volume_name will not be restored in  this
     case.   You  can use the -n option to put the volume_name to
     the disk.

SEE ALSO
     prtvtoc(1M), disktab(7).

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






                                                                2



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026