fdisk.8 (68575) | fdisk.8 (68716) |
---|---|
1.\" $FreeBSD: head/sbin/fdisk/fdisk.8 68575 2000-11-10 17:46:15Z ru $ | 1.\" $FreeBSD: head/sbin/fdisk/fdisk.8 68716 2000-11-14 11:20:58Z ru $ |
2.\" 3.Dd October 4, 1996 4.Dt FDISK 8 5.\".Os BSD 4 6.Sh NAME 7.Nm fdisk 8.Nd PC partition table maintenance program 9.Sh SYNOPSIS --- 25 unchanged lines hidden (view full) --- 35you can have one or more partitions with one 36.Em active . 37The DOS 38.Nm 39program can be used to divide space on the disk into partitions and set one 40.Em active . 41.Sh DESCRIPTION 42The | 2.\" 3.Dd October 4, 1996 4.Dt FDISK 8 5.\".Os BSD 4 6.Sh NAME 7.Nm fdisk 8.Nd PC partition table maintenance program 9.Sh SYNOPSIS --- 25 unchanged lines hidden (view full) --- 35you can have one or more partitions with one 36.Em active . 37The DOS 38.Nm 39program can be used to divide space on the disk into partitions and set one 40.Em active . 41.Sh DESCRIPTION 42The |
43.Bx Free | 43.Fx |
44program 45.Nm 46serves a similar purpose to the DOS program. The first form is used to 47display partition information or to interactively edit the partition 48table. The second is used to write a partition table using a 49.Ar configfile 50and is designed to be used by other scripts/programs. 51.Pp --- 114 unchanged lines hidden (view full) --- 166.Ed 167.Pp 168The disk is divided into three partitions that happen to fill the disk. 169The second partition overlaps the end of the first. 170(Used for debugging purposes) 171.Bl -tag -width "cyl, sector and head" 172.It Em "sysid" 173is used to label the partition. | 44program 45.Nm 46serves a similar purpose to the DOS program. The first form is used to 47display partition information or to interactively edit the partition 48table. The second is used to write a partition table using a 49.Ar configfile 50and is designed to be used by other scripts/programs. 51.Pp --- 114 unchanged lines hidden (view full) --- 166.Ed 167.Pp 168The disk is divided into three partitions that happen to fill the disk. 169The second partition overlaps the end of the first. 170(Used for debugging purposes) 171.Bl -tag -width "cyl, sector and head" 172.It Em "sysid" 173is used to label the partition. |
174.Bx Free | 174.Fx |
175reserves the 176magic number 165 decimal (A5 in hex). 177.It Em "start and size" 178fields provide the start address 179and size of a partition in sectors. 180.It Em "flag 80" 181specifies that this is the active partition. 182.It Em "cyl, sector and head" --- 56 unchanged lines hidden (view full) --- 239flag is that 240the 241.Fl u 242flag just edits the fields as they appear on the disk. 243While the 244.Fl i 245flag is used to "initialize" sector 0; 246it will setup the last BIOS partition to use the whole disk for | 175reserves the 176magic number 165 decimal (A5 in hex). 177.It Em "start and size" 178fields provide the start address 179and size of a partition in sectors. 180.It Em "flag 80" 181specifies that this is the active partition. 182.It Em "cyl, sector and head" --- 56 unchanged lines hidden (view full) --- 239flag is that 240the 241.Fl u 242flag just edits the fields as they appear on the disk. 243While the 244.Fl i 245flag is used to "initialize" sector 0; 246it will setup the last BIOS partition to use the whole disk for |
247.Bx Free ; | 247.Fx ; |
248and make it active. 249.Sh NOTES 250The automatic calculation of starting cylinder etc. uses 251a set of figures that represent what the BIOS thinks is the 252geometry of the drive. 253These figures are by default taken from the incore disklabel, 254but the program initially gives you an opportunity to change them. 255This allows the user to create a bootblock that can work with drives 256that use geometry translation under the BIOS. 257.Pp 258If you hand craft your disk layout, 259please make sure that the | 248and make it active. 249.Sh NOTES 250The automatic calculation of starting cylinder etc. uses 251a set of figures that represent what the BIOS thinks is the 252geometry of the drive. 253These figures are by default taken from the incore disklabel, 254but the program initially gives you an opportunity to change them. 255This allows the user to create a bootblock that can work with drives 256that use geometry translation under the BIOS. 257.Pp 258If you hand craft your disk layout, 259please make sure that the |
260.Bx Free | 260.Fx |
261partition starts on a cylinder boundary. 262A number of decisions made later may assume this. 263(This might not be necessary later.) 264.Pp 265Editing an existing partition will most likely cause you to 266lose all the data in that partition. 267.Pp 268You should run this program interactively once or twice to see how it --- 50 unchanged lines hidden (view full) --- 319.Bd -literal -offset indent 3201 <= number of cylinders 3211 <= number of heads <= 256 3221 <= number of sectors/track < 64 323.Ed 324.Pp 325The number of cylinders should be less than or equal to 1024, but this 326is not enforced, although a warning will be output. Note that bootable | 261partition starts on a cylinder boundary. 262A number of decisions made later may assume this. 263(This might not be necessary later.) 264.Pp 265Editing an existing partition will most likely cause you to 266lose all the data in that partition. 267.Pp 268You should run this program interactively once or twice to see how it --- 50 unchanged lines hidden (view full) --- 319.Bd -literal -offset indent 3201 <= number of cylinders 3211 <= number of heads <= 256 3221 <= number of sectors/track < 64 323.Ed 324.Pp 325The number of cylinders should be less than or equal to 1024, but this 326is not enforced, although a warning will be output. Note that bootable |
327.Bx Free | 327.Fx |
328partitions (the "/" filesystem) must lie completely within the 329first 1024 cylinders; if this is not true, booting may fail. 330Non-bootable partitions do not have this restriction. 331.Pp 332Example (all of these are equivalent), for a disk with 1019 cylinders, 33339 heads, and 63 sectors: 334.Bd -literal -offset indent 335g c1019 h39 s63 --- 27 unchanged lines hidden (view full) --- 363set, multiple "p" lines must be specified; one for each partition. 364.Pp 365These partition lines must occur after any geometry specification lines, 366if one is present. 367.Pp 368The 369.Ar type 370is 165 for | 328partitions (the "/" filesystem) must lie completely within the 329first 1024 cylinders; if this is not true, booting may fail. 330Non-bootable partitions do not have this restriction. 331.Pp 332Example (all of these are equivalent), for a disk with 1019 cylinders, 33339 heads, and 63 sectors: 334.Bd -literal -offset indent 335g c1019 h39 s63 --- 27 unchanged lines hidden (view full) --- 363set, multiple "p" lines must be specified; one for each partition. 364.Pp 365These partition lines must occur after any geometry specification lines, 366if one is present. 367.Pp 368The 369.Ar type 370is 165 for |
371.Bx Free | 371.Fx |
372partitions. Specifying a partition type of zero is 373the same as clearing the partition and marking it as unused; however, 374dummy values (such as "0") must still be specified for 375.Ar start 376and 377.Ar length . 378.Pp 379Note: the start offset will be rounded upwards to a head boundary if 380necessary, and the end offset will be rounded downwards to a cylinder 381boundary if necessary. 382.Pp 383Example: to clear partition 4 and mark it as unused: 384.Bd -literal -offset indent 385p 4 0 0 0 386.Ed 387.Pp 388Example: to set partition 1 to a | 372partitions. Specifying a partition type of zero is 373the same as clearing the partition and marking it as unused; however, 374dummy values (such as "0") must still be specified for 375.Ar start 376and 377.Ar length . 378.Pp 379Note: the start offset will be rounded upwards to a head boundary if 380necessary, and the end offset will be rounded downwards to a cylinder 381boundary if necessary. 382.Pp 383Example: to clear partition 4 and mark it as unused: 384.Bd -literal -offset indent 385p 4 0 0 0 386.Ed 387.Pp 388Example: to set partition 1 to a |
389.Bx Free | 389.Fx |
390partition, starting at sector 1 391for 2503871 sectors (note: these numbers will be rounded upwards and 392downwards to correspond to head and cylinder boundaries): 393.Pp 394.Bd -literal -offset indent 395p 1 165 1 2503871 396.Ed 397.Pp --- 26 unchanged lines hidden (view full) --- 424.Pp 425Throughout this man page, the term 426.Sq partition 427is used where it should actually be 428.Sq slice , 429in order to conform with the terms used elsewhere. 430.Pp 431You cannot use this command to completely dedicate a disk to | 390partition, starting at sector 1 391for 2503871 sectors (note: these numbers will be rounded upwards and 392downwards to correspond to head and cylinder boundaries): 393.Pp 394.Bd -literal -offset indent 395p 1 165 1 2503871 396.Ed 397.Pp --- 26 unchanged lines hidden (view full) --- 424.Pp 425Throughout this man page, the term 426.Sq partition 427is used where it should actually be 428.Sq slice , 429in order to conform with the terms used elsewhere. 430.Pp 431You cannot use this command to completely dedicate a disk to |
432.Bx Free . | 432.Fx . |
433The 434.Xr disklabel 8 435command must be used for this. | 433The 434.Xr disklabel 8 435command must be used for this. |