Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ mkpart(1M) — Dell System V Release 4 Issue 2.2

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

edvtoc(1M)

prtvtoc(1M)



mkpart(1M)                UNIX System V(Base System)                 mkpart(1M)


NAME
      mkpart - disk maintenance utility

SYNOPSIS
      /etc/mkpart [ -f filename ] [ -p partition ] ... [ -P partition ] ... [
      -b ]
      [ -B filename ] [ -A sector ] ... [ -V ] [ -v ] [ -i ] [ -x file ]
      [ -t [ vpa ] ] device

      /etc/mkpart -F interleave raw_device

DESCRIPTION
      mkpart will not be supported in a future release.  See ``NOTES'' below.

      This program allows the system administrator to display and modify the
      data structures that the disk driver uses to access disks.  These
      structures describe the number, size, and type of the partitions, as well
      as the physical characteristics of the disk drive itself.

      The user maintains a file of stanzas, each of which contains comments and
      parameters.  The stanzas are of two varieties:  those that describe disk
      partitions and disk devices.  Stanzas may refer to other stanzas of the
      same type so that common device or partition types may be customized.  By
      default, the stanza file is named /etc/partitions.  The required
      parameter, device, specifies the device stanza for the disk to be used.

      The following options may be used with mkpart:

      -f  filename
              specifies the partition and device specification stanza file.  If
              not present, /etc/partitions is assumed.

      -p  partition
              removes a partition from the vtoc on the specified device.  The
              partition is a stanza that indicates the partition to be removed
              by its partition number parameter; no comparisons are made by
              attribute.
              Note: Alternate partitions cannot be removed.

      -P  partition
              adds a partition to the vtoc on the specified device. partition
              is a stanza which contains and/or refers to other stanzas that
              contain all of the necessary parameters for a vtoc partition.

      -b      causes only the boot program to be updated, unless other options
              are specified.

      -B  filename
              specifies a different boot program than the one given by the
              device stanza.




10/89                                                                    Page 1







mkpart(1M)                UNIX System V(Base System)                 mkpart(1M)


      -A  sector
              marks the specified sector as bad and assigns it an alternate if
              possible.  sector is a zero-based absolute sector number from the
              beginning of the drive.  To compute a sector number given
              cylinder, head, and (0-based) sector in track, the formula is
              cylinder * (sectors-per-track * heads-per-cylinder) + head *
              (sectors-per-track) + sector.

      -V      causes a complete surface-analysis pass to be run.  This first
              writes a data pattern (currently 0xe5 in every byte) to each
              sector of the disk, then reads each sector.  Any errors are noted
              and the bad sectors found are added to the alternates table if
              possible.

      -v      causes a non-destructive surface-analysis pass to be run.  This
              just reads every sector of the disk, noting bad sectors as above.

      -i      initializes the VTOC on the drive to default values, clearing any
              existing partition and bad-sector information which may have
              existed.  This is the only way to remove an alternate partition
              and can be used to re-initialize a drive which may have obsolete
              or incorrect VTOC data on it.

      -x file writes a complete device and partition stanza list for the
              specified device to file.
              Note:  The tags in the file are pseudo names used to identify the
              slice.

      -t [vpa]
              creates a listing of the current vtoc.  The sub-parameters
              specify pieces to be printed: a - alternate sectors, p -
              partitions, and v - vtoc and related structures.

      The partitions file is composed of blank-line-separated stanzas.  (Blank
      lines have only tabs and spaces between new-lines).  Commentary consists
      of all text between a '#' and a new-line.  Stanzas begin with an
      identifier followed by a ':', and are followed by a comma-separated list
      of parameters.  Each parameter has a keyword followed by an '=' followed
      by a value.  The value may be a number, another stanza's name, a double
      quoted string, or a parenthesis-surrounded, comma-separated list of
      numbers or ranges of numbers, as appropriate for the keyword.  Numbers
      may be written as decimal, octal, or hexadecimal constants in the form
      familiar to C programmers.

      Device specification stanzas may contain the following parameters:

      usedevice = name
                    causes the named stanza's parameters to be included in the
                    device definition.





Page 2                                                                    10/89







