Pick a Free OS

Fdisk for partitioning

In case you're feeling really brave and want to enter the last cylinder for the partition, we suggest, you specify a size for the partition. Just pressing enter here will mean that all the free space available will be used for the partition. Enter the size in bytes--KBytes, Megabytes or Gigabytes. Prefix a “+"”to the size you want to allocate to the partition followed by a K, M or G to specify KByte, MByte or Gbyte.


By default, fdisk creates a partition of type Linux with ID 83. This is incorrect, if you're trying to create a partition of type swap. You can change the partition type using the command “t”.

Command (m for help): t

Partition number (1-8): 8

You will be prompted for the partition number of the type you want to change and will be followed by:

Hex code (type L to list codes):

Each partition type has a number assigned to it. For the most part, the hex codes of the partition ID's are unique. In some cases, there are conflicts - Solaris partitions and Linux swap share the same ID. If unsure of the Partition ID, use “L” to check. As you can see, fdisk supports a wide variety of partitions from FAT to BSD to BEOS. We select 82 for Linux swap.

Hex code (type L to list codes): 82

Changed system type of partition 8 to 82 (Linux swap)

That was about creating partitions. But, what if you want to delete. Just press “d”.

Command (m for help): d

Partition number (1-8): 8

Key in the partition number and press enter. You will not get a confirmation message but you'll find yourself back at the prompt.

Oops! That wasn't the partition that was to be deleted. /dev/hda7 was to go and not /dev/hda8. What do you do? Don’t panic. Just press “q” and exit without saving your changes. You will be dropped back at the prompt. Get back into fdisk and you will see that your partitions are intact.

No changes you make to your disk partition will be committed until you explicitly use “w” to write changes to the partition table before exiting. Just check the partition list before doing so.

Command (m for help): w

The partition table has been altered!

Calling ioctl() to re-read partition table.

Re-read table failed with error 16: Device or resource busy.

Reboot your system to ensure the partition table is updated.

Warning: If you have created or modified any DOS 6.x partitions, please see the fdisk manual page for additional information.

Syncing disks.

Now that you have the partitions you want, go ahead and create a filesystem on them.