Pick a Free OS

Fdisk for partitioning

The four primary partitions are numbered from 1-4 and the logical partitions start from 5 onwards. So, ‘hda1-hda4’ would represent the primary partitions. Extended partitions, essentially primary partitions, take up the numbers from 1-4. Regardless of the number of primary partitions, logical partitions will always start from 5, i.e hda5, hda6 etc.

From the above extract/ we see that there are three primary partitions, one extended and three logical partitions defined. Also that there are some start and end values, which are the starting and ending cylinder values for the partition. The next columns show the blocks in use. The number of blocks should mirror the space allocated, in KB, for that partition. The next two columns are the numeric id of the partition and the partition type.

The partition structure

What should be your partition structure? Well, there are a couple of points you will need to consider when partitioning your drive. For example, Windows only boots off a primary partition. Linux doesn't have any such compulsions but LILO does have problems if your /boot partition lies beyond 1024 cylinders.

This issue has been addressed in recent LILO releases, but most distributions carry the old problematic LILO. Newer releases of distributions are including the new LILO. The other solution is to create a small 15MB partition that lies before 1024 cylinders.

You'll need a swap partition. Linux uses a separate partition for swap. You can use a swap file but be prepared for lost performance. We suggest you create your swap partition of the required size before you create your other partitions, as you might get carried away in creating Linux partitions, and be left with insufficient space for swap.

Partition creation

Partition creation is fairly easy. To create a new partition, press “n”. Now you will be asked whether you want to create a primary or an extended partition. Generally, you'll have three primary partitions and an extended partition that occupies the rest of the space available. Finally, you will create logical partitions within this extended partition.

Command (m for help): n

First cylinder (3925-4963, default 3925):

The above prompt is what you will see after you select the partition you want to create. Either enter a starting cylinder value here, or just press enter to use the first available cylinder (here 3925). Most of you will take the second option.

Last cylinder or +size or +sizeM or +sizeK (3925-4963, default 4963):