Linux #7 - Partitions

By Pete | @kingpetey | 08 Oct 2002

All hard disks have to have partitions on to hold any sort of data, different operating system require you to have different partitions. Windows generally uses either a FAT32 partition type or NTFS. If you have a pc with windows on the chances are that you only have 1 partition on. For Linux we're going to have to make some changes to your partition table and introduce 2-3 new partitions.

Don't worry if this all sounds complicated, the newest distributions especially SuSE has tried to make partitions as easy as possible, it comes with a utility built into YaST (SuSEs installation program) which automatically resizes your main fat32 partition to fit Windows and Linux on along with any other small changes which need to be made. If you feel more comfortable controlling how much space exactly to give each operating system I suggest you use a program like Partition Magic rather then Fdisk.

I'm not going to go into great detail on how to use these programs but I will mention what you need to do with these programs. Depending on how big your hard drive is will depend on how much space you want to allocate for Linux. I normally go for around 10gbs as my root partition for Linux as this gives me plenty of space to work with. You can install Linux on a number of different partition types the most common being EXT2/EXT3.

The newer distributions will use EXT3 and the older EXT2. Though the differences between the partitions do not concern us, it does not make a major difference which you choose. Once you have your main Linux root partition you will need a swap partition. It took me a while to get my head round this concept but swap partitions come in very handy and speed up day to day tasks a lot. Swap partitions originally came from the days when ram was very expensive so the idea of using your hard drive to substitute ram came about. Windows uses a similar technique known as virtual memory.

Your swap partition doesn?t need to be over big, a minimum of 128mbs and a maximum of around 500mbs. Generally the less ram you have the bigger the swap partition you need. If you have a large enough hard drive and space isn?t a big issue it doesn't harm having a bigger swap partition but there is no need to over do it. Finally if your hard drive is bigger then 8gbs and the Linux partition isn?t the first on the drive then you may need to make a boot partition if you intend to duel boot with windows. Boot partitions have to be the first partition on the drive as need only be a maximum of 50mbs formatted to EXT2.

This makes it easier for installing any boot managers needed to duel boot the system. Without one you may find when you reboot your pc after installation only windows will boot and the only way you will be able to access Linux is with a boot disk. The exact principles behind how partitions work is not really relevant for using Linux. The general idea is that Windows uses either FAT16, FAT32 or NTFS partitions and Linux uses EXT2, EXT3, REISER and SWAP. All these can easily be created using Partition Magic or Linux Fdisk.