Hot Topic #3: Partitioning your hard drive to accommodate Linux Using FIPS

Contributed by Robert Smith, Edited by Alistair Ross



Unless you plan to splash out on a new hard drive especially for linux, or decide to take the plunge into single operating territory, then you will have to learn how to partition your hard drive.
There are two partitions which are "mandatory" in linux. The "/" partition and the swap partition. The "/" partition has been explained in the previous chapter but the swap partition needs explaining.
Every computer has a set amount of RAM. To enable the computer to function properly the files which the computer is handling, are transported into the RAM and run there. The reason that the files are run in the RAM is because the RAM runs at around 100,000 times the speed of the hard disk in your PC. The more ram you have the more processes can take place at one time. Once the ram is full, the PC has to transfer the data back onto the hard disk to make way for more information. The greater the amount of data being transferred onto your hard disk, the slower your computer. The Linux Swap partition is specifically designed to handle this data as fast as the hard disk can (faster than normal partitions)and then allow the ram to take back the data when it needs it.
Every linux machine needs a SWAP partition but the more ram you have the less of a swap file you need. There is no set guide for the amount of swap partition you need but if you follow the guide below, you should have ample.

16mb of Ram -> 100mb of Swap partition (or more, if you can manage it)
24mb of Ram -> 100mb of Swap partition (or more, if you can manage it)
32mb of Ram -> 100mb of Swap partition (or more, if you can manage it)
48mb of Ram -> 100MB Swap partition (or more, if you can manage it)
64mb of Ram -> 128MB Swap partition
128mb of Ram - 256MB Swap partition
256Mb of Ram - 512MB Swap partition
512Mb of Ram - 512MB Swap partition (probably not much point in going further than 512MB swap).


This is only a rough guide. If you have more space to allocate for swap then do (as long as you leave 1gb for normal files). I do not recommend exceeding 128mb of swap space as this is pointless generally. Ram is cheap at the moment so if you can afford it upgrade the amount of ram in your system.

I recommend having 2 other partitions not including the root partition. These partitions are

/home/ and /usr/

If you have 1gb of hard disk space i recommend having :

"/" partition of 125mb
"/usr/" partition of 725mb
"/home/" partition of 150mb

The amount of space that you leave on your "/home/" partition depends on the type of work that you will be doing. If you only have 1gb for Linux, then you will not be able to do many high storage need exercises such as mp3 encoding because you will soon run out of space in your home directory.

If you have a 2gb drive make your home partition around 500mb and your root about 200mb. Then use up the remaining space with a usr partition.

Once that you have decided the sizes of each of your partitions write them down on a piece of paper so that you don't forget the sizes you have allocated.

Now all the windows users out there will find they have a problem. There may be plenty of space on their hard drive but it is all taken up with their windows FAT32 partition. Linux can't run effectively on this sort of partition so we will have to use a program called FIPS to resize the partition and create two instead of one.

What FIPS does is it takes all the data on your hard drive primary partition and pushes it together. Then it splits the spare space, which you want off, into another partition and then saves the partition layout. Although FIPS has been tried and tested numerous times, it is VERY important that you create a backup of your windows information. Make sure all your files are backed up somehow, and any drivers you have downloaded are also available if everything goes wrong.

FIPS is free software and although numerous people have used it without problems, it doesn't mean it's infallible. It is provided without any warranty, and the author cannot accept any responsibility for any harm done whilst following this tutorial. Remember I DID THIS WITH NO PROBLEMS, and this is exactly what i did so nothing should go wrong.

1 - Make a boot disk for your operating system. Make sure that this works properly by booting using it. Then restart windows.

2 - Insert a blank floppy into the floppy disk drive. Also insert the linux mandrake 7.1 CD and navigate to the dosutils directory. Copy the following 3 files to the floppy - FIPS.EXE, RESTORRB.EXE and ERRORS.TXT. Then once more boot into DOS using your windows boot disk.

3 - Take out your boot disk and then put in your FIPS disk. Navigate to your A:\ drive or corresponding floppy drive letter using the command "cd A:\" (where a is the letter associated with your floppy drive). Then type "FIPS" and press enter.

4 - A warning about using FIPS in a multitasking environment such as windows will come up but we are in DOS, so this doesn't effect us. Click Enter. Suddenly your hard disk will kick in and FIPS will scan it to find out how your hard disk is arranged and where there is free space. 5 - We are assuming that you have at least 1gb of space free on your windows partition and that you only have a single partition. If you have more than 1 partition on your had disk then you might have to split multiple partitions. If so just repeat the steps below.

6 - After FIPS has finished scanning your hard drive for free space it will ask you what partition you will want to divide. There is only 1 partition available so select the number corresponding to that (1). FIPS by default will take 2/3 of the space left on the partition to create the new one and if you have over 1gb spare then you might not need to change anything. On the left of the screen you will see the old partition size, in the middle the cylinder which the partition will be split at, and on the right the size of the new partition being created. move your cursor up to increase the amount of space on your hard disk and down to decrease the size. Right and left movements of the arrow keys also do the same sort of thing but move the size up and down in smaller quantities. Remember the size of your new partition by writing it on a piece of paper.

7 - Once you have selected the biggest partition you want (see before in this lesson, the size should be the total of your "/", "/usr/"and "/home/" partitions added together), press enter. Then FIPS will ask you if you want to proceed with the splitting. Type "Y" for yes and the splitting will continue. When FIPS asks you if you want to backup the info about your last partition to disk, click "Y" for Yes. Once FIPS has made the changes it will instruct you to run scandisk on the new smaller windows partition. Type "Ctrl + Alt + Delete" and put back in the DOS boot disk.

8 - Type "scandisk C:" at the command prompt and fix any errors that may have occurred.

9 - When scandisk is finished type in "FDISK". A screen will come up asking you if you want to enable large disk support. Type "Y" and then press the return button.

10 - Type "4" and then return to view your partition table. There should be two primary DOS partitions showing. Find the one with the space you designated for linux and note the number of the partition. Type "Esc" to return to the main menu.

11 - Type "3" and return followed by "1" and return to get to the correct delete partition screen. Type in the number of the partition that you want to delete (the one you found earlier as the space for linux) and then click enter. Type "Y" to confirm that you want to remove that partition. Then at the main menu type "Esc" to exit the program. You can now remove the floppy disk and boot into windows.


You have now successfully partitioned your hard disk to make space for linux. This is not the last bit of partitioning you will have to do but the rest of it is more simple.

Please refer to The Ultimate Linux Newbie Guide, Chapter 3, for more information on assigning drives during the Installation of Linux.

The views expressed within this document are not strictly the views of the Ultimate Linux Newbie Guide. If you wish to contact this document's author, please email him at: rsmith85@btinternet.com

HOME | LINKS |