|
Lines 131-140
Link Here
|
| 131 |
.Ql ad0 , |
131 |
.Ql ad0 , |
| 132 |
and |
132 |
and |
| 133 |
.Ql da0 |
133 |
.Ql da0 |
| 134 |
are being searched in that order, until one is |
134 |
are searched in that order, until one is found to respond. |
| 135 |
being found responding. |
|
|
| 136 |
.Pp |
135 |
.Pp |
| 137 |
When called with no arguments, it prints the sector 0 partition table. |
136 |
When called with no options, |
|
|
137 |
.Nm |
| 138 |
prints the sector 0 partition table. |
| 138 |
An example follows: |
139 |
An example follows: |
| 139 |
.Bd -literal |
140 |
.Bd -literal |
| 140 |
******* Working on device /dev/ad0 ******* |
141 |
******* Working on device /dev/ad0 ******* |
|
Lines 180-215
Link Here
|
| 180 |
.It Em "flag 80" |
181 |
.It Em "flag 80" |
| 181 |
specifies that this is the active partition. |
182 |
specifies that this is the active partition. |
| 182 |
.It Em cyl , sector No and Em head |
183 |
.It Em cyl , sector No and Em head |
| 183 |
fields are used to specify the beginning address |
184 |
fields are used to specify the beginning and end addresses of the partition. |
| 184 |
and end address for the partition. |
|
|
| 185 |
.It Em Note : |
185 |
.It Em Note : |
| 186 |
these numbers are calculated using BIOS's understanding of the disk geometry |
186 |
these numbers are calculated using BIOS's understanding of the disk geometry |
| 187 |
and saved in the bootblock. |
187 |
and saved in the bootblock. |
| 188 |
.El |
188 |
.El |
| 189 |
.Pp |
189 |
.Pp |
| 190 |
The flags |
190 |
The |
| 191 |
.Fl i |
191 |
.Fl i |
| 192 |
or |
192 |
and |
| 193 |
.Fl u |
193 |
.Fl u |
| 194 |
are used to indicate that the partition data is to be updated, unless the |
194 |
flags are used to indicate that the partition data is to be updated. |
| 195 |
.Fl f |
195 |
Unless the |
| 196 |
option is used. If the |
|
|
| 197 |
.Fl f |
196 |
.Fl f |
| 198 |
option is not used, the |
197 |
option is also given, |
| 199 |
.Nm |
198 |
.Nm |
| 200 |
program will enter a conversational mode. |
199 |
will enter a conversational mode. |
| 201 |
This mode is designed not to change any data unless you explicitly tell it to. |
200 |
In this mode, no changes will be written to disk unless you explicitly tell |
| 202 |
.Nm Fdisk |
201 |
.Nm |
| 203 |
selects defaults for its questions to guarantee the above behavior. |
202 |
to. |
| 204 |
.Pp |
203 |
.Pp |
| 205 |
It displays each partition |
204 |
.Nm Fdisk |
| 206 |
and ask if you want to edit it. |
205 |
will display each partition and ask whether you want to edit it. |
| 207 |
If you say yes, |
206 |
If you say yes, |
| 208 |
it will step through each field showing the old value |
|
|
| 209 |
and asking for a new one. |
| 210 |
When you are done with a partition, |
| 211 |
.Nm |
207 |
.Nm |
| 212 |
will display it and ask if it is correct. |
208 |
will step through each field, show you the old value, |
|
|
209 |
and ask you for a new one. |
| 210 |
When you are done with the partition, |
| 211 |
.Nm |
| 212 |
will display it and ask you whether it is correct. |
| 213 |
.Nm Fdisk |
213 |
.Nm Fdisk |
| 214 |
will then proceed to the next entry. |
214 |
will then proceed to the next entry. |
| 215 |
.Pp |
215 |
.Pp |
|
Lines 217-246
Link Here
|
| 217 |
.Em cyl , sector , |
217 |
.Em cyl , sector , |
| 218 |
and |
218 |
and |
| 219 |
.Em head |
219 |
.Em head |
| 220 |
fields correct is tricky. |
220 |
fields correct is tricky, so by default, |
| 221 |
So by default, |
|
|
| 222 |
they will be calculated for you; |
221 |
they will be calculated for you; |
| 223 |
you can specify them if you choose. |
222 |
you can specify them if you choose to though. |
| 224 |
.Pp |
223 |
.Pp |
| 225 |
After all the partitions are processed, |
224 |
After all the partitions are processed, |
| 226 |
you are given the option to change the |
225 |
you are given the option to change the |
| 227 |
.Em active |
226 |
.Em active |
| 228 |
partition. |
227 |
partition. |
| 229 |
Finally, |
228 |
Finally, when all the new data for sector 0 has been accumulated, |
| 230 |
when the all the data for the first sector has been accumulated, |
229 |
you are asked to confirm whether you really want to rewrite it. |
| 231 |
you are asked if you really want to rewrite sector 0. |
|
|
| 232 |
Only if you answer yes, |
| 233 |
will the data be written to disk. |
| 234 |
.Pp |
230 |
.Pp |
| 235 |
The difference between the |
231 |
The difference between the |
| 236 |
.Fl u |
232 |
.Fl u |
| 237 |
flag and |
233 |
and |
| 238 |
.Fl i |
234 |
.Fl i |
| 239 |
flag is that |
235 |
flags is that |
| 240 |
the |
236 |
the |
| 241 |
.Fl u |
237 |
.Fl u |
| 242 |
flag just edits the fields as they appear on the disk. |
238 |
flag just edits (updates) the fields as they appear on the disk, |
| 243 |
While the |
239 |
while the |
| 244 |
.Fl i |
240 |
.Fl i |
| 245 |
flag is used to "initialize" sector 0; |
241 |
flag is used to "initialize" sector 0; |
| 246 |
it will setup the last BIOS partition to use the whole disk for |
242 |
it will setup the last BIOS partition to use the whole disk for |
|
Lines 248-258
Link Here
|
| 248 |
and make it active. |
244 |
and make it active. |
| 249 |
.Sh NOTES |
245 |
.Sh NOTES |
| 250 |
The automatic calculation of starting cylinder etc. uses |
246 |
The automatic calculation of starting cylinder etc. uses |
| 251 |
a set of figures that represent what the BIOS thinks is the |
247 |
a set of figures that represent what the BIOS thinks the |
| 252 |
geometry of the drive. |
248 |
geometry of the drive is. |
| 253 |
These figures are by default taken from the incore disklabel, |
249 |
These figures are taken from the in-core disklabel by default, |
| 254 |
but the program initially gives you an opportunity to change them. |
250 |
but |
| 255 |
This allows the user to create a bootblock that can work with drives |
251 |
.Nm |
|
|
252 |
initially gives you an opportunity to change them. |
| 253 |
This allows you to create a bootblock that can work with drives |
| 256 |
that use geometry translation under the BIOS. |
254 |
that use geometry translation under the BIOS. |
| 257 |
.Pp |
255 |
.Pp |
| 258 |
If you hand craft your disk layout, |
256 |
If you hand craft your disk layout, |
|
Lines 262-282
Link Here
|
| 262 |
A number of decisions made later may assume this. |
260 |
A number of decisions made later may assume this. |
| 263 |
(This might not be necessary later.) |
261 |
(This might not be necessary later.) |
| 264 |
.Pp |
262 |
.Pp |
| 265 |
Editing an existing partition will most likely cause you to |
263 |
Editing an existing partition will most likely result in the loss of |
| 266 |
lose all the data in that partition. |
264 |
all data in that partition. |
| 267 |
.Pp |
265 |
.Pp |
| 268 |
You should run this program interactively once or twice to see how it |
266 |
You should run |
| 269 |
works. This is completely safe as long as you answer the last question |
267 |
.Nm |
| 270 |
in the negative. There are subtleties that the program detects that are |
268 |
interactively once or twice to see how it works. |
| 271 |
not fully explained in this manual page. |
269 |
This is completely safe as long as you answer the last question |
|
|
270 |
in the negative. There are subtleties that |
| 271 |
.Nm |
| 272 |
detects that are not fully explained in this manual page. |
| 272 |
.Sh CONFIGURATION FILE |
273 |
.Sh CONFIGURATION FILE |
| 273 |
When the |
274 |
When the |
| 274 |
.Fl f |
275 |
.Fl f |
| 275 |
option is given, a disk's partition table can be written using values |
276 |
option is given, a disk's partition table can be written using values |
| 276 |
from a |
277 |
from a |
| 277 |
.Ar configfile . |
278 |
.Ar configfile . |
| 278 |
The syntax of this file is very simple. Each line is either a comment or |
279 |
The syntax of this file is very simple; |
| 279 |
a specification, and whitespace (except for newlines) are ignored: |
280 |
each line is either a comment or a specification, as follows: |
| 280 |
.Bl -tag -width Ds |
281 |
.Bl -tag -width Ds |
| 281 |
.It Xo |
282 |
.It Xo |
| 282 |
.Ic # |
283 |
.Ic # |
|
Lines 323-329
Link Here
|
| 323 |
.Ed |
324 |
.Ed |
| 324 |
.Pp |
325 |
.Pp |
| 325 |
The number of cylinders should be less than or equal to 1024, but this |
326 |
The number of cylinders should be less than or equal to 1024, but this |
| 326 |
is not enforced, although a warning will be output. Note that bootable |
327 |
is not enforced, although a warning will be printed. Note that bootable |
| 327 |
.Fx |
328 |
.Fx |
| 328 |
partitions (the "/" filesystem) must lie completely within the |
329 |
partitions (the "/" filesystem) must lie completely within the |
| 329 |
first 1024 cylinders; if this is not true, booting may fail. |
330 |
first 1024 cylinders; if this is not true, booting may fail. |