How do I multi-boot Linuxes with different disks?

I have 2 hard drives. I have Suse 10.3 installed on one, and 11.0 installed on another. What do I have to do to get a Grub menu where it will have the option to boot from either drive? I’ve been playing around with Yast, but I can’t figure it out.

http://img372.imageshack.us/img372/9855/snapshot2af4.th.png](http://img372.imageshack.us/my.php?image=snapshot2af4.png)

There are several ways to do that.

This is my preferred one:

Add a stanza in grub´s menu.lst of the first system pointing to the vmlinuz and initrd files in the second system.
Take special care to identify clearly the order in which the two disks are listed in BIOS.
That order should match logically that seen by grub, (hd?) and the device name of the boot/root partition where the aforementioned files are stored.

Probably your disks are seen by grub as hd0 and hd1, for the first and second respectively.
So, the stanza pointing to the second system would probably have to refer to hd1 in order to locate second system boot files. If you have a boot partition for the second system, its corresponding grub name will be (hd1,0)

As an alternate solution, you can also have the new stanza in the first system menu.lst to chainload to the boot partition or disk mbr of the second system. This needs the grub loader to be installed in the boot record of boot partition or disk mbr of your second system.
Using this last approach you´ll be displayed two grub menu prompts: the first corresponding to the system in your first disk, and the second corresponding to the system in your second disk (optionally if you selected the chainload option in the first one).

Hope this help.

Yes, that helps a lot, thanks! Now I don’t have to keep changing the disk boot sequence in BIOS.

I added a chainloader stanza in grub’s menu.lst like you said. Here’s my menu.lst file:

Modified by YaST2. Last modification on Mon Jul 21 15:08:56 EDT 2008

default 0
timeout 8
##YaST - activate

###Don’t change this comment - YaST2 identifier: Original name: linux-2.6.22.17-0.1-default###
title openSUSE 10.3 - 2.6.22.17-0.1
root (hd0,1)
kernel /boot/vmlinuz-2.6.22.17-0.1-default root=/dev/disk/by-id/scsi-SATA_WDC_WD2500BB-00_WD-WCANK6434316-
part2 vga=0x317 resume=/dev/sda1 splash=silent showopts
initrd /boot/initrd-2.6.22.17-0.1-default
chainloader +1

###Don’t change this comment - YaST2 identifier: Original name: linux###
title openSUSE 10.3 - 2.6.22.17-0.1
root (hd0,1)
kernel /boot/vmlinuz-2.6.22.17-0.1-bigsmp root=/dev/disk/by-id/scsi-SATA_WDC_WD2500BB-00_WD-WCANK6434316-p
art2 vga=0x317 resume=/dev/sda1 splash=silent showopts
initrd /boot/initrd-2.6.22.17-0.1-bigsmp

###Don’t change this comment - YaST2 identifier: Original name: failsafe-2.6.22.17-0.1-default###
title Failsafe – openSUSE 10.3 - 2.6.22.17-0.1
root (hd0,1)
kernel /boot/vmlinuz-2.6.22.17-0.1-default root=/dev/disk/by-id/scsi-SATA_WDC_WD2500BB-00_WD-WCANK6434316-
part2 vga=normal showopts ide=nodma apm=off acpi=off noresume edd=off 3
initrd /boot/initrd-2.6.22.17-0.1-default

###Don’t change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe – openSUSE 10.3 - 2.6.22.17-0.1
root (hd0,1)
kernel /boot/vmlinuz-2.6.22.17-0.1-bigsmp root=/dev/disk/by-id/scsi-SATA_WDC_WD2500BB-00_WD-WCANK6434316-p
art2 vga=normal showopts ide=nodma apm=off acpi=off noresume edd=off 3
initrd /boot/initrd-2.6.22.17-0.1-bigsmp

###Don’t change this comment - YaST2 identifier: Original name: xen###
title XEN – openSUSE 10.3 - 2.6.22.17-0.1
root (hd0,1)
kernel /boot/xen.gz
module /boot/vmlinuz-2.6.22.17-0.1-xen root=/dev/disk/by-id/scsi-SATA_WDC_WD2500BB-00_WD-WCANK6434316-part
2 vga=0x317 resume=/dev/sda1 splash=silent showopts
module /boot/initrd-2.6.22.17-0.1-xen

