Thursday, April 9, 2009

Partitioning the Hard Drive for Ubuntu

Setting up Linux on a new hard drive is not as straight forward as a Windows based machine, but it actually has some clear cut advantages.

The most important advantage to me is that you get an opportunity to break your hard drive up into chunks and install different portions of Linux onto those chunks. This is called partitioning your hard drive. Why is this important? Well because if we do this properly we can separate the operating system from our user data and files.

Therefore if our system gets corrupt then we can simply re-install a fresh copy of Ubuntu onto the partition that held our OS and we are back up and running with all of preferences set to what there were pre-crash as well as any personal files that we had. This is drastically different than MS windows where if the OS crashes we would scramble frantically to get Windows to boot in safe mode to get our files and then overwrite the entire hard drive to reinstall the OS.

When partitioning the hard drive you can break it up into four "primary" partitions and then you have the option to break each "primary" into "logical" partitions.

This seems pretty logical, so what I did is I created 3 different primary partitions:
  1. / (root)- size:20GB - this partition will be used to hold the OS
  2. / swap - size:8GB - this is the section that the memory uses to hold data if it needs it
  3. /home - size:10GB - this partition will hold all the user data for the installed applications
  4. /data - size:20GB - my secret stash of disk space to hold my important files
I further create a few sub-partitions on the /data partition to further segment my files and data. I left the rest of my 500GB drive as an ext3 format.

During the Ubuntu installation process, the setup wizard will ask you whether or not you want to have this partition "mounted". If you want to have access to these partitions through the file managers then you should say "yes". Otherwise you will have to manually mount any partition you want to use. So consider your choices carefully.

This step took me about 2 hours worth of planning before I actually went ahead and did it. I guess an ounce of planning is worth the effort because now I am protected in case (when) I crash my system and need to start fresh.

If anyone needs a good source of information, here are the sites that I visited to make my decision:
  1. https://help.ubuntu.com/community/HowtoPartition/PartitioningBasics
  2. http://www.psychocats.net/ubuntu/partitioning
  3. http://ubuntuforums.org/showthread.php?t=282018
Link #3 is by far the most valuable link in my eyes... I just used this information to make 90% of my decission.

No comments:

Post a Comment