| @@ -1,678 +1,678 @@ | | | @@ -1,678 +1,678 @@ |
1 | .\" $NetBSD: fdisk.8,v 1.86 2016/09/11 03:35:08 sevan Exp $ | | 1 | .\" $NetBSD: fdisk.8,v 1.87 2017/01/27 10:12:05 abhinav Exp $ |
2 | .\" | | 2 | .\" |
3 | .Dd September 11, 2016 | | 3 | .Dd September 11, 2016 |
4 | .Dt FDISK 8 | | 4 | .Dt FDISK 8 |
5 | .Os | | 5 | .Os |
6 | .Sh NAME | | 6 | .Sh NAME |
7 | .Nm fdisk | | 7 | .Nm fdisk |
8 | .Nd MS-DOS partition maintenance program | | 8 | .Nd MS-DOS partition maintenance program |
9 | .Sh SYNOPSIS | | 9 | .Sh SYNOPSIS |
10 | .Nm | | 10 | .Nm |
11 | .Op Fl aBFfIiSuv | | 11 | .Op Fl aBFfIiSuv |
12 | .Oo | | 12 | .Oo |
13 | .Fl 0 | 1 | 2 | 3 | E Ar number | | 13 | .Fl 0 | 1 | 2 | 3 | E Ar number |
14 | .Op Fl s Oo Ar id Oc Ns Oo / Ns Oo Ar start Oc Ns Oo / Ns Oo Ar size Oc Ns Oo / Ns Oo Ar bootmenu Oc Oc Oc Oc | | 14 | .Op Fl s Oo Ar id Oc Ns Oo / Ns Oo Ar start Oc Ns Oo / Ns Oo Ar size Oc Ns Oo / Ns Oo Ar bootmenu Oc Oc Oc Oc |
15 | .Oc | | 15 | .Oc |
16 | .Op Fl r Ar file | Fl w Ar file | | 16 | .Op Fl r Ar file | Fl w Ar file |
17 | .Op Fl A Ar ptn_alignment Ns Bq Ar /ptn_0_offset | | 17 | .Op Fl A Ar ptn_alignment Ns Bq Ar /ptn_0_offset |
18 | .Op Fl b Ar cylinders/heads/sectors | | 18 | .Op Fl b Ar cylinders/heads/sectors |
19 | .Op Fl c Ar bootcode | | 19 | .Op Fl c Ar bootcode |
20 | .Op Fl T Ar disktype | | 20 | .Op Fl T Ar disktype |
21 | .Op Fl t Ar disktab | | 21 | .Op Fl t Ar disktab |
22 | .Op Fl z Ar sectorsize | | 22 | .Op Fl z Ar sectorsize |
23 | .Op Ar device | | 23 | .Op Ar device |
24 | .Nm | | 24 | .Nm |
25 | .Fl l | | 25 | .Fl l |
26 | .Sh DESCRIPTION | | 26 | .Sh DESCRIPTION |
27 | The | | 27 | The |
28 | .Nm | | 28 | .Nm |
29 | program is used to display or update the | | 29 | program is used to display or update the |
30 | .Em "master boot record" | | 30 | .Em "master boot record" |
31 | or | | 31 | or |
32 | .Em MBR | | 32 | .Em MBR |
33 | in the first sector (sector 0) | | 33 | in the first sector (sector 0) |
34 | of a disk that uses the MBR style of partitioning. | | 34 | of a disk that uses the MBR style of partitioning. |
35 | The following | | 35 | The following |
36 | .Nx | | 36 | .Nx |
37 | ports use this style of disk partitioning: | | 37 | ports use this style of disk partitioning: |
38 | amd64, arc, bebox, cobalt, hpcarm, hpcmips, hpcsh, i386, macppc, | | 38 | amd64, arc, bebox, cobalt, hpcarm, hpcmips, hpcsh, i386, macppc, |
39 | mvmeppc, netwinder, ofppc, playstation2, and prep. | | 39 | mvmeppc, netwinder, ofppc, playstation2, and prep. |
40 | .Pp | | 40 | .Pp |
41 | The MBR contains bootable code, a partition table, | | 41 | The MBR contains bootable code, a partition table, |
42 | an indication of which partition is | | 42 | an indication of which partition is |
43 | .Sq active , | | 43 | .Sq active , |
44 | and (optionally, depending on the boot code) a menu | | 44 | and (optionally, depending on the boot code) a menu |
45 | for selecting a partition to be booted. | | 45 | for selecting a partition to be booted. |
46 | There can be at most 4 partitions defined in sector 0, | | 46 | There can be at most 4 partitions defined in sector 0, |
47 | one of which can be an extended | | 47 | one of which can be an extended |
48 | partition which can be split into any number of sub-partitions (then called | | 48 | partition which can be split into any number of sub-partitions (then called |
49 | logical partitions). | | 49 | logical partitions). |
50 | .Pp | | 50 | .Pp |
51 | The boot code in the MBR is usually invoked by the BIOS or firmware, | | 51 | The boot code in the MBR is usually invoked by the BIOS or firmware, |
52 | and the MBR passes control to the next stage boot code | | 52 | and the MBR passes control to the next stage boot code |
53 | stored in the first sector of the partition to be booted | | 53 | stored in the first sector of the partition to be booted |
54 | (the | | 54 | (the |
55 | .Em "partition boot record" | | 55 | .Em "partition boot record" |
56 | or | | 56 | or |
57 | .Em PBR ) . | | 57 | .Em PBR ) . |
58 | .Pp | | 58 | .Pp |
59 | After booting, | | 59 | After booting, |
60 | .Nx | | 60 | .Nx |
61 | does not use the partitioning done by | | 61 | does not use the partitioning done by |
62 | .Nm , | | 62 | .Nm , |
63 | instead it uses a | | 63 | instead it uses a |
64 | .Nx | | 64 | .Nx |
65 | disklabel saved in sector 1 of the | | 65 | disklabel saved in sector 1 of the |
66 | .Nx | | 66 | .Nx |
67 | partition. | | 67 | partition. |
68 | See | | 68 | See |
69 | .Xr mbrlabel 8 | | 69 | .Xr mbrlabel 8 |
70 | for a way of using information from the MBR | | 70 | for a way of using information from the MBR |
71 | to construct a | | 71 | to construct a |
72 | .Nx | | 72 | .Nx |
73 | disklabel. | | 73 | disklabel. |
74 | .Pp | | 74 | .Pp |
75 | The standard MBR boot code will only boot the | | 75 | The standard MBR boot code will only boot the |
76 | .Sq active | | 76 | .Sq active |
77 | partition. | | 77 | partition. |
78 | However, | | 78 | However, |
79 | .Nx | | 79 | .Nx |
80 | contains additional boot programs which allow the user to | | 80 | contains additional boot programs which allow the user to |
81 | interactively select which of the partitions to boot. | | 81 | interactively select which of the partitions to boot. |
82 | The | | 82 | The |
83 | .Sq mbr_ext | | 83 | .Sq mbr_ext |
84 | code will also boot | | 84 | code will also boot |
85 | .Nx | | 85 | .Nx |
86 | from an extended partition but will not work on old systems that do not | | 86 | from an extended partition but will not work on old systems that do not |
87 | support LBA reads, the | | 87 | support LBA reads, the |
88 | .Sq mbr_com0 | | 88 | .Sq mbr_com0 |
89 | and | | 89 | and |
90 | .Sq mbr_com0_9600 | | 90 | .Sq mbr_com0_9600 |
91 | will read and write from a serial port. | | 91 | will read and write from a serial port. |
92 | At the start the | | 92 | At the start the |
93 | .Nm | | 93 | .Nm |
94 | program will determine whether the disk sector 0 is valid as a boot sector. | | 94 | program will determine whether the disk sector 0 is valid as a boot sector. |
95 | (This is determined by checking the magic number.) | | 95 | (This is determined by checking the magic number.) |
96 | If not, | | 96 | If not, |
97 | .Nm | | 97 | .Nm |
98 | will initialise the boot code as well as the partition table. | | 98 | will initialise the boot code as well as the partition table. |
99 | During this, all four partitions will be marked empty. | | 99 | During this, all four partitions will be marked empty. |
100 | .Pp | | 100 | .Pp |
101 | The flags | | 101 | The flags |
102 | .Fl a , | | 102 | .Fl a , |
103 | .Fl i | | 103 | .Fl i |
104 | or | | 104 | or |
105 | .Fl u | | 105 | .Fl u |
106 | are used to indicate that the partition data is to be updated. | | 106 | are used to indicate that the partition data is to be updated. |
107 | The | | 107 | The |
108 | .Nm | | 108 | .Nm |
109 | program will enter an interactive conversational mode. | | 109 | program will enter an interactive conversational mode. |
110 | This mode is designed not to change any data unless you explicitly tell it to; | | 110 | This mode is designed not to change any data unless you explicitly tell it to; |
111 | .Nm | | 111 | .Nm |
112 | selects defaults for its questions to guarantee that behaviour. | | 112 | selects defaults for its questions to guarantee that behaviour. |
113 | .Pp | | 113 | .Pp |
114 | If partition data is going to be updated and the disk carries GUID Partition | | 114 | If partition data is going to be updated and the disk carries GUID Partition |
115 | Tables, | | 115 | Tables, |
116 | .Nm | | 116 | .Nm |
117 | will remove both primary and backup GPT headers from the disk. | | 117 | will remove both primary and backup GPT headers from the disk. |
118 | See | | 118 | See |
119 | .Xr gpt 8 | | 119 | .Xr gpt 8 |
120 | for information on how to manipulate GUID Partition Tables. | | 120 | for information on how to manipulate GUID Partition Tables. |
121 | .Pp | | 121 | .Pp |
122 | .Nm | | 122 | .Nm |
123 | will calculate the correct | | 123 | will calculate the correct |
124 | .Em cylinder , | | 124 | .Em cylinder , |
125 | .Em head , | | 125 | .Em head , |
126 | and | | 126 | and |
127 | .Em sector | | 127 | .Em sector |
128 | values for any partition you edit. | | 128 | values for any partition you edit. |
129 | If you specify | | 129 | If you specify |
130 | .Fl v | | 130 | .Fl v |
131 | you will be asked whether you want to specify them yourself. | | 131 | you will be asked whether you want to specify them yourself. |
132 | .Pp | | 132 | .Pp |
133 | Finally, when all the data for the first sector has been accumulated, | | 133 | Finally, when all the data for the first sector has been accumulated, |
134 | .Nm | | 134 | .Nm |
135 | will ask if you really want to write the new partition table. | | 135 | will ask if you really want to write the new partition table. |
136 | Only if you reply affirmatively to this question will | | 136 | Only if you reply affirmatively to this question will |
137 | .Nm | | 137 | .Nm |
138 | write anything to the disk. | | 138 | write anything to the disk. |
139 | .Pp | | 139 | .Pp |
140 | Available options: | | 140 | Available options: |
141 | .Bl -tag -width Ds | | 141 | .Bl -tag -width Ds |
142 | .It Fl 0 | | 142 | .It Fl 0 |
143 | Specify partition slot 0 to be printed or updated. | | 143 | Specify partition slot 0 to be printed or updated. |
144 | .It Fl 1 | | 144 | .It Fl 1 |
145 | Specify partition slot 1 to be printed or updated. | | 145 | Specify partition slot 1 to be printed or updated. |
146 | .It Fl 2 | | 146 | .It Fl 2 |
147 | Specify partition slot 2 to be printed or updated. | | 147 | Specify partition slot 2 to be printed or updated. |
148 | .It Fl 3 | | 148 | .It Fl 3 |
149 | Specify partition slot 3 to be printed or updated. | | 149 | Specify partition slot 3 to be printed or updated. |
150 | .It Fl A Ar ptn_alignment Ns Bq Ar /ptn_0_offset | | 150 | .It Fl A Ar ptn_alignment Ns Bq Ar /ptn_0_offset |
151 | Specify the alignment for all partitions and optionally the offset for the | | 151 | Specify the alignment for all partitions and optionally the offset for the |
152 | first partition of the disk and of logical partitions. | | 152 | first partition of the disk and of logical partitions. |
153 | If | | 153 | If |
154 | .Ar ptn_alignment | | 154 | .Ar ptn_alignment |
155 | is specified and | | 155 | is specified and |
156 | .Ar ptn_0_offset | | 156 | .Ar ptn_0_offset |
157 | is not specified, then the offset is set to the alignment. | | 157 | is not specified, then the offset is set to the alignment. |
158 | If | | 158 | If |
159 | .Fl A | | 159 | .Fl A |
160 | is not specified, then the alignment of the first partition is inspected. | | 160 | is not specified, then the alignment of the first partition is inspected. |
161 | If it ends on a 2048 sector boundary, then the alignment is set to 2048, | | 161 | If it ends on a 2048 sector boundary, then the alignment is set to 2048, |
162 | if the start is a power of 2 less than, or equal to 2048 then the offset | | 162 | if the start is a power of 2 less than, or equal to 2048 then the offset |
163 | is set to the start sector. | | 163 | is set to the start sector. |
164 | If the first partition is not defined then the alignment and offset for disks | | 164 | If the first partition is not defined then the alignment and offset for disks |
165 | larger than 128GB is set to 2048 (1MB). | | 165 | larger than 128GB is set to 2048 (1MB). |
166 | In all other cases the alignment default to a cylinder | | 166 | In all other cases the alignment default to a cylinder |
167 | and the offset to a track (both using the BIOS geometry). | | 167 | and the offset to a track (both using the BIOS geometry). |
168 | The 1MB alignment is the same as that used by recent windows versions. | | 168 | The 1MB alignment is the same as that used by recent windows versions. |
169 | .It Fl a | | 169 | .It Fl a |
170 | Change the active partition. | | 170 | Change the active partition. |
171 | In interactive mode this question will be asked after the partitions | | 171 | In interactive mode this question will be asked after the partitions |
172 | have been processed. | | 172 | have been processed. |
173 | .It Fl B | | 173 | .It Fl B |
174 | On an i386 or amd64 system, interactively update the boot selector settings. | | 174 | On an i386 or amd64 system, interactively update the boot selector settings. |
175 | (The boot selector permits the user to interactively select the boot | | 175 | (The boot selector permits the user to interactively select the boot |
176 | partition, and thus which operating system is run, at system boot time; see | | 176 | partition, and thus which operating system is run, at system boot time; see |
177 | .Xr mbr 8 | | 177 | .Xr mbr 8 |
178 | for more information.) | | 178 | for more information.) |
179 | .It Fl b Ar cylinders/heads/sectors | | 179 | .It Fl b Ar cylinders/heads/sectors |
180 | Specify the BIOS geometry parameters for | | 180 | Specify the BIOS geometry parameters for |
181 | .Ar cylinders , | | 181 | .Ar cylinders , |
182 | .Ar heads , | | 182 | .Ar heads , |
183 | and | | 183 | and |
184 | .Ar sectors . | | 184 | .Ar sectors . |
185 | It is used only in conjunction with the | | 185 | It is used only in conjunction with the |
186 | .Fl u | | 186 | .Fl u |
187 | flag. | | 187 | flag. |
188 | If not specified the BIOS geometry will be obtained using sysctl (i386 and | | 188 | If not specified the BIOS geometry will be obtained using sysctl (i386 and |
189 | amd64) or by solving the simultaenous equations from the existing partition | | 189 | amd64) or by solving the simultaneous equations from the existing partition |
190 | information. | | 190 | information. |
191 | If that fails then either the geometry from the disklabel or 63 sectors and | | 191 | If that fails then either the geometry from the disklabel or 63 sectors and |
192 | 16 heads is used. | | 192 | 16 heads is used. |
193 | For modern disks larger than about 8GB, and where the BIOS is configured | | 193 | For modern disks larger than about 8GB, and where the BIOS is configured |
194 | to use LBA-Assisted translation, a setting of | | 194 | to use LBA-Assisted translation, a setting of |
195 | .Fl b Ar 1023/255/63 | | 195 | .Fl b Ar 1023/255/63 |
196 | is likely to work. | | 196 | is likely to work. |
197 | .\" see http://web.inter.nl.net/hcc/J.Steunebrink/bioslim.htm#LBA | | 197 | .\" see http://web.inter.nl.net/hcc/J.Steunebrink/bioslim.htm#LBA |
198 | .\" for a table of C/H/S values used in LBA-Assisted translation mode | | 198 | .\" for a table of C/H/S values used in LBA-Assisted translation mode |
199 | .It Fl c Ar bootcode | | 199 | .It Fl c Ar bootcode |
200 | Specify the filename that | | 200 | Specify the filename that |
201 | .Nm | | 201 | .Nm |
202 | should read the bootcode from. | | 202 | should read the bootcode from. |
203 | If the name of a directory is specified, then | | 203 | If the name of a directory is specified, then |
204 | .Nm | | 204 | .Nm |
205 | will look for files with the default names in that directory. | | 205 | will look for files with the default names in that directory. |
206 | The default is to read from | | 206 | The default is to read from |
207 | .Pa /usr/mdec/mbr , | | 207 | .Pa /usr/mdec/mbr , |
208 | .Pa /usr/mdec/mbr_bootsel | | 208 | .Pa /usr/mdec/mbr_bootsel |
209 | or | | 209 | or |
210 | .Pa /usr/mdec/mbr_ext | | 210 | .Pa /usr/mdec/mbr_ext |
211 | depending on whether | | 211 | depending on whether |
212 | .Ar bootmenu | | 212 | .Ar bootmenu |
213 | was specified for any partitions | | 213 | was specified for any partitions |
214 | on an i386 machine, and leave the bootcode empty for other | | 214 | on an i386 machine, and leave the bootcode empty for other |
215 | machines. | | 215 | machines. |
216 | .It Fl E Ar number | | 216 | .It Fl E Ar number |
217 | Specify logical partition | | 217 | Specify logical partition |
218 | .Ar number | | 218 | .Ar number |
219 | to be printed or updated. | | 219 | to be printed or updated. |
220 | If the specified logical partition does not exist on updating partition data | | 220 | If the specified logical partition does not exist on updating partition data |
221 | an additional logical partition will be created. | | 221 | an additional logical partition will be created. |
222 | .It Fl F | | 222 | .It Fl F |
223 | Indicate that | | 223 | Indicate that |
224 | .Ar device | | 224 | .Ar device |
225 | is a regular file. | | 225 | is a regular file. |
226 | Unless the geometry of | | 226 | Unless the geometry of |
227 | .Ar device | | 227 | .Ar device |
228 | is told to | | 228 | is told to |
229 | .Nm | | 229 | .Nm |
230 | by | | 230 | by |
231 | .Fl T Ar disktype , | | 231 | .Fl T Ar disktype , |
232 | .Nm | | 232 | .Nm |
233 | will count the 512-byte sectors in | | 233 | will count the 512-byte sectors in |
234 | .Ar device | | 234 | .Ar device |
235 | and produce a fake geometry. | | 235 | and produce a fake geometry. |
236 | If | | 236 | If |
237 | .Ar device | | 237 | .Ar device |
238 | is a regular file, | | 238 | is a regular file, |
239 | .Fl F | | 239 | .Fl F |
240 | will be used implicitly. | | 240 | will be used implicitly. |
241 | .It Fl f | | 241 | .It Fl f |
242 | Run | | 242 | Run |
243 | .Nm | | 243 | .Nm |
244 | in a non-interactive mode. | | 244 | in a non-interactive mode. |
245 | In this mode, you can only change the disk parameters by using the | | 245 | In this mode, you can only change the disk parameters by using the |
246 | .Fl b | | 246 | .Fl b |
247 | flag. | | 247 | flag. |
248 | This is provided only so scripts or other programs may use | | 248 | This is provided only so scripts or other programs may use |
249 | .Nm | | 249 | .Nm |
250 | as part of an automatic installation process. | | 250 | as part of an automatic installation process. |
251 | .Pp | | 251 | .Pp |
252 | Using the | | 252 | Using the |
253 | .Fl f | | 253 | .Fl f |
254 | flag with | | 254 | flag with |
255 | .Fl u | | 255 | .Fl u |
256 | makes it impossible to specify the starting and ending | | 256 | makes it impossible to specify the starting and ending |
257 | .Ar cylinder , | | 257 | .Ar cylinder , |
258 | .Ar head , | | 258 | .Ar head , |
259 | and | | 259 | and |
260 | .Ar sector | | 260 | .Ar sector |
261 | fields | | 261 | fields |
262 | .Pq only Ar start No and Ar size No can be specified by Fl s No option . | | 262 | .Pq only Ar start No and Ar size No can be specified by Fl s No option . |
263 | They will be automatically computed using the BIOS geometry. | | 263 | They will be automatically computed using the BIOS geometry. |
264 | .It Fl I | | 264 | .It Fl I |
265 | Ignore errors from overlapping partitions. | | 265 | Ignore errors from overlapping partitions. |
266 | Some devices (cameras CHDK) require overlapping partitions to support | | 266 | Some devices (cameras CHDK) require overlapping partitions to support |
267 | bigger than 4GB cards. | | 267 | bigger than 4GB cards. |
268 | The | | 268 | The |
269 | .Fl I | | 269 | .Fl I |
270 | flag ignores overlapping error checks and does not fix them, allowing these | | 270 | flag ignores overlapping error checks and does not fix them, allowing these |
271 | incorrect configurations to be used. | | 271 | incorrect configurations to be used. |
272 | .It Fl i | | 272 | .It Fl i |
273 | Explicitly request initialisation of the master boot code | | 273 | Explicitly request initialisation of the master boot code |
274 | (similar to what | | 274 | (similar to what |
275 | .Ic fdisk /mbr | | 275 | .Ic fdisk /mbr |
276 | does under | | 276 | does under |
277 | .Tn MS-DOS ) , | | 277 | .Tn MS-DOS ) , |
278 | even if the magic number in the first sector is ok. | | 278 | even if the magic number in the first sector is ok. |
279 | The partition table is left alone by this (but see above). | | 279 | The partition table is left alone by this (but see above). |
280 | .It Fl l | | 280 | .It Fl l |
281 | Lists known | | 281 | Lists known |
282 | .Em sysid | | 282 | .Em sysid |
283 | values and exit. | | 283 | values and exit. |
284 | .It Fl r Ar file | | 284 | .It Fl r Ar file |
285 | Read the boot record from file | | 285 | Read the boot record from file |
286 | .Ar file | | 286 | .Ar file |
287 | instead of the specified disk. | | 287 | instead of the specified disk. |
288 | The geometry information used is still that of the disk volume. | | 288 | The geometry information used is still that of the disk volume. |
289 | Any changes are written back to the file. | | 289 | Any changes are written back to the file. |
290 | .It Fl S | | 290 | .It Fl S |
291 | When used with no other flags print a series of | | 291 | When used with no other flags print a series of |
292 | .Pa /bin/sh | | 292 | .Pa /bin/sh |
293 | commands for setting variables to the partition information. | | 293 | commands for setting variables to the partition information. |
294 | This could be used by installation scripts. | | 294 | This could be used by installation scripts. |
295 | .It Fl s Oo Ar id Oc Ns Oo / Ns Oo Ar start Oc Ns Oo / Ns Oo Ar size Oc Ns Oo / Ns Oo Ar bootmenu Oc Oc Oc Oc | | 295 | .It Fl s Oo Ar id Oc Ns Oo / Ns Oo Ar start Oc Ns Oo / Ns Oo Ar size Oc Ns Oo / Ns Oo Ar bootmenu Oc Oc Oc Oc |
296 | Specify the partition | | 296 | Specify the partition |
297 | .Ar id , | | 297 | .Ar id , |
298 | .Ar start , | | 298 | .Ar start , |
299 | .Ar size , | | 299 | .Ar size , |
300 | and | | 300 | and |
301 | .Ar bootmenu . | | 301 | .Ar bootmenu . |
302 | If the optional arguments are not provided, they stay as before or | | 302 | If the optional arguments are not provided, they stay as before or |
303 | use the same defaults as the interactive mode, if new. | | 303 | use the same defaults as the interactive mode, if new. |
304 | This flag requires the use of a partition selection flag | | 304 | This flag requires the use of a partition selection flag |
305 | .Pq Fl 0 , 1 , 2 , 3 , No or Fl E Ar number . | | 305 | .Pq Fl 0 , 1 , 2 , 3 , No or Fl E Ar number . |
306 | .It Fl T Ar disktype | | 306 | .It Fl T Ar disktype |
307 | Use the disklabel | | 307 | Use the disklabel |
308 | .Ar disktype | | 308 | .Ar disktype |
309 | instead of the disklabel on | | 309 | instead of the disklabel on |
310 | .Ar device . | | 310 | .Ar device . |
311 | .It Fl t Ar disktab | | 311 | .It Fl t Ar disktab |
312 | Read | | 312 | Read |
313 | .Ar disktype | | 313 | .Ar disktype |
314 | from the named | | 314 | from the named |
315 | .Xr disktab 5 | | 315 | .Xr disktab 5 |
316 | file instead of from | | 316 | file instead of from |
317 | .Pa /etc/disktab . | | 317 | .Pa /etc/disktab . |
318 | .It Fl u | | 318 | .It Fl u |
319 | Update partition data, including | | 319 | Update partition data, including |
320 | .Em id , start , No and Em size . | | 320 | .Em id , start , No and Em size . |
321 | Unless | | 321 | Unless |
322 | .Fl f | | 322 | .Fl f |
323 | option | | 323 | option |
324 | .Pq non-interactive mode | | 324 | .Pq non-interactive mode |
325 | is specified, | | 325 | is specified, |
326 | .Nm | | 326 | .Nm |
327 | will display the partitions and interactively ask which one you want to edit. | | 327 | will display the partitions and interactively ask which one you want to edit. |
328 | .Nm | | 328 | .Nm |
329 | will step through each field showing the old value and asking for a new one. | | 329 | will step through each field showing the old value and asking for a new one. |
330 | The | | 330 | The |
331 | .Em start | | 331 | .Em start |
332 | and | | 332 | and |
333 | .Em size | | 333 | .Em size |
334 | can be specified in blocks (NN), | | 334 | can be specified in blocks (NN), |
335 | cylinders (NNc or NNcyl), | | 335 | cylinders (NNc or NNcyl), |
336 | megabytes (NNm or NNMB), | | 336 | megabytes (NNm or NNMB), |
337 | or gigabytes (NNg or NNGB), values in megabytes and gigabytes | | 337 | or gigabytes (NNg or NNGB), values in megabytes and gigabytes |
338 | will be rounded to the nearest cylinder boundary. | | 338 | will be rounded to the nearest cylinder boundary. |
339 | The | | 339 | The |
340 | .Em size | | 340 | .Em size |
341 | may be specified as | | 341 | may be specified as |
342 | .Em $ | | 342 | .Em $ |
343 | in which case the partition will extend to the end of the available free space. | | 343 | in which case the partition will extend to the end of the available free space. |
344 | .Pp | | 344 | .Pp |
345 | In a non-interactive mode | | 345 | In a non-interactive mode |
346 | .Pq specified by Fl f No option , | | 346 | .Pq specified by Fl f No option , |
347 | partition data should be specified by | | 347 | partition data should be specified by |
348 | .Fl s | | 348 | .Fl s |
349 | option. | | 349 | option. |
350 | A partition selection option | | 350 | A partition selection option |
351 | .Pq Fl 0 , 1 , 2 , 3 , No or Fl E Ar number | | 351 | .Pq Fl 0 , 1 , 2 , 3 , No or Fl E Ar number |
352 | should also be specified to select a partition slot to be updated. | | 352 | should also be specified to select a partition slot to be updated. |
353 | .Pp | | 353 | .Pp |
354 | .Nm | | 354 | .Nm |
355 | will not allow you to create partitions which overlap. | | 355 | will not allow you to create partitions which overlap. |
356 | If | | 356 | If |
357 | .Fl u | | 357 | .Fl u |
358 | and | | 358 | and |
359 | .Fl s | | 359 | .Fl s |
360 | are specified in a non-interactive mode | | 360 | are specified in a non-interactive mode |
361 | then the details of the specified partition will be changed. | | 361 | then the details of the specified partition will be changed. |
362 | Any other partitions which overlap the requested part of the disk will be | | 362 | Any other partitions which overlap the requested part of the disk will be |
363 | silently deleted. | | 363 | silently deleted. |
364 | .Pp | | 364 | .Pp |
365 | If | | 365 | If |
366 | .Em bootmenu | | 366 | .Em bootmenu |
367 | is specified for any partition | | 367 | is specified for any partition |
368 | .Nm | | 368 | .Nm |
369 | will determine whether the installed boot code supports the bootselect code, | | 369 | will determine whether the installed boot code supports the bootselect code, |
370 | if it does not you will be asked whether you want to install the required | | 370 | if it does not you will be asked whether you want to install the required |
371 | boot code. | | 371 | boot code. |
372 | To remove a | | 372 | To remove a |
373 | .Em bootmenu | | 373 | .Em bootmenu |
374 | label, simply press | | 374 | label, simply press |
375 | .Aq space | | 375 | .Aq space |
376 | followed by | | 376 | followed by |
377 | .Aq return . | | 377 | .Aq return . |
378 | .It Fl v | | 378 | .It Fl v |
379 | Be more verbose, specifying | | 379 | Be more verbose, specifying |
380 | .Fl v | | 380 | .Fl v |
381 | more than once may increase the amount of output. | | 381 | more than once may increase the amount of output. |
382 | .Pp | | 382 | .Pp |
383 | Using | | 383 | Using |
384 | .Fl v | | 384 | .Fl v |
385 | with | | 385 | with |
386 | .Fl u | | 386 | .Fl u |
387 | allows the user to change more parameters than normally permitted. | | 387 | allows the user to change more parameters than normally permitted. |
388 | .It Fl w Ar file | | 388 | .It Fl w Ar file |
389 | Write the modified partition table to file | | 389 | Write the modified partition table to file |
390 | .Ar file | | 390 | .Ar file |
391 | instead of the disk. | | 391 | instead of the disk. |
392 | .It Fl z Ar sectorsize | | 392 | .It Fl z Ar sectorsize |
393 | Specify a sector size other than 512, for devices that only | | 393 | Specify a sector size other than 512, for devices that only |
394 | support larger sector sizes. | | 394 | support larger sector sizes. |
395 | The sector size needs to be a power of two greater than 512. | | 395 | The sector size needs to be a power of two greater than 512. |
396 | .El | | 396 | .El |
397 | .Pp | | 397 | .Pp |
398 | When called with no arguments, it prints the partition table. | | 398 | When called with no arguments, it prints the partition table. |
399 | An example follows: | | 399 | An example follows: |
400 | .Bd -literal | | 400 | .Bd -literal |
401 | Disk: /dev/rwd0d | | 401 | Disk: /dev/rwd0d |
402 | NetBSD disklabel disk geometry: | | 402 | NetBSD disklabel disk geometry: |
403 | cylinders: 16383, heads: 16, sectors/track: 63 (1008 sectors/cylinder) | | 403 | cylinders: 16383, heads: 16, sectors/track: 63 (1008 sectors/cylinder) |
404 | total sectors: 40032696 | | 404 | total sectors: 40032696 |
405 | | | 405 | |
406 | BIOS disk geometry: | | 406 | BIOS disk geometry: |
407 | cylinders: 1023, heads: 255, sectors/track: 63 (16065 sectors/cylinder) | | 407 | cylinders: 1023, heads: 255, sectors/track: 63 (16065 sectors/cylinder) |
408 | total sectors: 40032696 | | 408 | total sectors: 40032696 |
409 | | | 409 | |
410 | Partition table: | | 410 | Partition table: |
411 | 0: NetBSD (sysid 169) | | 411 | 0: NetBSD (sysid 169) |
412 | bootmenu: net 1.5. | | 412 | bootmenu: net 1.5. |
413 | start 4209030, size 8289540 (4048 MB, Cyls 262-778), Active | | 413 | start 4209030, size 8289540 (4048 MB, Cyls 262-778), Active |
414 | 1: Primary DOS with 32 bit FAT (sysid 11) | | 414 | 1: Primary DOS with 32 bit FAT (sysid 11) |
415 | bootmenu: win98 | | 415 | bootmenu: win98 |
416 | start 63, size 4208967 (2055 MB, Cyls 0-262) | | 416 | start 63, size 4208967 (2055 MB, Cyls 0-262) |
417 | 2: NetBSD (sysid 169) | | 417 | 2: NetBSD (sysid 169) |
418 | bootmenu: current | | 418 | bootmenu: current |
419 | start 32515560, size 7517136 (3670 MB, Cyls 2024-2491/234/40) | | 419 | start 32515560, size 7517136 (3670 MB, Cyls 2024-2491/234/40) |
420 | 3: Ext. partition - LBA (sysid 15) | | 420 | 3: Ext. partition - LBA (sysid 15) |
421 | start 12498570, size 20016990 (9774 MB, Cyls 778-2024) | | 421 | start 12498570, size 20016990 (9774 MB, Cyls 778-2024) |
422 | Extended partition table: | | 422 | Extended partition table: |
423 | E0: NetBSD (sysid 169) | | 423 | E0: NetBSD (sysid 169) |
424 | bootmenu: test | | 424 | bootmenu: test |
425 | start 12498633, size 12305727 (6009 MB, Cyls 778-1544) | | 425 | start 12498633, size 12305727 (6009 MB, Cyls 778-1544) |
426 | E1: Primary DOS with 32 bit FAT (sysid 11) | | 426 | E1: Primary DOS with 32 bit FAT (sysid 11) |
427 | start 24804423, size 4096512 (2000 MB, Cyls 1544-1799) | | 427 | start 24804423, size 4096512 (2000 MB, Cyls 1544-1799) |
428 | E2: Primary DOS with 32 bit FAT (sysid 11) | | 428 | E2: Primary DOS with 32 bit FAT (sysid 11) |
429 | start 28900998, size 3614562 (1765 MB, Cyls 1799-2024) | | 429 | start 28900998, size 3614562 (1765 MB, Cyls 1799-2024) |
430 | Bootselector enabled, infinite timeout. | | 430 | Bootselector enabled, infinite timeout. |
431 | First active partition: 0 | | 431 | First active partition: 0 |
432 | .Ed | | 432 | .Ed |
433 | .Pp | | 433 | .Pp |
434 | This example disk is divided into four partitions, the last of which is | | 434 | This example disk is divided into four partitions, the last of which is |
435 | an extended partition. | | 435 | an extended partition. |
436 | The logical partitions of the extended partition are also shown. | | 436 | The logical partitions of the extended partition are also shown. |
437 | In this case there is no free space in either the disk or in the extended | | 437 | In this case there is no free space in either the disk or in the extended |
438 | partition. | | 438 | partition. |
439 | .Pp | | 439 | .Pp |
440 | The various fields in each partition entry are: | | 440 | The various fields in each partition entry are: |
441 | .Bd -filled -offset 4n -compact | | 441 | .Bd -filled -offset 4n -compact |
442 | .Em ptn_number : id_name | | 442 | .Em ptn_number : id_name |
443 | (sysid | | 443 | (sysid |
444 | .Em id_number ) | | 444 | .Em id_number ) |
445 | .Ed | | 445 | .Ed |
446 | .Bd -filled -offset 8n -compact | | 446 | .Bd -filled -offset 8n -compact |
447 | bootmenu: | | 447 | bootmenu: |
448 | .Em bootmenu | | 448 | .Em bootmenu |
449 | .br | | 449 | .br |
450 | start | | 450 | start |
451 | .Em start , | | 451 | .Em start , |
452 | size | | 452 | size |
453 | .Em size ( MB | | 453 | .Em size ( MB |
454 | MB, Cyls | | 454 | MB, Cyls |
455 | .Em first Ns No - Ns Em next ) | | 455 | .Em first Ns No - Ns Em next ) |
456 | .Op , Active | | 456 | .Op , Active |
457 | .Ed | | 457 | .Ed |
458 | .Bl -tag -width "bootmenu" | | 458 | .Bl -tag -width "bootmenu" |
459 | .It Em ptn_number | | 459 | .It Em ptn_number |
460 | is the number of the partition. | | 460 | is the number of the partition. |
461 | .It Em id_name | | 461 | .It Em id_name |
462 | is the name of the filesystem type or operating system that uses this partition. | | 462 | is the name of the filesystem type or operating system that uses this partition. |
463 | .It Em id_number | | 463 | .It Em id_number |
464 | is the number that identifies the partition type. | | 464 | is the number that identifies the partition type. |
465 | 169 decimal is used for | | 465 | 169 decimal is used for |
466 | .Nx | | 466 | .Nx |
467 | partitions, | | 467 | partitions, |
468 | 15 decimal to create an extended partition | | 468 | 15 decimal to create an extended partition |
469 | and 0 to mark a partition as unused. | | 469 | and 0 to mark a partition as unused. |
470 | Use | | 470 | Use |
471 | .Nm | | 471 | .Nm |
472 | .Fl l | | 472 | .Fl l |
473 | to list the known partition types. | | 473 | to list the known partition types. |
474 | .It Em bootmenu | | 474 | .It Em bootmenu |
475 | is the menu prompt output by the interactive boot code for this partition. | | 475 | is the menu prompt output by the interactive boot code for this partition. |
476 | This line is omitted if the prompt is not defined. | | 476 | This line is omitted if the prompt is not defined. |
477 | .It Em start , Em size | | 477 | .It Em start , Em size |
478 | are the start address and size of the partition in sectors. | | 478 | are the start address and size of the partition in sectors. |
479 | .It Em MB | | 479 | .It Em MB |
480 | is the size of the partition in megabytes. | | 480 | is the size of the partition in megabytes. |
481 | .It Em first , Em next | | 481 | .It Em first , Em next |
482 | are the bounds of this partition displayed as cylinder/head/sector. | | 482 | are the bounds of this partition displayed as cylinder/head/sector. |
483 | If the partition starts (or ends) on a cylinder boundary the head and | | 483 | If the partition starts (or ends) on a cylinder boundary the head and |
484 | sector values are omitted. | | 484 | sector values are omitted. |
485 | If | | 485 | If |
486 | .Fl v | | 486 | .Fl v |
487 | is not specified the start of logical partitions and the first partition | | 487 | is not specified the start of logical partitions and the first partition |
488 | on the disk are rounded down to include the mandatory red tape in the | | 488 | on the disk are rounded down to include the mandatory red tape in the |
489 | preceding track. | | 489 | preceding track. |
490 | .It Active | | 490 | .It Active |
491 | is output if this is the active partition. | | 491 | is output if this is the active partition. |
492 | .El | | 492 | .El |
493 | .Pp | | 493 | .Pp |
494 | If the | | 494 | If the |
495 | .Fl v | | 495 | .Fl v |
496 | flag is specified, the beginning and end of each partition are also | | 496 | flag is specified, the beginning and end of each partition are also |
497 | displayed as follows: | | 497 | displayed as follows: |
498 | .Bd -filled -offset 4n -compact | | 498 | .Bd -filled -offset 4n -compact |
499 | beg: cylinder | | 499 | beg: cylinder |
500 | .Em cylinder , | | 500 | .Em cylinder , |
501 | head | | 501 | head |
502 | .Em head , | | 502 | .Em head , |
503 | sector | | 503 | sector |
504 | .Em sector | | 504 | .Em sector |
505 | .br | | 505 | .br |
506 | end: cylinder | | 506 | end: cylinder |
507 | .Em cylinder , | | 507 | .Em cylinder , |
508 | head | | 508 | head |
509 | .Em head , | | 509 | .Em head , |
510 | sector | | 510 | sector |
511 | .Em sector | | 511 | .Em sector |
512 | .Ed | | 512 | .Ed |
513 | .Bl -tag -width "bootmenu" | | 513 | .Bl -tag -width "bootmenu" |
514 | .It Em "cylinder" , Em "head" , Em "sector" | | 514 | .It Em "cylinder" , Em "head" , Em "sector" |
515 | are the beginning or ending address of a partition. | | 515 | are the beginning or ending address of a partition. |
516 | .Pp | | 516 | .Pp |
517 | .Em "Note:" | | 517 | .Em "Note:" |
518 | these numbers are read from the bootblock, so are the values calculated | | 518 | these numbers are read from the bootblock, so are the values calculated |
519 | by a previous run of | | 519 | by a previous run of |
520 | .Nm . | | 520 | .Nm . |
521 | .El | | 521 | .El |
522 | .Pp | | 522 | .Pp |
523 | .Nm | | 523 | .Nm |
524 | attempts to check whether each partition is bootable, | | 524 | attempts to check whether each partition is bootable, |
525 | by checking the magic number and some other characteristics | | 525 | by checking the magic number and some other characteristics |
526 | of the first sector of each partition (the PBR). | | 526 | of the first sector of each partition (the PBR). |
527 | If the partition does not appear to be bootable, | | 527 | If the partition does not appear to be bootable, |
528 | .Nm | | 528 | .Nm |
529 | will print a line containing | | 529 | will print a line containing |
530 | .Dq "PBR is not bootable" | | 530 | .Dq "PBR is not bootable" |
531 | followed by an error message. | | 531 | followed by an error message. |
532 | If the partition is bootable, and if the | | 532 | If the partition is bootable, and if the |
533 | .Fl v | | 533 | .Fl v |
534 | flag is specified, | | 534 | flag is specified, |
535 | .Nm | | 535 | .Nm |
536 | will print | | 536 | will print |
537 | .Dq "PBR appears to be bootable" . | | 537 | .Dq "PBR appears to be bootable" . |
538 | If the | | 538 | If the |
539 | .Fl v | | 539 | .Fl v |
540 | flag is specified more than once, | | 540 | flag is specified more than once, |
541 | .Nm | | 541 | .Nm |
542 | will print the heading | | 542 | will print the heading |
543 | .Dq "Information from PBR:" | | 543 | .Dq "Information from PBR:" |
544 | followed by one or more lines of information gleaned from the PBR; | | 544 | followed by one or more lines of information gleaned from the PBR; |
545 | this additional information may be incorrect or misleading, | | 545 | this additional information may be incorrect or misleading, |
546 | because different operating systems use different PBR formats. | | 546 | because different operating systems use different PBR formats. |
547 | Note that, even if no errors are reported, an attempt to boot | | 547 | Note that, even if no errors are reported, an attempt to boot |
548 | from the partition might fail. | | 548 | from the partition might fail. |
549 | .Nx | | 549 | .Nx |
550 | partitions may be made bootable using | | 550 | partitions may be made bootable using |
551 | .Xr installboot 8 . | | 551 | .Xr installboot 8 . |
552 | .Sh NOTES | | 552 | .Sh NOTES |
553 | This program is only available (and useful) on systems with PC-platform-style | | 553 | This program is only available (and useful) on systems with PC-platform-style |
554 | MBR partitioning. | | 554 | MBR partitioning. |
555 | .Pp | | 555 | .Pp |
556 | Traditionally the partition boundaries should be on cylinder boundaries | | 556 | Traditionally the partition boundaries should be on cylinder boundaries |
557 | using the BIOS geometry, with the exception of the first partition, | | 557 | using the BIOS geometry, with the exception of the first partition, |
558 | which traditionally begins in the second track of the first cylinder | | 558 | which traditionally begins in the second track of the first cylinder |
559 | (cylinder 0, head 1, sector 1). | | 559 | (cylinder 0, head 1, sector 1). |
560 | Although the BIOS geometry is typically different from the geometry | | 560 | Although the BIOS geometry is typically different from the geometry |
561 | reported by the drive, neither will match the actual physical geometry | | 561 | reported by the drive, neither will match the actual physical geometry |
562 | for modern disks (the actual geometry will vary across the disk). | | 562 | for modern disks (the actual geometry will vary across the disk). |
563 | Keeping the partition boundaries on cylinder boundaries makes partitioning | | 563 | Keeping the partition boundaries on cylinder boundaries makes partitioning |
564 | a driver easier as only relatively small numbers need be entered. | | 564 | a driver easier as only relatively small numbers need be entered. |
565 | .Pp | | 565 | .Pp |
566 | The automatic calculation of the starting cylinder and | | 566 | The automatic calculation of the starting cylinder and |
567 | other parameters uses | | 567 | other parameters uses |
568 | a set of figures that represent what the BIOS thinks is the | | 568 | a set of figures that represent what the BIOS thinks is the |
569 | geometry of the drive. | | 569 | geometry of the drive. |
570 | The default values should be correct for the system on which | | 570 | The default values should be correct for the system on which |
571 | .Nm | | 571 | .Nm |
572 | is run; however, if you move the disk to a different system, the | | 572 | is run; however, if you move the disk to a different system, the |
573 | BIOS of that system might use a different geometry translation. | | 573 | BIOS of that system might use a different geometry translation. |
574 | .Pp | | 574 | .Pp |
575 | If you run the equivalent of | | 575 | If you run the equivalent of |
576 | .Nm | | 576 | .Nm |
577 | on a different operating system then the | | 577 | on a different operating system then the |
578 | .Ar bootmenu | | 578 | .Ar bootmenu |
579 | strings associated with extended partitions may be lost. | | 579 | strings associated with extended partitions may be lost. |
580 | .Pp | | 580 | .Pp |
581 | Editing an existing partition is risky, and may cause you to | | 581 | Editing an existing partition is risky, and may cause you to |
582 | lose all the data in that partition. | | 582 | lose all the data in that partition. |
583 | .Pp | | 583 | .Pp |
584 | You should run this program interactively once or twice to see how it works. | | 584 | You should run this program interactively once or twice to see how it works. |
585 | This is completely safe as long as you answer the last question in the negative. | | 585 | This is completely safe as long as you answer the last question in the negative. |
586 | You can also specify | | 586 | You can also specify |
587 | .Fl w Ar file | | 587 | .Fl w Ar file |
588 | to write the output to a file and later specify | | 588 | to write the output to a file and later specify |
589 | .Fl r Ar file | | 589 | .Fl r Ar file |
590 | to read back the updated information. | | 590 | to read back the updated information. |
591 | This can be done without having write access to the disk volume. | | 591 | This can be done without having write access to the disk volume. |
592 | .Sh FILES | | 592 | .Sh FILES |
593 | .Bl -tag -width /usr/mdec/mbrxxxxxxxx -compact | | 593 | .Bl -tag -width /usr/mdec/mbrxxxxxxxx -compact |
594 | .It Pa /usr/mdec/mbr | | 594 | .It Pa /usr/mdec/mbr |
595 | Default location of i386 bootcode | | 595 | Default location of i386 bootcode |
596 | .It Pa /usr/mdec/mbr_bootsel | | 596 | .It Pa /usr/mdec/mbr_bootsel |
597 | Default location of i386 bootselect code | | 597 | Default location of i386 bootselect code |
598 | .It Pa /usr/mdec/mbr_ext | | 598 | .It Pa /usr/mdec/mbr_ext |
599 | Default location of i386 bootselect for extended partitions (i.e., NetBSD on | | 599 | Default location of i386 bootselect for extended partitions (i.e., NetBSD on |
600 | logical partitions) | | 600 | logical partitions) |
601 | .El | | 601 | .El |
602 | .Sh EXAMPLES | | 602 | .Sh EXAMPLES |
603 | Update MBR partition data of | | 603 | Update MBR partition data of |
604 | .Pa /dev/rwd0d | | 604 | .Pa /dev/rwd0d |
605 | in interactive mode: | | 605 | in interactive mode: |
606 | .Pp | | 606 | .Pp |
607 | .Dl Ic fdisk -u /dev/rwd0d | | 607 | .Dl Ic fdisk -u /dev/rwd0d |
608 | .Pp | | 608 | .Pp |
609 | Change active MBR partition of | | 609 | Change active MBR partition of |
610 | .Pa /dev/rwd0d | | 610 | .Pa /dev/rwd0d |
611 | in interactive mode: | | 611 | in interactive mode: |
612 | .Pp | | 612 | .Pp |
613 | .Dl Ic fdisk -a /dev/rwd0d | | 613 | .Dl Ic fdisk -a /dev/rwd0d |
614 | .Pp | | 614 | .Pp |
615 | Install MBR bootcode | | 615 | Install MBR bootcode |
616 | .Pa /usr/mdec/mbr_bootsel | | 616 | .Pa /usr/mdec/mbr_bootsel |
617 | into | | 617 | into |
618 | .Pa /dev/rwd0d : | | 618 | .Pa /dev/rwd0d : |
619 | .Pp | | 619 | .Pp |
620 | .Dl Ic fdisk -c /usr/mdec/mbr_bootsel /dev/rwd0d | | 620 | .Dl Ic fdisk -c /usr/mdec/mbr_bootsel /dev/rwd0d |
621 | .Pp | | 621 | .Pp |
622 | Set MBR partition data for slot 0 of | | 622 | Set MBR partition data for slot 0 of |
623 | .Pa /dev/rwd0d | | 623 | .Pa /dev/rwd0d |
624 | specifying values without prompt: | | 624 | specifying values without prompt: |
625 | .Pp | | 625 | .Pp |
626 | .Dl Ic fdisk -f -u -0 -s 169/63/2097089 /dev/rwd0d | | 626 | .Dl Ic fdisk -f -u -0 -s 169/63/2097089 /dev/rwd0d |
627 | .Pp | | 627 | .Pp |
628 | Make partition slot 0 of | | 628 | Make partition slot 0 of |
629 | .Pa /dev/rwd0d | | 629 | .Pa /dev/rwd0d |
630 | active without prompt: | | 630 | active without prompt: |
631 | .Pp | | 631 | .Pp |
632 | .Dl Ic fdisk -f -a -0 /dev/rwd0d | | 632 | .Dl Ic fdisk -f -a -0 /dev/rwd0d |
633 | .Pp | | 633 | .Pp |
634 | Initialize and create MBR partition data using bootcode | | 634 | Initialize and create MBR partition data using bootcode |
635 | .Pa destdir/usr/mdec/mbr | | 635 | .Pa destdir/usr/mdec/mbr |
636 | without prompt against 1GB disk image file | | 636 | without prompt against 1GB disk image file |
637 | .Pa diskimg : | | 637 | .Pa diskimg : |
638 | .Pp | | 638 | .Pp |
639 | .Dl Ic fdisk -f -i -b 130/255/63 -c destdir/usr/mdec/mbr -F diskimg | | 639 | .Dl Ic fdisk -f -i -b 130/255/63 -c destdir/usr/mdec/mbr -F diskimg |
640 | .Pp | | 640 | .Pp |
641 | Create MBR partition data for slot 0 which has an active | | 641 | Create MBR partition data for slot 0 which has an active |
642 | .Nx | | 642 | .Nx |
643 | partition using whole disk without prompt against 1GB disk image file | | 643 | partition using whole disk without prompt against 1GB disk image file |
644 | .Pa diskimg : | | 644 | .Pa diskimg : |
645 | .Pp | | 645 | .Pp |
646 | .Dl Ic fdisk -f -a -u -0 -s 169/63/2097089 -F diskimg | | 646 | .Dl Ic fdisk -f -a -u -0 -s 169/63/2097089 -F diskimg |
647 | .Sh SEE ALSO | | 647 | .Sh SEE ALSO |
648 | .Xr disktab 5 , | | 648 | .Xr disktab 5 , |
649 | .Xr boot 8 , | | 649 | .Xr boot 8 , |
650 | .Xr disklabel 8 , | | 650 | .Xr disklabel 8 , |
651 | .Xr gpt 8 , | | 651 | .Xr gpt 8 , |
652 | .Xr installboot 8 , | | 652 | .Xr installboot 8 , |
653 | .Xr mbr 8 , | | 653 | .Xr mbr 8 , |
654 | .Xr mbrlabel 8 | | 654 | .Xr mbrlabel 8 |
655 | .Sh HISTORY | | 655 | .Sh HISTORY |
656 | A version of | | 656 | A version of |
657 | .Nm | | 657 | .Nm |
658 | first appeared in the Mach Operating System. | | 658 | first appeared in the Mach Operating System. |
659 | It was subsequently ported to | | 659 | It was subsequently ported to |
660 | .Bx 386 . | | 660 | .Bx 386 . |
661 | .Sh AUTHORS | | 661 | .Sh AUTHORS |
662 | .An -nosplit | | 662 | .An -nosplit |
663 | .Nm | | 663 | .Nm |
664 | for Mach Operating System was written by | | 664 | for Mach Operating System was written by |
665 | .An Robert Baron Aq Mt rvb@cs.cmu.edu . | | 665 | .An Robert Baron Aq Mt rvb@cs.cmu.edu . |
666 | It was ported to | | 666 | It was ported to |
667 | .Bx 386 | | 667 | .Bx 386 |
668 | by | | 668 | by |
669 | .An Julian Elischer Aq Mt julian@tfs.com . | | 669 | .An Julian Elischer Aq Mt julian@tfs.com . |
670 | .Sh BUGS | | 670 | .Sh BUGS |
671 | The word | | 671 | The word |
672 | .Sq partition | | 672 | .Sq partition |
673 | is used to mean both an MBR partition and a | | 673 | is used to mean both an MBR partition and a |
674 | .Nx | | 674 | .Nx |
675 | partition, sometimes in the same sentence. | | 675 | partition, sometimes in the same sentence. |
676 | .Pp | | 676 | .Pp |
677 | There are subtleties that the program detects that are not explained in | | 677 | There are subtleties that the program detects that are not explained in |
678 | this manual page. | | 678 | this manual page. |