#added 7-23-08#
title SUSE11.0
rootnoverify (hd1,1)
makeactive
chainloader (hd1,1)+1

I think I still have something wrong though, because when my computer starts booting up, I go to this screen:

http://img376.imageshack.us/img376/1836/hpim0462oi7.th.jpg](http://img376.imageshack.us/my.php?image=hpim0462oi7.jpg)

And I select Suse 11.0. But then it takes me to this error screen:

http://img382.imageshack.us/img382/2562/hpim0463fx7.th.jpg](http://img382.imageshack.us/my.php?image=hpim0463fx7.jpg)

Where it says “File not found.” I have grub for each Suse version installed in the MBR of each hard drive. The root partition of each hard drive is partition #2 (sda2 and sdb2). Maybe that error message means it can’t find the MBR in the hard drive with Suse 11.0 on it.

Hi.
The chainloader stanza in the menu.lst file of the first disk (that you want to use as the primary OS selector) looks fine.
According to that, grub will delegate the task of loading other OSes to the loader (grub itself) installed in the boot sector of the second partition in your second disk.
Double check that this is what you really have.

Assuming it is, your main Open Suse 11 entry in the menu.lst in the second disk should look like this

title SUSE11.0
root (hd1,1)
kernel /vmlinuz-xxxxxxxxxx …
initrd /initrd-xxxxxxx …

The above assumes that the second system has a partition mounted on /boot. The error in the second screenshot seems to suggest that grub (second) is trying to retrieve
the kernel and the initrd corresponding to Open Suse 11 from the second partition of the first disk, which is not correct.

This is probably the error.

Take into account that the device you specify in root (hd1, 1) is the one where grub will try to fetch the kernel and the initrd files from.
If your Open Suse 11 system doesn’t happen to have a /boot partition, but only a root one, you will have to change the above stanza and make it look like this:

title SUSE11.0
root (hd1,1)
kernel /boot/vmlinuz-xxxxxxxxxx
initrd /boot/initrd-xxxxxxx

Hope this help.

Hi
Sorry I didn’t see the last paragraph in you last post.

You mentioned that you have grub installed in the mbr of each disk.

So, according to this, the menu.lst of the first system should look like

#added 7-23-08#
title SUSE11.0
rootnoverify (hd1)
makeactive
chainloader +1

The menu.lst in the second system then would be

title SUSE11.0
root (hd1,1)
kernel /boot/vmlinuz-xxxxxxxxxx …
initrd /boot/initrd-xxxxxxx …

Hope this helps.

Thanks for your help. I finally got it to work. Sorry, but I gave you the wrong information earlier. The Suse 10.3 hard drive had grub installed in the MBR, and the Suse 11.0 hard drive had grub installed in the root partition.

Here’s what I did: I simply copied the entries in the menu.lst file from the 11.0 drive to the menu.lst file on the 10.3 drive. I then changed hd(0,1) to hd(1,1) in the copied entries. So now it boots from the drive with 10.3 on it, but lets me choose either 10.3 or 11.0, but defaults to 11.0. So here’s what /boot/grub/menu.lst contains on the 10.3 hard drive (the red 1 is the only thing I had to change when I copied the entries over):

Modified by YaST2. Last modification on Mon Jul 21 15:08:56 EDT 2008

default 0
timeout 8
##YaST - activate

###Added on 7-23-08 to let me boot openSUSE 11.0 from the Seagate Disk###
###Don’t change this comment - YaST2 identifier: Original name: linux###
title openSUSE 11.0 - 2.6.25.11-0.1
root (hd1,1)
kernel /boot/vmlinuz-2.6.25.11-0.1-default root=/dev/disk/by-id/scsi-SATA_ST3160023A_5JS6HQ1K-part2 resume
=/dev/sda1 splash=silent showopts vga=0x317
initrd /boot/initrd-2.6.25.11-0.1-default

###Don’t change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe – openSUSE 11.0 - 2.6.25.11-0.1
root (hd1,1)
kernel /boot/vmlinuz-2.6.25.11-0.1-default root=/dev/disk/by-id/scsi-SATA_ST3160023A_5JS6HQ1K-part2 showop
ts ide=nodma apm=off acpi=off noresume edd=off x11failsafe vga=0x317
initrd /boot/initrd-2.6.25.11-0.1-default
#########################################################################

###Don’t change this comment - YaST2 identifier: Original name: linux-2.6.22.17-0.1-default###
title openSUSE 10.3 - 2.6.22.17-0.1
root (hd0,1)
kernel /boot/vmlinuz-2.6.22.17-0.1-default root=/dev/disk/by-id/scsi-SATA_WDC_WD2500BB-00_WD-WCANK6434316-
part2 vga=0x317 resume=/dev/sda1 splash=silent showopts
initrd /boot/initrd-2.6.22.17-0.1-default

###Don’t change this comment - YaST2 identifier: Original name: failsafe-2.6.22.17-0.1-default###
title Failsafe – openSUSE 10.3 - 2.6.22.17-0.1
root (hd0,1)
kernel /boot/vmlinuz-2.6.22.17-0.1-default root=/dev/disk/by-id/scsi-SATA_WDC_WD2500BB-00_WD-WCANK6434316-
part2 vga=normal showopts ide=nodma apm=off acpi=off noresume edd=off 3
initrd /boot/initrd-2.6.22.17-0.1-default

###Don’t change this comment - YaST2 identifier: Original name: xen###
title XEN – openSUSE 10.3 - 2.6.22.17-0.1
root (hd0,1)
kernel /boot/xen.gz
module /boot/vmlinuz-2.6.22.17-0.1-xen root=/dev/disk/by-id/scsi-SATA_WDC_WD2500BB-00_WD-WCANK6434316-part2 vga=0x317 resume=/dev/sda1 splash=silent showopts
module /boot/initrd-2.6.22.17-0.1-xen

And here’s what the /boot/grub/menu.lst file looks like in the 11.0 hard drive:

Modified by YaST2. Last modification on Tue Jul 22 17:42:56 EDT 2008

default 0
timeout 8
##YaST - generic_mbr
gfxmenu (hd0,1)/boot/message
##YaST - activate

###Don’t change this comment - YaST2 identifier: Original name: linux###
title openSUSE 11.0 - 2.6.25.11-0.1
root (hd0,1)
kernel /boot/vmlinuz-2.6.25.11-0.1-default root=/dev/disk/by-id/scsi-SATA_ST3160023A_5JS6HQ1K-part2 resume=/dev/sda1 splash=silent showopts vga=0x317
initrd /boot/initrd-2.6.25.11-0.1-default

###Don’t change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe – openSUSE 11.0 - 2.6.25.11-0.1
root (hd0,1)
kernel /boot/vmlinuz-2.6.25.11-0.1-default root=/dev/disk/by-id/scsi-SATA_ST3160023A_5JS6HQ1K-part2 showopts ide=nodma apm=off acpi=off noresume edd=off x11failsafe vga=0x317
initrd /boot/initrd-2.6.25.11-0.1-default

I’m not sure if I even need this last entry

title 10.3
rootnoverify (hd0,1)
chainloader +1
###################################

It finally works, and with the new 11.0 entries at the top, it boots into Suse 11.0 after a timeout of 8 seconds. I really appreciate your help.

Just to add a note. It is not nescissary to install a boot loader of all the os though some may say it is a plus just in case one os failed to boot. But sometimes if you are not paying to much attention while doing the installation with installing the boot loader you will hit the wall and end up with an unbootable system that requires another rescue and hours finding the problem.

With my case I choose one distro for a boot loader (suse) and add the kernel and initrd lines of the additional distros to the menu.lst of the booting os

Yes, you are right.
As I said in my first post, my preferred way to deal with such multihomed linux system is to control the OS selection from a single menu.lst, as you mention.
Nevertheless, if you want to chainload among boot loaders, you need them to be installed in the boot record of the devices you want to chain to/from.