fdisk" -- Command" "
Hard-disk partitioning utility
//eettcc//ffddiisskk [[--rr]] [[--cc]] [[--bb _m_b_o_o_t]] _x_d_e_v ...
The command fdisk lets you view how a hard
disk is partitioned, alter how it is partitioned, and mark a
partition so that the COHERENT bootstrap will automatically
boot the operating system it contains. If you wish, you can
use fdisk to assign partitions to different
operating systems, e.g., MS-DOS, CP/M, Windows NT, COHERENT,
and XENIX.
fdisk recognizes the following command-line
options:
- --bb
- Use the first 446 bytes of the file mboot to
replace the bootstrap information in xdev. Use
this option to overwrite the COHERENT bootstrap with another
bootstrap.
- --cc
- Specify the disk geometry (i.e., number of cylinders,
heads, sectors) for disk drives that your system's BIOS does
not support.
- --rr
- Read-only access. fdisk reads the
partition table and displays its contents, but does not let
you change how a disk is partitioned. This is the ``safe''
option.
- --VV
- Display the version number of fdisk. PP
When you invoke fdisk, it reads the first
block from the special device xdev, which
holds the partitioning information for that disk.
xdev is the device whose name ends in
x; for example, if you have one SCSI hard disk
and one AT-style hard disk installed in your machine,
xdev would be either /dev/sd0x or
/dev/at0x. If you use fdisk
with a device other than the x device
(e.g., with device /dev/at0a),
fdisk displays values for your partitions
that are totally bogus -- and probably quite alarming.
After you invoke fdisk, it displays a warning
message, then the layout of the disk whose partition-table
device you named on the command line. The following gives
an example layout, for a 33-megabyte AT disk:
Drive 0 Currently has the following logical partitions:
[In Cylinders] [ In Tracks ]
Number Type Start End Size Start End Size Mbyte Blocks Name
0 Boot MS-DOS 0 149 150 0 899 900 7.83 15300 /dev/at0a
1 EXT-DOS 150 614 464 900 3684 2784 24.28 47430 /dev/at0b
2 UNUSED 0 0 0 0 0 0 0 0 /dev/at0c
3 UNUSED 0 0 0 0 0 0 0 0 /dev/at0d
In this example, partition 1 (which is accessed via device
/dev/at0a) holds an MS-DOS file system. It is
marked as the ``Boot'' partition, which means that the
COHERENT bootstrap will boot its operating system
automatically when you reboot your computer. The other
columns show the size of each partition, and its beginning
and end points in both cylinders and tracks.
If you invoked fdisk with its option
-r, the program exits at this point. If you
did not invoke it with option -r, it
displays the following menu of actions:
Possible actions:
0 = Quit
1 = Change active partition (or make no partition active)
2 = Change one logical partition
3 = Change all logical partitions
4 = Delete one logical partition
5 = Change drive characteristics
6 = Display drive information
7 = Proceed to next drive
The following describes each action in detail:
- 00..
- Quit fdisk.
- 11..
- Change which partition is the active partition. You
can also say that your system has no active
partition. If you do so, the COHERENT bootstrap will prompt
you at boot time to enter the number of the partition whose
operating system you wish to boot. fdisk
will let you set only one active partition at a time.
- 22..
- Change the dimensions (i.e., the size, beginning point,
or end point) of one partition. Doing this destroys the
data on that partition.
- 33..
- Change the dimensions of every partition. Doing this
destroys the data on your hard disk.
- 44..
- Delete a partition.
- 55..
- Change the parameters of the drive. Use this option if
COHERENT somehow has a faulty notion of your disk's size.
You should never have to use this option; using it will wipe
out all data on your hard disk.
- 66..
- Give summary information about the disk -- that is, re-
display the table shown above.
- 77..
- This option appears only if you have more than one hard
disk drive. Use this option to display information about
another hard disk on your system.
Before you change the dimensions of any partition on your
system, read the warnings given in the notes below. When
you have finished modifying your disk,
fdisk then writes your changes into
xdev.
Files
&&lltt;;ffddiisskk..hh&&ggtt;;
See Also
Notes
If you change a device's partition table, reboot your
system. Most device drivers will not recognize the revised
partition information until a reboot occurs.
A
As the --rr and --bb options are contradictory, attempting to
use them together triggers an error message.
A
Note that many operating systems implement a program named
fdisk. Each manipulates a hard disk's
partition table, but not all respect the fact that a disk
may hold more than one operating system. In particular, the
MS-DOS edition of fdisk can rearrange the
order of entries in the partition table. If this happens,
you may lose the ability to run COHERENT until the table is
restored to its previous order. A sign of this problem is
seeing the prompt AT boot? when you try to
start COHERENT after running any fdisk
program, and not being able to get past it.
A
Computer systems that use older releases of a BIOS may
report incorrect disk parameters. Users of such systems
should change the CMOS setup values if possible, but the
BIOS on some older systems will not allow you to specify
arbitrary values for disk parameters. Users with such
systems can use the option ffddiisskk --cc option instead.
A
If you plan to install and run COHERENT and MS-DOS on the
same hard disk, note the following:
- +o
- If you wish to install COHERENT and MS-DOS on the same
hard drive, you must run the MS-DOS ffddiisskk first!
- +o
- If you plan on running both operating systems, you
must install MS-DOS first and leave some free
cylinders on the disk for COHERENT as well as a free
partition. You can have both primary as well as extended
MS-DOS partitions on the same drive as COHERENT, but
COHERENT cannot use a sub-partition of the MS-DOS extended
partition. COHERENT must have one of the four real
partitions. Failure to observe these rules will result in
loss of data! Caveat utilitor.