Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ mkvtoc(8) — DYNIX/ptx 3.2.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

prtvtoc(8)

rmvtoc(8)

MKVTOC(8)  —  UNIX Programmer’s Manual

NAME

mkvtoc − create VTOC on disks

SYNOPSIS

/etc/mkvtoc [ −d arguments ] [ −g ] [ −f ] [ −s datafile ] disk disktype

DESCRIPTION

mkvtoc creates the VTOC (volume table of contents) on disks. 

OPTIONS

−d Permits change to a single partition.  arguments consist of a colon-separated list of entries similar to a line from datafile (described below). 

−g The VTOC is initialized and the disk geometry is set from the file /etc/diskinfo/disktype.geom.  This option must be supplied if the disk does not have a VTOC present. 

−f Allow partitions of type V_RESERVED to be changed.  Use of this option is strongly discouraged. 

−s The VTOC is populated according to a datafile created by the user.  The datafile format is described below. 

If no options are given, the VTOC is populated according to the specification of the default files in directory /etc/vtoc . The file /etc/vtoc/disktype.disk is used if it exists and if disktype and disk were supplied on the command line.  Otherwise, two files are tried in turn:  first, /etc/vtoc/disktype.controller, where controller is the disk name without unit number, and then /etc/vtoc/disktype.  For example, for a 792-megabyte disk, the disktype specific would be m2382k on zd0.  Files would be tried in the following order:  first, /etc/vtoc/m2383k.zd0, next, /etc/vtoc/m2382k.zd, and, last, /etc/vtoc/m2582k. 
 
This hierarchy of possibilities allows a system adminstrator to keep custom VTOC files corresponding to the various devices on the system without having to hand-override the VTOC description filename each time mkvtoc is run. 

The disk on which the VTOC is installed must be specified as an unpartitioned disk name such as /dev/rzd0 or /dev/rsd1. 

The datafile contains one specification line for each partition, starting with partition 0.  Lines beginning with an asterisk are treated as comments.  A specification line is composed of position-dependent entries separated by white space.  A line has the following format:

partition  type  starting_sector  size_in_sectors  block_size frag_size

The entries have the following values:

partition The partition number: 0-254. 

type The partition type: a decimal number.  The following are valid types: V_NOPART: 0, V_RAW: 1, V_BOOT: 2, V_RESERVED: 3, V_FW: 4, V_DIAG: 5. 

starting sector The sector number on which the partition starts. 

size in sectors The number of sectors occupied by the partition. 

The partition types have the following meanings:

V_NOPART This partition number does not represent valid, usable disk space.  A partition may be marked as V_NOPART to serve as a placeholder.  Note that if the datafile contains less than the maximum possible number of partitions, the remainder are marked V_NOPART . 

V_RAW This is a regular partition. 

V_BOOT This is an area of disk reserved for a bootstrap.  As such, filesystems should not be mounted here.  V_BOOT is a descriptive tag and has no functional difference from V_RAW . 

V_RESERVED
This is an area of the disk reserved for some disktype-specific purpose, such as bad block lists, diagnostic tracks, or the VTOC itself. Partitions of type V_RESERVED are treated differently than partitions of other types in that they may not be changed via the mkvtoc command, unless the −f flag is specified on the command line.  In general it is not wise to alter V_RESERVED partitions in any way, since various parts of the system depend on these disk sectors to be unchanged. 

V_FW This is an area of disk reserved for system controller firmware.  As such, filesystems should not be mounted here.  V_FW is a descriptive tag and has no functional difference from V_RAW . 

V_DIAG This is an area of the disk reserved for dumping model D hardware scan and cache data.  As such, filesystems should not be mounted here.  V_DIAG is also a descriptive tag and has no functional difference from V_RAW . 

A number of sanity checks are performed on the new VTOC before it is written to disk.  For example, the block size and fragment sizes are checked against system norms and the total number of sectors in partitions are checked to make sure they do not exceed the size of the disk.  In addition, if any two partitions have sectors which overlap, the mkvtoc command will fail. 

SEE ALSO

prtvtoc(8), rmvtoc(8)

WARNINGS

If a disk which has not previously contained a VTOC has data present in sectors 16 through 31, that data will be overwritten by the VTOC. 

7th Edition

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