LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Multi-boot Distributions (https://www.linuxquestions.org/questions/linux-newbie-8/multi-boot-distributions-276931/)

svinka 01-12-2005 11:27 AM

Multi-boot Distributions
 
Hi, everyone! I have a question, which maybe found on google or this forum, but i didn't find it, so i'm asking everyone who knows this.
I want to multi-boot at least three different distros and XP, if possible. The problem is that i have 2 hard drives, and i'm gonna use them both for distros. So it will be like this, XP and distro #1 on the first hard drive and the other 2 on the second hard drive.
I understand, that installing, setting up is not hard. The worst part is the boot loader. I use GRUB and it when i configure it during the installation of the third linux, it only lets me chose one of 2 boot sections for GRUB. But how can i put them both in there?
You can just give me a link if you know one, maybe i was just really stupid to find it.

i'd be really glad if you help me!

thanks in advance

320mb 01-12-2005 11:44 AM

using grub, I triple boot..........LFS,Slackware,win98se
so it's possible............

http://www.ibiblio.org/pub/Linux/doc...with-GRUB.html

Rick485 01-12-2005 01:08 PM

The link that 320mb provided is good but, I had already also started to type up a response, so I am going to go ahead and post this. There are at least three different alternative menthods of booting multiple versions of Linux and Windows. Both of my computers have several several different Linux distros on them. Each computer does it differently and each computers has two hard drives. When you install an operating, only one bootloader can have its first stage installed on the Master Boot Record(MBR) of the first hard drive. The MBR is the first sector of the first hard drive and is not part of any of the partitions. Other copies of LILO or GRUB can be installed elsewhere and chainloaded from the first one but for the moment I will assume that you will only be using one boot loader and not chainloading other bootloaders. So anyway boot up into the version of Linux that installed the bootloader and open the menu.lst file for editing with a text editor such as gedit or vi. It can most likely be found here be here:

/boot/grub/menu.lst

Some Linux distros also have a file called grub.conf that is in the /etc/ directory or the /boot/grub/ direcotry, with most distros it is usually just a symbolic link to the menu.lst file. If you open it instead, you would actually be editing the same file. You can edit the file to include the other verions of Linux. As an example, below is a portion of my menu.lst file that I use to boot several different Linux distros and Windows:

title Vector 4.0 Linux
kernel (hd0,10)/boot/vmlinuz-2.4.22-scsi root=/dev/hda11 ro hdc=ide-scsi hdd=ide-scsi vga=773

title Slackware 10 Linux
kernel (hd0,9)/boot/vmlinux.06.12.2004 root=/dev/hda10 ro hdc=ide-scsi hdd=ide-scsi vga=773

title Red Hat 9 Linux
kernel (hd1,4)/vmlinuz-2.4.20-6 ro root=/dev/hdb5 initrd=/initrd-2.4.20-6.img hdc=ide-scsi hdd=ide-scsi vga=773

title Libranet 2..8.1
kernel (hd0,2)/boot/vmlinuz-2.4.21 root=/dev/hda3 ro hdc=ide-scsi hdd=ide-scsi vga=773

title Windows
rootnoverify (hd0,0)
chainloader +1

The above examples may differ slightly from the syntax used in your grub file. An alternatative syntax for the Slackware 10 section that means exactly the same thing would be this:

title Slackware 10 Linux
root (hd0,9)
kernel /boot/vmlinux.06.12.2004 root=/dev/hda10 ro hdc=ide-scsi hdd=ide-scsi vga=773

In either example notice that the root partition is specified twice and but that the (hd0,9) number is different than the root=/dev/hda10 number. They actually refer to the same partition on the same hard driv. The number in brackets is counting from 0 so, in that case, the first hard drive is 0 and the first partition is 0. But, where it says root=/dev/hda10 it is counting from 1, so the first hard drive is 1 as the first partition is 1. They acutually refer to the same partiton. In most cases they would both refer to the same partition. The root (hd0,9) is where GRUB expects to find the kernel image and root=/dev/hda10 is where the kernel should mount the partition. Occasinally, in rare cases, those are in different places.

In the above example also notice that Slackware is on the first hard drive on hda10 and Red Hat 9 is on the second hard drive on hdb5. In Linux the first hard drive is hda and the second one is hdb. That Section for booting Slackware Linux it says root=/dev/hda10 which would be the 10th partiton on the first hard drive. Where it says (hd0,9) it is telling us that that its kernel is on the 10th partition (counting from 0) on the first hard drive. Notice that again with that notation they start counting from 0. The numbering scheme for each is different because GRUB likes to start counting hard drives and partitions from 0 and the Linux kernel likes to start counting hard drives and partitions from 1 instead.

The hdc=ide-scsi tells the kernel that I have a CD-RW that is an IDE device on hdc pretending to be a SCSI device. I also have a second CD-RW on hdd. I your verion of Linux is using a 2.6.x kernel instead of a 2.4.x kernel you would probably not need to do that. The VGA=773 is for when I am not using X-Windows and am at the command prompt. It says to make the text smaller. You might or might not get away with doing that depending on which video card or monitor you are using.

There is also another alternative way to do multibooting. You can use a seperate copy of LILO or GRUB for each version of Linux. The extra copies of LILO or GRUB ones can be installed on the first sector of the partition that extra copy of Linux is being installed on. Most installation programs for Linux offer that as an option. If you do that you will need to later manually edit the first copy of GRUB or LILO to tell it how to chainload the other boot loader. The syntax is just like in the portion where Windows is booted by transferring control to the bootloader for Windows. Here is an article that describes how to use that method:

http://distrowatch.com/weekly.php?issue=20040614

There is also a third possible method of mult-booting that I have not bothered to mention..

svinka 01-12-2005 06:23 PM

Wow! Thank you 320mb & Rick485. You both gave really interesting info, and i tried, but since my partition table is kinda weird & i probably messed up MBR a little, i'm gonna zero-fill my hard drive and start over new.

I really liked the distrowatch link, with the guide and everything. I'm gonna do something close to that, and if i do everything right, i can install up to 6 linux distros on one HD & get rid of the slow second one.
Anyways, a little off-topic. Even as a newb, i really liked linux, even after reading all of those bad reviews. Yes, nothing is perfect, but for ME, linux solved many problems already! I'll try different distros, then, maybe, even do my own LFS!

And a little of my own opinion to finish this thread (don't think there is point to continue) i can say that the best distro i saw to date is knoppix. It's just my own opinion! And i have reasons. I started another thread in SuSE/Novell section (my first linux) cuz i had problems with my usb desktop mic. Guess what, after just plugging the mic in, while being in knoppix, it recognized it as a mic, and everything worked! It's not stereo, though, but I can live with that. So I'm thinking of installing it on my HD as primary, or secondary Linux.

Again, I say that i am really surprised of Linux. What happened from the start, when Linus wrote the first ever in the whole world linux kernel, 'till now - is impossible to imagine!

Ok, i just had to post it :-) Thanks again, guys.

svinka


All times are GMT -5. The time now is 11:56 PM.