In the first usage shown above, fdisk displays the partition table as it exists on the disk, and then presents a menu allowing you to modify the table. The menu, questions, warnings, and error messages are intended to be self-explanatory. See ``Menu Options'', below.
If there is no partition table on the disk, you are given the option to create a default partition or to specify the initial table values. The default partitioning allows 100% of the disk for the system, and makes the UNIX system partition active. In either case, when the initial table is created, fdisk also writes out the first-stage bootstrap code [see sd01(HW)] along with the partition table. After the initial table is created, only the table is changed; the bootstrap is not modified.
In the second usage, the -p option prints out the disk partition table, one partition to a line, and exits. For each partition, fdisk displays the following information:
partition start stop size type status
The start, stop, and size values are in disk tracks. If no partition is defined, fdisk displays zero for all values.
In either usage, the optional device can be used to specify the raw device associated with the hard disk; the default value is the raw device associated with the boot hard disk.
1=UNIX System 2=pre-5.0DOS 3=post-4.0DOS 4=System 5=otherfdisk will then ask for the size of the partition as a percentage of the disk. The minimum UNIX system disk partition size is 60 MB for the first disk and 40 MB for the second disk. You may also enter the letter c at this point, and the program will ask for the starting cylinder number and size of the partition in cylinders.
Note: If you select type 4, (System), to create a System Configuration Partition, fdisk will not prompt you for a starting cylinder number because the System Configuration Partition is required to start at cylinder 0.
If a c is not entered, the program will determine the starting cylinder number where the partition will fit. In either case, if the partition would overlap an existing partition, or will not fit, a message is displayed and the program returns to the original menu.
fdisk: cannot open<device>
fdisk: unable to get device parameters for device <device>
fdisk: error reading partition table
This message may appear after selecting the Update option from the menu.
fdisk: error writing boot record
The label of a created partition will be either DOS for MS-DOS 5.0 partitions or pre-5.0DOS for any version of MS-DOS lower than 5.0. Note, however, that the version of the partition can be pre-5.0DOS even when the operating system in use is MS-DOS 5.0. Therefore, do not depend on the partition label to determine which release of MS-DOS is running.
The DOS 4.01 fdisk program assumes it can store diagnostic information in cylinder 1020 on the hard disk. If a UNIX system partition is created that uses cylinder 1020, DOS 4.01 fdisk will be unable to create a DOS partition. Therefore, you must either create the UNIX system partition at the front of the disk so that cylinder 1020 is not used, or create the DOS partition using the UNIX System fdisk (not DOS fdisk) and never delete it.
When setting up a DOS 4.01 partition on the hard disk to co-reside with a UNIX partition that has already been set up, do not allow fdisk to create the largest possible partition and make it active (as the fdisk prompt requests). Instead, you should manually set it up to line up against the UNIX partition. Note that this applies to when you boot DOS 4.01 from floppy disk (not from within UNIX) and runs fdisk.
Also note that there was a previous version of the fdisk command, intended for use with the UNIX System bkrs (backup/restore) utility. The current version of fdisk is used only for partitioning disks.
As noted in the section describing fdisk's menu options, you need to use the overwrite option when installing UNIX on a disk that has had OS/2 installed on it. The Overwrite system master boot code option overwrites the in-core boot code portion of the boot sector with the UNIX system master boot code. This operation is necessary because the OS/2 boot code will not boot UNIX. The overwrite is not necessary, however, on systems that had MS-DOS and then OS/2 installed on them. To complete the overwrite, you need to use the update menu option in fdisk.
MS-DOS and certain other operating systems do not support disk partitions starting beyond or ending above cylinder 1023. These operating systems may not be able to activate a partition that starts beyond cylinder 1023. If a partition starts before cylinder 1023 and ends after cylinder 1023, the operating system may not be able to use the disk space above cylinder 1023. If the partition table is updated via the DOS fdisk command, inappropriate information may be recorded for these partitions. If this occurs, you may not be able to boot from these partitions again. This could also occur with certain other operating systems.