home *** CD-ROM | disk | FTP | other *** search
-
-
- FDISK(8) UNIX Programmer's Manual FDISK(8)
-
- NAME
- fdisk - examine or change DOS partitioning information
-
- SYNOPSIS
- /usr/etc/fdisk <raw-device> [ inquiry ] [ action ] [ flags ]
-
- DESCRIPTION
- fdisk displays or changes the DOS partition table found in
- the bootsector of i386 bootable disks. If no inquiry or
- action is specified, it is run in interactive mode, allowing
- multiple changes to the partition table to be made. If an
- inquiry is specified, the result is displayed to standard
- output but no changes to the partition table are made. If
- an action is requested, the partition table will usually be
- modified and fdisk immediately returns. When fdisk is run
- in interactive mode, no changes to the partition table are
- effected until the user explicitly writes the changes.
-
- fdisk modifies only the bootsector and (unless the -bootsec-
- torOnly flag is specified) the first sector of newly allo-
- cated partitions; it does not modify other contents of the
- disk in any way. However, it is used to redefine the allo-
- cation of the disk; deleting a partition makes the partition
- inaccessible and should be considered tantamount to erasing
- the partition.
-
- Flags
-
- -useAllSectors
- For compatibility with the DOS version, fdisk by
- default recognizes only those sectors that are bios-
- accessible. However, if fdisk is passed the
- -useAllSectors flag, it will recognize all sectors
- physically present. Data allocated in the extra sec-
- tors may not be bios accessible, and certain fields in
- the partition table might overflow, which might cause
- problems with some operating systems. Bios inaccessi-
- ble sectors could prevent NEXTSTEP from booting,
- though once booted NEXTSTEP is unaffected by bios lim-
- itations or partition table overflows.
-
- -useBoot0
- Reads in /usr/standalone/i386/boot0 to be used as the
- partition boot program. If this option is not speci-
- fied, the existing boot program is retained.
-
- -bootsectorOnly
- Tells fdisk to modify only the bootsector when saving
- changes. Otherwise, the default behavior is to zero
- the first sector of newly-created partitions to ensure
- that extant data is not treated as a boot program or
- meaningful partition information.
-
- Interactive mode
-
- When fdisk is run in interactive mode, it displays the
- defined partitions and unallocated disk space, then displays
- a menu. Information on defined partitions includes:
-
- Type The type of data the partition is said to contain.
-
- Start The starting address of the partition, in megabytes.
-
- Size The size of the partition, in megabytes.
-
- Status
- If the partition is marked as active, the partition
- will be booted from when the selected device is the
- boot device.
-
- All unused blocks on the disk are also displayed, with their
- sizes rounded to the nearest megabyte.
-
- Interactive mode main menu options
-
- Create a new partition
- Allocates space on the disk for use by NEXTSTEP or
- another operating system. The space is allocated from
- the first adequate free block. The partition table
- structure only allows for 4 partitions per disk.
-
- Delete partition
- Deallocates the space occupied by the specified parti-
- tion.
-
- Set the active partition
- Specifies which partition is to be booted from if the
- selected device is the boot device.
-
- Show disk information
- Displays the layout of the disk, both according to the
- driver and accoring to the rom bios. For compatibil-
- ity with the DOS verstion, fdisk by default only
- recognizes those sectors that are bios-accessible.
- However, if fdisk is passed the -useAllSectors flag,
- it will recognize all sectors physically present.
-
- Non-interactive mode
-
- For the benefit of installation scripts, fdisk can be given
- one inquiry or one action to effect partitioning. Inquiries
- do not modify the partition table, but actions usually do.
-
- The following inquiries are allowed:
-
- -isDiskPartitioned
- Outputs "Yes" if the disk contains 1 or more valid
- partitions, "No" otherwise.
-
- -isThereExtendedPartition
- Outputs "Yes" if the disk has a DOS extended
- partition, "No" otherwise.
-
- -isThereNeXTPartition
- Outputs "Yes" if the disk has a NEXTSTEP partition,
- "No" otherwise.
-
- -freeSpace
- Outputs the size (in megabytes) of the largest free
- block on the disk.
-
- -freeWONeXT
- Outputs the size (in megabytes) of the largest free
- block on the disk if the NEXTSTEP partition were
- deleted.
-
- -freeWONeXTorExt
- Outputs the size (in megabytes) of the largest free
- block on the disk if the NEXTSTEP and extended parti-
- tions were deleted.
-
- -sizeofExtended
- Outputs the size (in megabytes) of the extended parti-
- tion.
-
- -diskSize
- Outputs the size of the disk in megabytes.
-
- -installSize
- Outputs the size that NEXTSTEP would install to on the
- current disk; effectively the size of the NEXTSTEP
- partition if the disk is partitioned, otherwise the
- size of the disk.
-
- The following actions are allowed:
-
- -removePartitioning
- Zeros out the bootsector, eliminating the partition
- table and boot program. Prepares the disk so that
- NEXTSTEP will install on the entire disk.
-
- -dosPlusNeXT <megsForDos>
- Partitions the disk with <megsForDos> reserved for DOS
- and the remainder used for NEXTSTEP.
-
- -setAvailableToNeXT
- Deletes the current NEXTSTEP partition, then reserves
- the largest free space for NEXTSTEP; doesn't destroy
- other partitions.
-
- -setExtAndAvailableToNeXT
- Deletes the current NEXTSTEP and extended partitions,
- then reserves the largest free space for NEXTSTEP;
- doesn't destroy other partitions.
-
- -setExtendedToNeXT
- Changes the current extended partition to NEXTSTEP.
-
- -setNeXTActive
- Makes the NEXTSTEP partition active, but doesn't
- affect the size of any partition.
-
- SEE ALSO
- disk(8)
-
- BUGS
- When creating a partition, fdisk's idea of a megabyte is
- sometimes different than other versions; fdisk is not
- guaranteed to locate the partition where another version
- would.
-
- fdisk knows nothing about logical partitions, which are
- sub-partitions of an extended partition. Nor perhaps should
- it, as these are gross kludges from the Evil OS Company of
- the North.
-
- fdisk does not tolerate inconsistent partitions; a partition
- that overlaps another will not be included in the partition
- table when it is written out, and the cylinder/head/sector
- bios values are derived from the absolute sector numbers.
- Upon writing, the partition table entries are ordered the
- same as the actual partitions.
-
-