Fdisk

From Wikipedia, the free encyclopedia

The correct title of this article is fdisk. The initial letter is shown capitalized due to technical restrictions.

Many partition table manipulators are known as fdisk. Before hard disks can be used, they must be divided into one or more logical disks called partitions. This division is described in the partition table found in sector 0 of the disk.

Contents

[edit] DOS fdisk

All the many DOS operating systems, including MS-DOS, PC-DOS and DR-DOS use a partition table manipulator known as fdisk.exe. The name derives from IBM's habit of calling hard drives fixed disks. DOS fdisk programs are only capable of creating the FAT type partitions that DOS uses.

A derivative of the MS-DOS fdisk was provided with Windows 95, Windows 98, and Windows Me. Versions shipping with Windows 95B and higher were able to manipulate FAT32 partitions.

FreeDOS has its own official Free FDISK which has many advanced features and is free software.

[edit] UNIX, Linux & Unix-derived fdisk

Linux needs at least one partition, namely for its root file system. It can use swap files and/or swap partitions, but the latter are more efficient. So, usually one will want a second Linux partition dedicated as a swap partition. On Intel compatible hardware, the BIOS that boots the system can often only access the first 1024 cylinders of the disk. For this reason people with large disks often create a third partition, just a few MB large, typically mounted on /boot, to store the kernel image and a few auxiliary files needed at boot time, so as to make sure that this stuff is accessible to the BIOS. There may be reasons of security, ease of administration and backup, or testing, to use more than the minimum number of partitions. See also: cfdisk.

[edit] OS/2 fdisk

OS/2 shipped with two partition table managers up until version 4.0. These were the text mode fdisk and the GUI-based fdiskpm. The two have identical functionality, and can manipulate both FAT partitions and the more advanced HPFS partitions.

OS/2 versions 4.5 and higher (including eComStation) can use the JFS filesystem as well as FAT and HPFS, and replace fdisk with the Logical Volume Manager (LVM). Notes on using fdisk


Terms: Primary - the partition that contains one or more operating systems ( 4 is max.)

Extended - a partition that resembles a second disk like d: or e:

Swap - an extended or primary may be partition modified to store data in a temporary fashion to add to the computer’s RAM . Swap partitions are numbered 5.

FDISK INPUTS: q - quit m - help d - delete partition

   l - list all codes     (shows types of formats)

p - display disk setup n- new (entry partition) t - set type of partition a - change partition to boot partition w - write all changes to disk


Notes: note that FDISK does not store data while choices are being made. They are made after the data is inputted by entering a “w” as the last step.


Notes: all the exercises below end with w. This is not necessary and many exercises could be done with the w input not entered until the end of the last step.


Example #1 to view disk

INPUT QUERY RESPONSE p

The above displays the contents of the disk


Example #2 to erase disk contents INPUT QUERY RESPONSE d partition number 1 to fully erase disk enter p as above and then repeat this step for each displayed partition. w (writes to disk)


Example #3 format 20 gig disk (example 2 should precede this step)

INPUT QUERY RESPONSE n e or p p partition number 1 first cylinder 1 (default) last cylinder 2432 (default) t select partition 1 hex code 83 a partition number 1 ( make boot partition) p (view partition) w (writes to disk)


Example #3 to format 1 usable partition and one swap partition (example 2 should precede this step) ( 20 gig disk)


INPUT QUERY RESPONSE n e or p p partition number 1 first cylinder 1 (default) last cylinder 2000 n e or p e partition number 2 first cylinder 2001 (default) last cylinder 2432 (default)

  at this point all the disk is full and the response to “n” changes

n l or p l first cylinder 2001 (default) last cylinder 2432 (default) t partition number 1 hex code 83 t partition number 5 hex code 82

a partition number 1 p ( to check installed partitions) w

[edit] External links