This is a read-only archive. Find the latest Linux articles, documentation, and answers at the new Linux.com!

Linux.com

Feature

Dual-booting multiple Linux distros

By Kevin Russo on December 28, 2004 (8:00:00 AM)

Share    Print    Comments   

All the Linux flavors I have tried have no problem dual-booting with Windows, but how do you boot multiple Linux flavors, like Fedora and Ubuntu? This is a great way to have your favorite distribution on the first drive (hda) and experiment with the hundreds of others on a second drive (hdb). I found many procedures by Googling, but most of them concentrated on booting two distros on the same hard drive. However, this is a very simple procedure.

I have found that if you try to dual-boot Linux with Linux, the second flavor that you install overwrites the existing boot loader and the first distro seems to vanish. To solve this problem, don't install the boot loader of the second distro. You should be able to find an option for this as you go through the install process.

I know what you're thinking -- if I don't install the boot loader, how will I boot the system?

Let's assume that the bootloader is on the first hard drive (hda) from your original distro. You need to copy certain files from the /boot directory of the hdb drive to the /boot directory of the hda drive. To do this, you must first mount the hdb drive while logged in as the root user. Since this is only a temporary mount point, I just use the floppy directory:

mount/dev/hdb1 /mnt/floppy

Some of the newer distros now use the /media directory for mount points, so if the above command doesn't work, try:

mount /dev/hdb1 /media/floppy

You should see an icon appear on the desktop that looks like a diskette. Enter that drive, and cd /mnt/floppy/boot or cd /media/floppy/boot.

There are three files you need to copy to the /boot directory of the first hard drive (hda). The first is System.map, which will look something like System.map-2.6.9-1.6_FC2 (which is the System.map for the 2.6.9.-1.6 kernel from Fedora Core 2). The other two files will have identical numeric suffixes, after prefixes of vmlinuz and initrd. Once you locate these three files, copy them to the /boot directory of the first hard drive (hda). When copying the initrd file, make sure to copy it exactly as you see it, including the .img extension that will be someplace in the name of the file.

Now cd /boot to change to the /boot directory of your first hard drive (hda). You should see the three new files added to the directory.

Now there's only one step left -- add a stanza to GRUB, the boot loader file. Change to the /boot/grub directory and open the file menu.lst in your favorite text editor. Scroll down a few lines and add the new stanza under the one for your existing distro, skipping a line between them. It should look something like this:

title "whatever you want to call your new distro"
        root (hd1,0)
        kernel<nobr> <wbr></nobr>/boot/vmlinuz"Your Kernel Number" ro root=LABEL=/
        initrd<nobr> <wbr></nobr>/boot/initrd"Your Kernel Number".img

Note that this is a case-sensitive and space-sensitive document. That means that root=label is different from root=LABEL, and there is no space after the "=".

If you've done things right, you can now reboot your machine and you will see your new entry in the boot menu. Select it and you will boot into your new distro.

Share    Print    Comments   

Comments

on Dual-booting multiple Linux distros

Note: Comments are owned by the poster. We are not responsible for their content.

More complicated than it needs to be.

Posted by: Anonymous Coward on December 28, 2004 07:15 PM
I am multibooting WinXP, Fedora and Ubuntu. I simply reformatted my hard drive, partitioned part of the drive for NTFS leaving half the drive unformatted the reinstalled WinXP. I then used Ubuntu to create three partions hda3, hda5, hda6 formating all for ext3. I made hda3 the root partion for Ubuntu. When Ubuntu asks you if you want to install grub in the mbr say no and type in<nobr> <wbr></nobr>/dev/hda# (The # is the number of you root partions in my case hda3). I then installed Fedora to hda5. When it comes to setting up the grub You have to add Ubuntu by clicking on add selecting the drive and giving it a label.

The extra partition I plan to set up as<nobr> <wbr></nobr>/data and I will share my wordprocessing files etc. on this partions. I had a technique for doing this but have lost it somewhere. (I had this sort of setup on a desktop before with Win98, Fedora and knoppix debian.)

For newbies there is no messing around editing text files. It does show another cool thing about linux. There is often more than one way to do something.

At the end of the day "If the cat catches mice it doesn't matter if it is black or white."

#

Re:More complicated than it needs to be.

Posted by: Anonymous Coward on December 29, 2004 04:19 AM
yes, use always one bootloader for each installed system.

after a kernel update in one of the systems the bootloader will be updated too.

#

relief joint

