1997-03-08 10:24:40 +03:00
|
|
|
.\" Copyright (c) 1983, 1991, 1993
|
|
|
|
.\" The Regents of the University of California. All rights reserved.
|
1993-03-21 12:45:37 +03:00
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
2003-08-07 15:25:11 +04:00
|
|
|
.\" 3. Neither the name of the University nor the names of its contributors
|
1993-03-21 12:45:37 +03:00
|
|
|
.\" may be used to endorse or promote products derived from this software
|
|
|
|
.\" without specific prior written permission.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
.\" SUCH DAMAGE.
|
|
|
|
.\"
|
1997-03-08 10:24:40 +03:00
|
|
|
.\" from: @(#)diskpart.8 8.1 (Berkeley) 6/6/93
|
2009-03-15 13:09:29 +03:00
|
|
|
.\" $NetBSD: diskpart.8,v 1.9 2009/03/15 10:09:29 joerg Exp $
|
1993-03-21 12:45:37 +03:00
|
|
|
.\"
|
1997-03-08 10:24:40 +03:00
|
|
|
.Dd June 6, 1993
|
1993-03-21 12:45:37 +03:00
|
|
|
.Dt DISKPART 8
|
1999-03-22 21:43:46 +03:00
|
|
|
.Os
|
1993-03-21 12:45:37 +03:00
|
|
|
.Sh NAME
|
|
|
|
.Nm diskpart
|
|
|
|
.Nd calculate default disk partition sizes
|
|
|
|
.Sh SYNOPSIS
|
1997-06-21 13:07:07 +04:00
|
|
|
.Nm
|
1993-03-21 12:45:37 +03:00
|
|
|
.Op Fl d
|
1997-06-21 13:07:07 +04:00
|
|
|
.Op Fl p
|
1993-03-21 12:45:37 +03:00
|
|
|
.Op Fl s Ar size
|
|
|
|
.Ar disk-type
|
|
|
|
.Sh DESCRIPTION
|
1997-06-21 13:07:07 +04:00
|
|
|
.Nm
|
1993-03-21 12:45:37 +03:00
|
|
|
is used to calculate the disk partition sizes based on the
|
|
|
|
default rules used at Berkeley.
|
|
|
|
.Pp
|
|
|
|
Available options and operands:
|
|
|
|
.Bl -tag -width Fl
|
|
|
|
.It Fl d
|
|
|
|
An entry suitable for inclusion in the disk
|
|
|
|
description file
|
|
|
|
.Pa /etc/disktab
|
|
|
|
is generated; for example,
|
|
|
|
.Xr disktab 5 .
|
1997-06-21 13:07:07 +04:00
|
|
|
.It Fl p
|
|
|
|
Tables suitable for inclusion in a device driver
|
|
|
|
are produced.
|
1993-03-21 12:45:37 +03:00
|
|
|
.It Fl s Ar size
|
|
|
|
The size of the disk may be limited to
|
|
|
|
.Ar size
|
|
|
|
with the
|
|
|
|
.Fl s
|
|
|
|
option.
|
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
On disks that use
|
|
|
|
.Xr bad144 8
|
|
|
|
type of
|
|
|
|
bad-sector forwarding,
|
|
|
|
space is normally left in the last partition on the disk
|
|
|
|
for a bad sector forwarding table, although this space
|
|
|
|
is not reflected in the tables produced. The space reserved
|
|
|
|
is one track for the replicated copies of the table and
|
|
|
|
sufficient tracks to hold a pool of 126 sectors to which bad sectors
|
2002-01-19 06:10:06 +03:00
|
|
|
are mapped. For more information, see
|
1993-03-21 12:45:37 +03:00
|
|
|
.Xr bad144 8 .
|
|
|
|
The
|
|
|
|
.Fl s
|
|
|
|
option is intended for other controllers which reserve some space at the end
|
|
|
|
of the disk for bad-sector replacements or other control areas,
|
|
|
|
even if not a multiple of cylinders.
|
|
|
|
.Pp
|
|
|
|
The disk partition sizes are based on the total amount of
|
|
|
|
space on the disk as given in the table below (all values
|
|
|
|
are supplied in units of sectors). The
|
|
|
|
.Ql c
|
|
|
|
partition
|
|
|
|
is, by convention, used to access the entire physical disk.
|
|
|
|
The device driver tables include
|
|
|
|
the space reserved for the bad sector forwarding table in the
|
|
|
|
.Ql c
|
|
|
|
partition;
|
|
|
|
those used in the disktab and default formats exclude reserved tracks.
|
|
|
|
In normal operation, either the
|
|
|
|
.Ql g
|
|
|
|
partition is used, or the
|
|
|
|
.Ql d ,
|
|
|
|
.Ql e ,
|
|
|
|
and
|
|
|
|
.Ql f
|
|
|
|
partitions are used. The
|
|
|
|
.Ql g
|
|
|
|
and
|
|
|
|
.Ql f
|
|
|
|
partitions
|
|
|
|
are variable-sized, occupying whatever space remains after allocation
|
|
|
|
of the fixed sized partitions.
|
|
|
|
If the disk is smaller than 20 Megabytes, then
|
1997-03-08 10:24:40 +03:00
|
|
|
.Nm
|
1993-03-21 12:45:37 +03:00
|
|
|
aborts with the message
|
|
|
|
.Dq Li disk too small, calculate by hand .
|
|
|
|
.Bl -column Partition 20-60\ MB 61-205\ MB 206-355\ MB 356+\ MB
|
2009-03-15 13:09:29 +03:00
|
|
|
.It Partition 20-60 MB 61-205 MB 206-355 MB 356+ MB
|
|
|
|
.It a 15884 15884 15884 15884
|
|
|
|
.It b 10032 33440 33440 66880
|
|
|
|
.It d 15884 15884 15884 15884
|
|
|
|
.It e unused 55936 55936 307200
|
|
|
|
.It h unused unused 291346 291346
|
1993-03-21 12:45:37 +03:00
|
|
|
.El
|
|
|
|
.Pp
|
2002-01-19 06:10:06 +03:00
|
|
|
If an unknown disk type is specified,
|
1997-03-08 10:24:40 +03:00
|
|
|
.Nm
|
1993-03-21 12:45:37 +03:00
|
|
|
will prompt for the required disk geometry information.
|
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr disktab 5 ,
|
|
|
|
.Xr bad144 8
|
2002-01-19 06:10:06 +03:00
|
|
|
.Sh HISTORY
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
command appeared in
|
|
|
|
.Bx 4.2 .
|
1993-03-21 12:45:37 +03:00
|
|
|
.Sh BUGS
|
|
|
|
Most default partition sizes are based on historical artifacts
|
|
|
|
(like the RP06), and may result in unsatisfactory layouts.
|
|
|
|
.Pp
|
|
|
|
When using the
|
|
|
|
.Fl d
|
1997-03-08 17:24:19 +03:00
|
|
|
flag, alternative disk names are not included
|
1993-03-21 12:45:37 +03:00
|
|
|
in the output.
|