mkpart(1M)                UNIX System V(Base System)                 mkpart(1M)


      boot = string indicates that the string is the filename of a bootstrap
                    program to install on the disk.

      device = string
                    gives the filename of the character special device for the
                    disk.

      heads = number
                    specifies the number of tracks per cylinder on the device.

      cyls = number is the number of cylinders on the disk.

      sectors = number
                    is the number of sectors per track.

      bpsec = number
                    is the number of bytes per sector.

      dserial = string
                    is an arbitrary string which is recorded in the volume
                    label.  (Multibus systems only)

      vtocsec = number
                    gives the sector number to use for the volume table of
                    contents.
                    Note: for AT386 systems, this number MUST be 17.

      altsec = number
                    is the sector to use for the alternate block table.

      badsec = number-list
                    lists the known bad sectors.  These are appended to any
                    specified in the command line or found during surface
                    analysis.

      Partition stanzas may have the following parameters:

      usepart = name
                   refers to another partition stanza.

      partition = number
                   gives this partition's entry number in the vtoc.

      tag = tagname
                   A partition tag specifies the purpose of the partition.  The
                   tagnames are reserved words which are presently used for
                   identification purposes only:
                   BACKUP means the entire disk.
                   ROOT is a root file system partition.
                   BOOT is a bootstrap partition.
                   SWAP is a partition that does not contain a file system.
                   USR is a partition that does contain a file system.


10/89                                                                    Page 3







mkpart(1M)                UNIX System V(Base System)                 mkpart(1M)


                   ALTS contains alternate sectors to which the driver re-maps
                   bad sectors.  Currently a maximum of 62 alternate sectors is
                   supported.
                   OTHER is a partition that the UNIX system does not know how
                   to handle, such as MS-DOS space.

      perm = permname
                   specifies a permission type for the partition.  Permissions
                   are not mutually exclusive.
                   RO indicates that the partition cannot be written upon.
                   Normally, write access is granted (standard UNIX system file
                   permissions notwithstanding).
                   NOMOUNT disallows the driver from mounting the file system
                   that may be contained in the partition.
                   VALID indicates that the partition contains valid data.  Any
                   partition added with the -A flag will be marked VALID.

      start = number
                   is the starting sector number for the partition.
                   Note: For AT386 systems, the root file system should start
                   at the second track of the cylinder which is the beginning
                   of the active UNIX system 'fdisk' partition.  This allows
                   space for the writing of the boot code.

      size = number
                   is the size, in sectors, of the partition.

      When mkpart is run, it first attempts to read the volume label (for
      multibus systems) or the 'fdisk' table (for AT386 systems), the VTOC
      block, and the alternate sector table.  If any of the structures is
      invalid or cannot be read, or if the -i flag is specified, the internal
      tables are initialized to default values for the device specified (taken
      from the device stanza in the partition file).  If the -F flag is
      specified, the device is formatted.  If either the -V or -v flag is
      specified, the appropriate surface analysis is performed.  After these
      steps, partitions are deleted or added as required.  Next, any bad
      sectors specified in the partition file, found during surface analysis,
      or specified in the command line with -A flags are merged into the
      alternate sectors table.  Note that an alternate partition must exist for
      any bad-sector marking to occur, as bad sectors are assigned good
      alternates at this point.  Finally, the boot program is written to track
      0 of cylinder 0 (Multibus systems) or the cylinder where the active UNIX
      system 'fdisk' partition starts (AT386 systems).  If -b was not the only
      parameter specified,  the updated VTOC and alternates tables are written,
      and the disk driver is instructed to re-read the tables when the drive is
      opened the next time.  When only -t is specified, only a listing is
      created and no updating occurs.

      -F interleave
               causes the entire device to be hardware formatted.  This process
               re-writes all the sector headers on each track of the disk,
               enabling subsequent access using normal reads and writes.


Page 4                                                                    10/89







mkpart(1M)                UNIX System V(Base System)                 mkpart(1M)


               interleave is the distance in physical sectors between each
               successive logical sector.  Normal values are 1 for track-cache
               controllers, 3-4 for standard controllers.  The device for this
               option must be a raw UNIX system device.  The -F option
               precludes all other options, thus should be used alone.

FILES
      /etc/partitions /etc/boot /dev/rdsk/*s0

NOTES
      The mkpart command will not be supported in a future release.  Use
      prtvtoc and edvtoc instead [see prtvtoc(1M) and edvtoc(1M)].

      Currently, very little consistency checking is done.  No checks are made
      to ensure that the 'fdisk' partition table is consistent with the UNIX
      system partitions placed in the VTOC.  If a DOS 'fdisk' partition is
      started at cylinder 0, DOS will happily overwrite the UNIX system VTOC.

SEE ALSO
      edvtoc(1M), prtvtoc(1M)


































10/89                                                                    Page 5





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