macro and text revision (-mdoc version 3)
[unix-history] / usr / src / usr.sbin / diskpart / diskpart.8
CommitLineData
b42074ab
CL
1.\" Copyright (c) 1983, 1991 Regents of the University of California.
2.\" All rights reserved.
b9984f54 3.\"
b42074ab 4.\" %sccs.include.redist.man%
b9984f54 5.\"
b42074ab
CL
6.\" @(#)diskpart.8 6.6 (Berkeley) %G%
7.\"
8.Dd
9.Dt DISKPART 8
10.Os BSD 4
11.Sh NAME
12.Nm diskpart
13.Nd calculate default disk partition sizes
14.Sh SYNOPSIS
15.Nm diskpart
16.Op Fl p
17.Op Fl d
18.Op Fl s Ar size
19.Ar disk-type
20.Sh DESCRIPTION
21.Nm Diskpart
b9984f54 22is used to calculate the disk partition sizes based on the
b42074ab
CL
23default rules used at Berkeley.
24.Pp
25Available options and operands:
26.Bl -tag -width Fl
27.It Fl p
28Tables suitable for inclusion in a device driver
29are produced.
30.It Fl d
31An entry suitable for inclusion in the disk
b9984f54 32description file
b42074ab
CL
33.Pa /etc/disktab
34is generated; for example,
35.Xr disktab 5 .
36.It Fl s Ar size
37The size of the disk may be limited to
38.Ar size
39with the
40.Fl s
41option.
42.El
43.Pp
a171a6d5 44On disks that use
b42074ab
CL
45.Xr bad144 8
46type of
a171a6d5 47bad-sector forwarding,
d288b932
MK
48space is normally left in the last partition on the disk
49for a bad sector forwarding table, although this space
50is not reflected in the tables produced. The space reserved
b9984f54
KM
51is one track for the replicated copies of the table and
52sufficient tracks to hold a pool of 126 sectors to which bad sectors
53are mapped. For more information, see
b42074ab
CL
54.Xr bad144 8 .
55The
56.Fl s
57option is intended for other controllers which reserve some space at the end
d288b932
MK
58of the disk for bad-sector replacements or other control areas,
59even if not a multiple of cylinders.
b42074ab 60.Pp
b9984f54 61The disk partition sizes are based on the total amount of
a171a6d5 62space on the disk as given in the table below (all values
b42074ab
CL
63are supplied in units of sectors). The
64.Ql c
65partition
a171a6d5
MK
66is, by convention, used to access the entire physical disk.
67The device driver tables include
b42074ab
CL
68the space reserved for the bad sector forwarding table in the
69.Ql c
70partition;
a171a6d5 71those used in the disktab and default formats exclude reserved tracks.
b42074ab
CL
72In normal operation, either the
73.Ql g
74partition is used, or the
75.Ql d ,
76.Ql e ,
77and
78.Ql f
79partitions are used. The
80.Ql g
81and
82.Ql f
83partitions
a171a6d5 84are variable-sized, occupying whatever space remains after allocation
b9984f54
KM
85of the fixed sized partitions.
86If the disk is smaller than 20 Megabytes, then
b42074ab
CL
87.Nm diskpart
88aborts with the message
89.Dq Li disk too small, calculate by hand .
90.Bl -column Partition 20-60\ MB 61-205\ MB 206-355\ MB 356+\ MB
b9984f54
KM
91Partition 20-60 MB 61-205 MB 206-355 MB 356+ MB
92a 15884 15884 15884 15884
93b 10032 33440 33440 66880
94d 15884 15884 15884 15884
95e unused 55936 55936 307200
96h unused unused 291346 291346
b42074ab
CL
97.El
98.Pp
b9984f54 99If an unknown disk type is specified,
b42074ab 100.Nm diskpart
b9984f54 101will prompt for the required disk geometry information.
b42074ab
CL
102.Sh SEE ALSO
103.Xr disktab 5 ,
104.Xr bad144 8
105.Sh BUGS
d288b932 106Most default partition sizes are based on historical artifacts
b42074ab
CL
107(like the RP06), and may result in unsatisfactory layouts.
108.Pp
109When using the
110.Fl d
111flag, alternate disk names are not included
b9984f54 112in the output.
b42074ab
CL
113.Sh HISTORY
114The
115.Nm
116command appeared in
117.Bx 4.2 .