Posted by: Anonymous Coward on May 28, 2006 02:04 PM
[URL=http://painrelief.fanspace.com/index.htm] Pain relief [/URL]

  [URL=http://lowerbackpain.0pi.com/backpain.htm] Back Pain [/URL]

  [URL=http://painreliefproduct.guildspace.com] Pain relief [/URL]
[URL=http://painreliefmedic.friendpages.com] Pain relief [/URL]
[URL=http://nervepainrelief.jeeran.com/painrelief<nobr>.<wbr></nobr> htm] Nerve pain relief [/URL]

#

It's so simple

Posted by: Anonymous Coward on December 29, 2004 08:52 PM
I am quad-booting multiple linux distros.

#

And if I overwrote the first grub installation...?

Posted by: Anonymous Coward on May 10, 2005 04:21 PM
Hi, I've made the tragic error of re-installing Fedora's grub over Ubuntu's one, and now I can't boot the Ubuntu partition.

Is there any way to edit the menu.lst and get it working?

#

this works well

Posted by: Anonymous Coward on September 14, 2005 04:17 AM
I'm now running a dual boot of ubuntu and ubuntu 64bit thanks to this article

something to add though, if your setting this up at once, you'll probably going to want one partition to see another anyway, so just do that instead of the whole floppy thing at install

#

Yes it rather easy, however...

Posted by: Administrator on December 30, 2004 10:12 AM
Besides going thru the countless hours in configuring the system. Especailly if you are new to Linux , make a stop by www.distrowatch.com and download the different live CD distros that are listed on there Statics page. Everyone should have at least one live CD distro to test hardware to make sure the hardware is compatible with Linux. If you have the extra funds purchase VMware and run multiple vitural OS's

#

Dual-booting multiple Linux distros

Posted by: Anonymous [ip: 86.139.234.30] on October 01, 2007 09:47 PM
No joy. tried to dual boot Sabayon and Mandriva, but Sabayon doesn't put a vmlinux file in it's boot directory, so am dead in the water....

#

Just doesn't work

Posted by: Anonymous [ip: 86.139.234.30] on October 01, 2007 10:15 PM
Can't put this together. An example of a finished config file would help. the files from my distro's boot dir don't match the files he says **should** be there.

#

Dual-booting multiple Linux distros

Posted by: Anonymous [ip: 32.97.110.142] on February 25, 2008 07:46 PM
Hi all, i need your expertise on the following issue.

I have 2 x 160gig hard disks on my PC. I created a 60gig partition on first hard disk and installed Windows 2003 Server first. Thing goes well.

I would like to install the following Linux OSs on the rest of the hard disks:

RedHat Linux 4 Update 5
RedHat Linux 5 Update 1
Suse Linux 10.3

I have one the above installs in the order I listed. After I rebooted the machine, I am now getting a Suse Linux boot loader which I expected. Then I manually updated the /boot/grub/menu.lst file on Suse partition to add the other Redhat partitions. I was able to add the Redhat Linux 4 Update 5 successful as the kernel files are still existed in the RH 4 partition. However, when I tried to add RH 5 partition, it seems to missing all its kernel files in /boot directory for RH 5. Now, I could only able to boot Windows, RH 4 and Suse Linux. Which is not that bad. But I would still love to get my RH 5 boot up from Suse Linux boot loader.

I think I have done something wrong during the Suse Linux installation which Suse Linux might have wiped out the RH 5 /boot filesystem somehow.

My question are:


What is the best way to install this type of multiple Linux OSs? Does it support?

If I follow the instructions above not having to install the boot loader for my next subsequence Linux install, would this work for me?

Is it best way to have each OS to own their own /boot filesystem so that it does not override each other during the installation?


Any suggestion is greatly appreciated....


A side question. Let say I have Windows, RH 4 and RH 5 installed and boot loader is working fine. When I make any partition modification from Computer Management in Windows OS, would it mess up the GRUP boot loader? I have experienced this that this has happened to me multiple times. After I deleted a NTFS partion from Windows OS, rebooted the machine will cause the boot loader failing to load and I get a GRUB> prompt. This drive me nuts. I could not find a way to fix it until I do a Linux rescue install again.

Any good suggestion on this one as well to avoid getting a GRUB> prompt?





David.

#

Dual-booting multiple Linux distros

Posted by: Anonymous [ip: 32.97.110.142] on February 25, 2008 07:49 PM
Not sure why my previous post was not format it properly. Try this post again.

====================

Hi all, i need your expertise on the following issue.

I have 2 x 160gig hard disks on my PC. I created a 60gig partition on first hard disk and installed Windows 2003 Server first. Thing goes well.

I would like to install the following Linux OSs on the rest of the hard disks:

RedHat Linux 4 Update 5
RedHat Linux 5 Update 1
Suse Linux 10.3

I have one the above installs in the order I listed. After I rebooted the machine, I am now getting a Suse Linux boot loader which I expected. Then I manually updated the /boot/grub/menu.lst file on Suse partition to add the other Redhat partitions. I was able to add the Redhat Linux 4 Update 5 successful as the kernel files are still existed in the RH 4 partition. However, when I tried to add RH 5 partition, it seems to missing all its kernel files in /boot directory for RH 5. Now, I could only able to boot Windows, RH 4 and Suse Linux. Which is not that bad. But I would still love to get my RH 5 boot up from Suse Linux boot loader.

I think I have done something wrong during the Suse Linux installation which Suse Linux might have wiped out the RH 5 /boot filesystem somehow.

My question are:


What is the best way to install this type of multiple Linux OSs? Does it support?


If I follow the instructions above not having to install the boot loader for my next subsequence Linux install, would this work for me?


Is it best way to have each OS to own their own /boot filesystem so that it does not override each other during the installation?


Any suggestion is greatly appreciated....


A side question. Let say I have Windows, RH 4 and RH 5 installed and boot loader is working fine. When I make any partition modification from Computer Management in Windows OS, would it mess up the GRUP boot loader? I have experienced this that this has happened to me multiple times. After I deleted a NTFS partion from Windows OS, rebooted the machine will cause the boot loader failing to load and I get a GRUB> prompt. This drive me nuts. I could not find a way to fix it until I do a Linux rescue install again.

Any good suggestion on this one as well to avoid getting a GRUB> prompt?





David.

#

This story has been archived. Comments can no longer be posted.



 
Tableless layout Validate XHTML 1.0 Strict Validate CSS Powered by Xaraya