Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ fmthard(1M) — SunOS 5.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

format(1M)

prtvtoc(1M)

fmthard(1M)

NAME

fmthard − populate VTOC on hard disks

SYNOPSIS

/usr/sbin/fmthard [ −i ][ −d data ] [ −n volume_name ][ −s datafile ] /dev/rdsk/c?[t?]d?s? 

AVAILABILITY

SUNWcsr

DESCRIPTION

The fmthard command updates the VTOC (Volume Table of Contents) on hard disks.  The /dev/rdsk/c?[t?]d?s? file must be the character special file of the device where the new VTOC is to be installed. 

OPTIONS

The following options apply to fmthard:

−i Create the desired VTOC table, but prints the information to standard output instead of modifying the VTOC on the disk. 

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

−n volume_name Give the disk a volume_name up to 8 characters long. 

−s datafile Populate the VTOC according to a datafile created by the user.  If the datafile is "-", 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 (the whole disk).  Partition 2 is the only partition that can overlap others. 

The datafile contains one specification line for each partition, 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-15 decimal or 0x0-0xf hexadecimal. 

tag The partition tag: a two-digit hex number.  The following are reserved codes:  0x01 (V_BOOT), 0x02 (V_ROOT), 0x03 (V_SWAP), 0x04 (V_USR), 0x05 (V_BACKUP), 0x06 (V_STAND), 0x07 (V_VAR) and 0x08(V_HOME). 

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. 

SEE ALSO

format(1M), prtvtoc(1M)

NOTES

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

fmthard cannot write a disk label on an unlabeled disk.  Use format(1M) for this purpose. 

Sun Microsystems  —  Last change: 14 Sep 1992

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