Thursday, December 10, 2009

partitioning hardisk

As outlined in the General Information section, the most common way to install Linux is to allocate a part of your hard disk for Linux. Most computers come with one hard disk, and that hard disk is usually setup to have just one partition which uses all of the space on the hard disk. If this is the case with your computer, then you will need to either add a new hard disk for Linux, or shrink your existing partition to make space for Linux.

Each partition not only creates a separate independent space on the hard disk but it also associates a method of reading and writing information to the drive, the format of the drive. Linux has a number of different formats it can use for sections of the hard disk, the most popular being ext2 and ext3 (others include reiserfs, xfs and jfs). Normally you will not have to worry much about the formats of Linux partitions, the installation program will make appropriate suggestions. One other type of partition format for Linux which is worthy of mention is swap. A swap partition is used to effectively extend your memory onto the hard disk, so if your computer wants to use more memory then it has, it will "swap" information in memory which it doesn't need at the time onto the hard disk. It is possible to use a large file on a normal partition for swap however this is much slower. Unless you measure your memory in Gigabytes, you should probably use a swap partition at least the size of your memory, and if you have less then 256Megabytes of ram then you may want a partition 2 or 3 times it.

If you are in the common situation of having to shrink the only Windows partition on your hard disk, the first thing to be aware of is that your access to the information on the Windows partition will depend on its format. There are two main types of partition formats for Windows, FAT and NTFS. Generally computers with the Windows 95/98/ME systems will have FAT partitions and Windows NT/2000/XP will have NTFS partitions, though the NT/2000/XP family can also use FAT.

The critical difference between FAT and NTFS as far as Linux is concerned, is that while reading information from either system is perfectly safe under Linux, writing information to an NTFS partition is currently regarded as potentially unsafe so you wouldn't be able to edit these files from Linux and access the changes directly under Windows. Linux is perfectly reliable sharing FAT partitions with other operating systems (if your feeling lost, perhaps telling you that when you format a floppy you are actually making a FAT filesystem on it will help put things in perspective). Windows has no native method of reading Linux formatted partitions, but the Free explore2fs program allows you to read and copy information from ext2 and ext3 Linux partitions while you are running Windows. There is now also a file-system driver from the same source called ext2ifs which allows your ext2 and ext3 partitions to appear as extra drives in Windows NT4/2000/XP (still read only).

There are numerous methods for shrinking Windows partitions to make space for Linux (and I would recommend simply making the space and using the installer to create the partitions and format them). No matter what method you use to do this, you should backup all your data before you begin, in fact you should always keep backups of all your important information as a hard disk could fail at any time. Another tip is to defragment your drive in windows before you begin which makes it much easier for the software which has to do the shrinking. The tried and true method for shrinking a partition is a commercial program called Partition Magic ($69.95 as of Sept 2004). You can also do this with Free software such as parted (or the graphical front-end QTparted) or often as part of the installer itself. Check the installation documentation for the system you plan on installing to see if it's now supports resizing/shrinking ntfs partitions.

Whatever scenario you start in, when you begin to install Linux you need to know where you have space to put it. It may be a new hard disk or free space on an existing hard disk. For a modern desktop Linux system you would want to allocate an absolute minimum of 2GB of hard disk space, 5GB would be far better and if you have plenty of space (or if you plan to install lots of large pieces of software, perhaps games) 10GB+ is perfectly reasonable. If you have enough free space the installation program may suggest creating more than one Linux partition, if so it is well worthwhile creating a separate partition for your files, the /home partition. Amongst other things you can reinstall your system or install a new system without having to make an additional backup of your files (remember again you do always keep backups of everything important).

No comments:

Post a Comment