Monday, August 27, 2007

Disk Partition Setup in Ubuntu

I was messing around with an old Gateway PC this weekend cleaning out the kids' old computers and getting ready for school to start tomorrow. Instead of throwing away the PC's, I decided to install Ubuntu Linux on one of the systems. The latest version of Ubuntu is Feisty Fawn 7.04. The install is easy enough, download the CD image file and it pretty much runs by itself. The problem was trying to figure out what is the best way to partition the hard disk.

The old PC had Windows ME, which is probably the worst version of Windows around, so I decided to use the entire disk for Ubuntu and not install a dual boot partition. There are basically 3 ways to partition Ubuntu:

1. Use the entire disk for Linux in one big partition for all the programs and system files. A SWAP partition will also be added automatically. Total of 2 partitions will be created. This is one of the automatic options.
2. Use multiple partitions for speed and security in the future. The partitions can be /, /home, /temp, /var, etc.
3. The third way and probably middle of the road method is to create three partitions: /, /home, and SWAP. The root partition is the "/", which is used for all the system files. The /home partition is used for all user data, similar to My Document under Windows XP. This is the best way for future upgrades.

The following are a series of screen shots for doing the partitioning task manually. Sorry for the fuzzy pictures. I have no idea how to capture the screen during an install.


The above screen shows that I originally partitioned my hard drive using the automatic method and the installer made 2 partitions only. One is the ext3 partition for all the files and the other a SWAP partition. Here I am selecting to make a "New partition table."


Now all the old partitions are deleted and it showed the entire disk as free space.


By double clicking on the free space line, a new window opens to create a new partition. This is going to be my root or "/" partition. I am giving it a fairly large size of 10 GB. Note that I am using the ext3 format. Why 10 GB? Someone on the net recommended it. It will give me some room for future versions of Ubuntu.


After the ext3, 10 GB, partition is defined, I double click on it again to select "Mount Point." This is where I selected "/" for the root partition.

Now repeat the procedure for the next partition. Remember to leave some room for the SWAP partition. The recommended size for SWAP is at least the size of your ram to a max of 2 GB. I just planned to use 2 GB, and made my /home partition accordingly. Don't forget to select /home for the second partition. Use "SWAP" as the type for the third partition, which is around 2 GB in my example. Also note that once "SWAP" is selected, there is no option for "Mount Point."

Once the 3 partitions are created, rest of the install process is pretty simple.

I hope this will save someone a few minutes installing Ubuntu.

No comments: