Commit | Line | Data |
---|---|---|
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 | 22 | is used to calculate the disk partition sizes based on the |
b42074ab CL |
23 | default rules used at Berkeley. |
24 | .Pp | |
25 | Available options and operands: | |
26 | .Bl -tag -width Fl | |
27 | .It Fl p | |
28 | Tables suitable for inclusion in a device driver | |
29 | are produced. | |
30 | .It Fl d | |
31 | An entry suitable for inclusion in the disk | |
b9984f54 | 32 | description file |
b42074ab CL |
33 | .Pa /etc/disktab |
34 | is generated; for example, | |
35 | .Xr disktab 5 . | |
36 | .It Fl s Ar size | |
37 | The size of the disk may be limited to | |
38 | .Ar size | |
39 | with the | |
40 | .Fl s | |
41 | option. | |
42 | .El | |
43 | .Pp | |
a171a6d5 | 44 | On disks that use |
b42074ab CL |
45 | .Xr bad144 8 |
46 | type of | |
a171a6d5 | 47 | bad-sector forwarding, |
d288b932 MK |
48 | space is normally left in the last partition on the disk |
49 | for a bad sector forwarding table, although this space | |
50 | is not reflected in the tables produced. The space reserved | |
b9984f54 KM |
51 | is one track for the replicated copies of the table and |
52 | sufficient tracks to hold a pool of 126 sectors to which bad sectors | |
53 | are mapped. For more information, see | |
b42074ab CL |
54 | .Xr bad144 8 . |
55 | The | |
56 | .Fl s | |
57 | option is intended for other controllers which reserve some space at the end | |
d288b932 MK |
58 | of the disk for bad-sector replacements or other control areas, |
59 | even if not a multiple of cylinders. | |
b42074ab | 60 | .Pp |
b9984f54 | 61 | The disk partition sizes are based on the total amount of |
a171a6d5 | 62 | space on the disk as given in the table below (all values |
b42074ab CL |
63 | are supplied in units of sectors). The |
64 | .Ql c | |
65 | partition | |
a171a6d5 MK |
66 | is, by convention, used to access the entire physical disk. |
67 | The device driver tables include | |
b42074ab CL |
68 | the space reserved for the bad sector forwarding table in the |
69 | .Ql c | |
70 | partition; | |
a171a6d5 | 71 | those used in the disktab and default formats exclude reserved tracks. |
b42074ab CL |
72 | In normal operation, either the |
73 | .Ql g | |
74 | partition is used, or the | |
75 | .Ql d , | |
76 | .Ql e , | |
77 | and | |
78 | .Ql f | |
79 | partitions are used. The | |
80 | .Ql g | |
81 | and | |
82 | .Ql f | |
83 | partitions | |
a171a6d5 | 84 | are variable-sized, occupying whatever space remains after allocation |
b9984f54 KM |
85 | of the fixed sized partitions. |
86 | If the disk is smaller than 20 Megabytes, then | |
b42074ab CL |
87 | .Nm diskpart |
88 | aborts 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 |
91 | Partition 20-60 MB 61-205 MB 206-355 MB 356+ MB |
92 | a 15884 15884 15884 15884 | |
93 | b 10032 33440 33440 66880 | |
94 | d 15884 15884 15884 15884 | |
95 | e unused 55936 55936 307200 | |
96 | h unused unused 291346 291346 | |
b42074ab CL |
97 | .El |
98 | .Pp | |
b9984f54 | 99 | If an unknown disk type is specified, |
b42074ab | 100 | .Nm diskpart |
b9984f54 | 101 | will 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 | 106 | Most default partition sizes are based on historical artifacts |
b42074ab CL |
107 | (like the RP06), and may result in unsatisfactory layouts. |
108 | .Pp | |
109 | When using the | |
110 | .Fl d | |
111 | flag, alternate disk names are not included | |
b9984f54 | 112 | in the output. |
b42074ab CL |
113 | .Sh HISTORY |
114 | The | |
115 | .Nm | |
116 | command appeared in | |
117 | .Bx 4.2 . |