Thursday, November 12, 2009

Trriple Boot: Windows Debian CentOS

Hi All,

Dual or Tripple booting with Linux is very simple and easy nowadays. You dont have to worry about multiple kernels or anything.

Here I have used Debian 5.0.1 Lenny x64, CentOS 5.4 X64 and WinXP. This can be used for any other linux distrubution.
First you have to install windoze on to your disk, this is becuse it overwrites the what ever there in the MBR.
Linux only just added its entry to the MBR that, it. isn't that cool .... :)


I have given 50GB for Windoze, and this I have made as the primary partition. Then i made the rest of the space as the
extended partition, and created 7 logical partition inside the extended partition.
This is because a harddisk can have only 4 primary partition or 3 primary partition and one extended partition and in the
extended partition you have upto 15 partition.

now I have the below listed partitions available and how I allocated them for my Operating Systems.

/dev/sda1 - Windoze ( primary )
/dev/sda2 - for both the Linux OS's ( extended partition )

/dev/sda3 and /dev/sda4 is been kept reserved names for the any primary partition created in future
so the next partition inside the extended partition starts with /dev/sda5

/dev/sda5 - /boot ( Debian )
/dev/sda6 - /home ( Debian )
/dev/sda7 - / ( Debian )
/dev/sda8 - swap ( Debian and CentOS ) this swap partition is shared by the 2 OS
/dev/sda9 - /boot ( CentOS )
/dev/sda10 - /home ( CentOS )
/dev/sda11 - / ( CentOS )


And now I installed Debian, becuase I want debian's grub to have all the etries for other OS. Linux is smart enough to
detect the windows entry in the MBR and what it does is. It will over the MBR but wont forget to add the windoze entry
to it . So now When the system boots I have Debian Kernels and Windoze XP to make a choice to boot.

And now the we need to have the third OS on the machine, Here comes the tricky part. I will be installing CentOS as my third OS
Put the instalation DVD and start the install. At the sage when you need to install the grub , choose an option to install grub
somewhere else other than the MBR, I choosed to install them in my /boot partition of CentOS. because nothing will disturb it :).
so once the installation is completed and reboots it will show you the Debian boot loader, which has the entry for
Debian and Windoze. boot into debian and have to manually edit the menu.lst inside /boot/grub/

go to the /boot/grub/ directory and edith the menu.lst file and make this addition
title CentOS_5.4-x86_64
root (hd0,8) # Remeber that it count from 0 so (hd0,8) means /dev/sda9
chainloader +1

So now what you have is , when you boot the machine you wil get the debian boot loader with the option for
1) Debian Kernel
2) Debian Kernel ( single user mode )
3) CentOS_5.4-x86_64
4) Microsoft Windowx XP professional

Now when you select CentOS , you will now get the boot loader of CentOS ant can boot to any CentOS Kernel.

The same way you can use more number of Linux Distro installed in one machine.

Please let me know your Comments.

Thanks
Peeths

2 comments: