LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   Multibooting multiple Linux distros (http://www.linuxquestions.org/questions/linux-general-1/multibooting-multiple-linux-distros-798173/)

duckster 03-26-2010 11:48 PM

Multibooting multiple Linux distros
 
Greeting!

Noobish question on multibooting multiple Linux distros.

I have four of the current major Linux distributions. Each has been installed and run individually (no other Linux distribution installed) in a dual-boot configuration with Windoze. No problem.

What I want to do is install all four Linux distributions and multiboot them. Reading the internet it would seem this is a simple task with GRUB. The short version being - install a Linux distro with a separate /boot partition for GRUB and use GRUB to boot the other Linux distros from the GRUB boot menu.

So I installed one of the Linux distros with a separate partition for /boot. The distro installer installed GRUB in /boot and correctly setup a dual-boot configuration with Windoze. GRUB was installed to the MBR.

Next I installed a second Linux distro in its own root partition and told the distros installer NOT to install GRUB to the MBR, but rather, to the boot sector of the root partion of the second Linux distro. Installation was uneventful (and I could access the second Linux partition from the first installed Linux distro, things looked ok).

Then I added to following to the installed (MBR - /boot) GRUB's menu.lst:

Code:

title lixux distro 2
root (hd0,7)
chainloader +1

After which I rebooted the system and the new entry for the second Linux distro now appears in the GRUB boot menu. I selected the second Linux distro from the boot menu and got the following GRUB error:

Error 5 : Partition table invalid or corrupt

Hmmm...fdisk, GParted, and Super GRUB Disk do not think the partition table is toast and I can still boot to the first Linux distro and Windoze from GRUB.

Next I check the menu.lst created by the installer of the second Linux distro which is as follows:

Code:

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You do not have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /, eg.
#          root (hd0,7)
#          kernel /boot/vmlinuz-version ro root=/dev/hde8
#          initrd /boot/initrd-version.img
#boot=/dev/hde8
default=0
timeout=5
splashimage=(hd0,7)/boot/grub/splash.xpm.gz
hiddenmenu
title Scientific Linux (2.6.18-164.2.1.el5)
        root (hd0,7)
        kernel /boot/vmlinuz-2.6.18-164.2.1.el5 ro root=LABEL=/ rhgb quiet
        initrd /boot/initrd-2.6.18-164.2.1.el5.img
title Other
        rootnoverify (hd1,0)
        chainloader +1

Okay, it is different, so let's copy the relevant part to the installed menu.lst and try again. So the following was added to the installed GRUB's menu.lst (of course removing the original chainloader entry attempt):

Code:

splashimage=(hd0,7)/boot/grub/splash.xpm.gz
hiddenmenu
title Scientific Linux (2.6.18-164.2.1.el5)
        root (hd0,7)
        kernel /boot/vmlinuz-2.6.18-164.2.1.el5 ro root=LABEL=/ rhgb quiet
        initrd /boot/initrd-2.6.18-164.2.1.el5.img

Upon rebooting the system the boot menu shows the change. Selecting the second Linux distro from the boot menu results in the same GRUB Error 5 and I can still boot to the first Linux distro and Windoze.

Checking and rechecking I cannot find the problem. I suspect there is something I missed in the multiboot configuration but have no clue as to what it might be.

For yuks, here is the output from fdisk:

Code:

linux-xqyj:~ # fdisk -l

Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x2b072b07

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1  *          1      14593  117218241    7  HPFS/NTFS

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000e0a41

  Device Boot      Start        End      Blocks  Id  System
/dev/sdb1              1        262    2104483+  83  Linux
/dev/sdb2            263        1306    8385930  82  Linux swap / Solaris
/dev/sdb3            1307      60801  477893587+  f  W95 Ext'd (LBA)
/dev/sdb5            1307      16971  125829081  83  Linux
/dev/sdb6          16972      22193    41945683+  83  Linux
/dev/sdb7          22194      32636    83883366  83  Linux
/dev/sdb8          32637      37735    40957686  83  Linux

Note that sdb above is actually the boot disk where GRUB is installed in the MBR, boot order is selected in the BIOS and works correctly.

Also, there are no duplicate partition labels:

Code:

cosmic@linux-xqyj:~> ls /dev/disk/by-label -l
total 0
lrwxrwxrwx 1 root root 10 2010-03-26 16:33 DRV1_VOL1 -> ../../sda1
lrwxrwxrwx 1 root root 10 2010-03-26 16:33 SUSE -> ../../sdb6
lrwxrwxrwx 1 root root 10 2010-03-26 16:33 \x2f -> ../../sdb8
cosmic@linux-xqyj:~>


Any help?

TIA!

Mr-Bisquit 03-27-2010 12:01 AM

Too many extended partitions.
What's the memory on the machine?
You can create a swapfile within each distro.
No chainloader is needed for a linux distro, just BSD and windows.
You should have this for each one:

Code:

title                Debian GNU/Linux, kernel 2.6.26-2-686
root                (hd0,0)
kernel                /boot/vmlinuz-2.6.26-2-686 root=/dev/hda1 ro quiet
initrd                /boot/initrd.img-2.6.26-2-686

Update grub and the entries should go in automatically.
If not, remember and edit as above. You should be able to mount with any liveCD and copy the config from eachnonto a usb stick.
Mount the stick from the main distro and add/edit the entries into /boot/grub/menu.lst


All times are GMT -5. The time now is 04:07 AM.