Search This Blog

Monday, June 20, 2011

How to Install multiple Linux Distributions in the same Machine

My requirement is to have the following OS's in my computer.

Windows 7
Redhat Linux 4
Oracle Enterprise Linux 5


First install Windows 7.

Using Windows 7 Disk Manager, create 3 partitions
say
hda5 => 50 GB (For RedHat Linux)
hda6 => 6 GB (For the Swap , we can use the same Swap for other linux install also)
hda7 => 50GB ((For Oracle Linux)

Now this install Redhat Linux 5 , select the root(/) partition as hda5
and swap as hda6. In the install screen please select the option to install the grub.

Now install Oracle Linux 5 , here select the root(/) partition as hda7
and swap as hda6.

In the install do not choose to install the grub option as you already have grub installed
by the first install.

Now Boot the machine in to Redhat Linux and mount the hda7 partition.

mount /dev/hda7 /test

Find out the files under the directory /test/boot directory ,

ls vm* init*

initrd-2.6.18-194.el5.img     vmlinuz-2.6.18-194.el5
initrd-2.6.18-194.el5PAE.img  vmlinuz-2.6.18-194.el5PAE

Now edit the /etc/grub.cong file and add the following entries

title Enterprise Linux (2.6.18-194.el5PAE)
        root (hd0,7)
        kernel /boot/vmlinuz-2.6.18-194.el5PAE ro root=LABEL=/ rhgb quiet
        initrd /boot/initrd-2.6.18-194.el5PAE.img
title Enterprise Linux-base (2.6.18-194.el5)
        root (hd0,7)
        kernel /boot/vmlinuz-2.6.18-194.el5 ro root=LABEL=/ rhgb quiet
        initrd /boot/initrd-2.6.18-194.el5.img

After this restart the machine and now you will see OEL , Windows 7 and Redhat in the grub boot screen.

No comments: