installing multiple linux distributions easily

Okay, so often it's nice to try out different linux distro's on a single box and try them on the native hardware and not in a vm.

So here is an easy way on how to do it. I'm going to assume that you allready have a working grub where you boot ubuntu/Windows/freeBSD/Opensolaris etc... w/e you want to run, in fact even things that dont boot from grub.

Essentialy we have grub in our MBR. There we are going to add entries to chainload grub but this time from the partition that has grub installed. So lets say we have ubuntu with grub installed in the MBR.

So open /boot/grub/menu.lst on the partition that holds the grub that is in the MBR. Change these settings

timeout 4 # you will want to change this to the wait in seconds you want at the boot menu
#hiddenmenu # you will want to comment this out with '#'

Once you've done this you can check out your grub by rebooting. You will see a menu if you didnt have one allready and different options.

Now when installing a new OS, choose to install grub (or w/e boot loader lilo etc...) to go not onto the MBR but onto a partition, for example /dev/sda2. Then open menu.lst again and add a section as so :

title Intel Moblin, Chainloading /dev/sda2
root (hd0,1)
makeactive
chainloader +1

The most important setting is "root (hd0,1). This basically tells grub the partition number, but it starts numbering from 0 instead of 1. So /dev/sda1 becomes (hd0,0), /dev/sdc3 becomes (hd2,2) etc...

With this method you can chainload to logical partitions and not just primary partitions. So you can have as many OS's as you want.

Okay I hope this made good sense and was helpfull!

Tags: ,

Leave a Reply