Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ fdisk(ADM) — OpenDesktop 3.0.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

dos(C)

hd(HW)


 fdisk(ADM)                      19 June 1992                      fdisk(ADM)


 Name

    fdisk - maintain disk partitions

 Syntax

    /etc/fdisk [ [-p ] [ -ad partition ] [ -c partition start size ]
    [ -t ostype ]] [ -f devicename ] [ -f devicename ] ]

 Description

    fdisk displays information about disk partitions.  It also creates and
    deletes disk partitions and changes the active partition.  fdisk func-
    tionality is a superset of the MS-DOS command of the same name.  fdisk is
    usually used interactively from a menu.

    The hard disk has a maximum of four partitions.  Only one partition is
    active at any given time.  It is possible to assign a different operating
    system to each partition.  Once a partition is made active, the operating
    system resident in that partition boots automatically once the current
    operating system is halted.

    The fdisk utility reports disk sizes in tracks.  The number of tracks
    available on a hard disk is equal to the number of heads times the number
    of cylinders.  The fdisk utility does not allocate the first track or the
    last cylinder on the hard disk when the ``Use Entire Disk for UNIX''
    option is used. The first track on the hard disk is reserved for master-
    boot and the last cylinder is generally used when running hard disk diag-
    nostics. You should not allocate the last cylinder if you plan to run
    diagnostics on your hard disk.

    For example, if a disk has 4 heads and 615 cylinders, it has 2460 tracks,
    which fdisk reports as tracks 0-2459.  If you choose the ``Use Entire
    Disk for UNIX'' option, fdisk will create a UNIX partition on tracks 1-
    2455.  Track 0 is reserved for masterboot, and the last cylinder (tracks
    2455-2459) is not assigned with the ``Use Entire Disk for UNIX'' option.

    Partitions are defined by a ``partition table'' at the end of the master
    boot block.  The partition table provides the location and size of the
    partitions on the disk.  The partition table also defines the active par-
    tition.  Each partition can be assigned to the UNIX system, DOS, or some
    other operating system.  Once a DOS partition is set up, DOS files and
    directories resident in the DOS partition may be accessed from the UNIX
    system partition by means of the dos(C) commands.  DOS may be booted
    without the DOS partition being active by entering dos at the boot
    prompt.  See boot(HW).

 Arguments

    -p, -a, -d,-c   These flags are used to invoke fdisk non-interactively.
                    The argument number, below, refers to a valid partition
                    number (1-4).

    -p              Prints out the disk partition table, one partition to a
                    line.  For each partition, fdisk displays the following
                    information:

                    partition start stop size status type

    -a number       Activates partition number.

    -d number       Deletes partition number.

    -c number start size
                    Creates a partition number that is size tracks long
                    beginning at track start.  The -c option is used to use
                    the entire disk for UNIX; the appending of a dash (-) to
                    the end of the command line accomplishes this, as in the
                    following example:

                    fdisk -c 1 1 -

                    This syntax is used only during installation.  If there
                    are any existing partitions on the disk, this command
                    will fail.

    -f name         Open device name and read the partition table associated
                    with that device's partition.  The default is /dev/rhd00.

    -t ostype       Specify the partition type of the partition being creat-
                    ed, where ostype is one of the following: UNIX, XENIX,
                    DOS, DOS_12, DOS_16, DOS_32, OS/2 or CCPM. DOS is the
                    same as DOS_16. If no -t option is specified, the default
                    partition type is UNIX.

 Options

    When invoked interactively (without the -p, -a, -d, or -c options), fdisk
    displays a prompt and a menu of five options.  No changes are made to the
    partition table on the disk until you enter ``q'' from the main menu.

    1. Display Partition Table
       This option displays a table of information about each partition on
       the hard disk.  The ``PARTITION'' column gives the partition number.
       The ``STATUS'' column tells whether the partition is active (A) or
       inactive (I).  ``TYPE'' tells whether the partition is a UNIX system
       partition, a DOS partition, or ``other''.  The option also displays
       the starting track, ending track and total number of tracks in each
       partition.

    2. Use Entire Disk for UNIX
       fdisk creates one partition that includes all the tracks on the disk,
       except the first track and the last cylinder.  This partition is
       assigned to the UNIX system and is designated the active partition.

    3. Use Rest of Disk for UNIX
       fdisk creates one partition that occupies the largest available con-
       tiguous area of the disk.  This partition is assigned to the UNIX sys-
       tem and is designated the active partition.

    4. Create UNIX Partition
       This option allows the creation of a partition by altering the parti-
       tion table.  fdisk reports the number of tracks available for each
       partition and the number of tracks in use.  fdisk prompts for the par-
       tition to create, the starting track and size in tracks.  The change
       is written to the hard disk when you enter ``q'' from the main menu.

    5. Activate Partition
       This option activates the specified partition.  Only one partition may
       be active at a time.  The change is not effective until you exit.  The
       operating system residing in the newly activated partition boots once
       the current operating system is halted.

    6. Delete Partition
       This option requests which partition you wish to delete.  fdisk
       reports the new available amount of disk space in tracks.  The change
       is not effective until you exit.

    Exit the fdisk program by typing a ``q'' at the main fdisk menu. Your
    changes are now written to the hard disk.

 Notes

    The minimum recommended size for a UNIX system partition is 40 megabytes.

    Since fdisk is intended for use with DOS, it may not work with all oper-
    ating system combinations.

    OS/2 partitions are displayed as UNKNOWN.

 See also

    dos(C), hd(HW)

 Value added

    fdisk is an extension of AT&T System V provided by The Santa Cruz Opera-
    tion, Inc.


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