Friday, February 4, 2011

A Word on Partitioning


These days it's common for us to have at least couple of OS'es on our PC's / Notebooks. Those of us who are geeker (hey! No offence non-geeks! Being a simple user is perhaps painless experience considering we geeks screw up our workstations!) usually have multiple OS'es lying around. 
Many people who dabble in multiple OS'es use virtual machines but when you need to see the close interaction of an OS with hardware or when the VM Performance doesn't appeal you or when the situation demands a hardware installation, you're needed to install the OS on the desktop/ Notebook. 

A few years ago keeping multiple OS'es in parallel was very difficult what with the complexity and configurations and all. But these days the things have improved so well that hardly any special configuration is required if you don't try anything exotic. We'll take a brief look at the chain of things that sit between multiple OS'es. 
After your computer does the POST, according to settings in your computer BIOS, a media is selected for loading the OS from. This is your HDD/ 'CD/DVD Drive'/ LAN Adapter (for network boot)/ USB Drive/ Serial Port etc. Now your HDD usually has a MBR. This MBR contains the program that starts up your OS. This program is called The Boot Loader
Usually every OS has it's own Boot Loader, and there are Multi OS Loaders too. Anyway using one of these you can have multiple OS'es starting up comfortably. 

Now we're concentrating on The Partitions so we'll move ahead instead of going into any details here. Your HDD can have at most 4 partitions which is a limitation placed due to the way the MBR is structured. These are called Primary Partitions. And usually they're accessed as sda1,sda2, sda3,sda4. With bigger HDD's people started needing more number of partitions and so the Logical Partitions are born. So we can create any number of logical partitions inside a Primary partition. The main difference between logical partition and Primary partition is that a Primary Partition can be set bootable while a Logical Partition cannot! 
Anyway here's a quickie! Create 4 primary partitions acc. to the amount of space your OS'es  are going to need. Lets say I have a 500GiB HDD that means 465GB Usable Space. So I'll create 3 Partitions each with 50GB, which will leave me 315GB of free space for my big partition which will have the Logical Partition Nest. I'll create a 200/250GB Partition for my Data and cut remaining space into 40/50GB sizes so as to make room for more OS'es. That allows me to put in 2-3 OS'es in addition to 3 on the 3 primary partitions and all this on only one HDD. If you have more space you can create more exotic configuration. 
Foll. is the infographic for my configuration: 
(I got carried away in the artistic aspects!)

Anyway this way we ca have a good Boot Loader like Linux's Grub sit on MBR and we can install all other OS'es in partitions. E. G. My Notebook has 4 OS's on it - namely Windows 7/ Ubuntu 10.04/ Linux Mint 10 and a Custom Flavor of KUbuntu that we use in my Company. 

Note that you must partition the HDD like this with the first OS you install. Trying to get it in shape after you have one or two OS'es and 100GB of data is pain in the behind and potentially dangerous for your data. 

No comments:

Post a Comment