Grub configuration for triple boot Mandriva 2007 / Suse 10.2 / Windows XP
SUSE / openSUSEThis Forum is for the discussion of Suse Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Grub configuration for triple boot Mandriva 2007 / Suse 10.2 / Windows XP
Hi everyone,
I wanted to install Suse 10.2 along with Mandriva 2007 and XP, but ran into a couple of issues regarding grub configuration.
I started by installing Mandriva One 2007 in addition to Windows XP. It installed and set up correctly Lilo as a boot manager. I've been using this distro for a while and I enjoy it.
Prior to Mandriva, I had been using Suse 10.0 x86_64 which was quite good, so I wanted to see if 10.2 x86_64 could suit my taste. Install went fine, and right after I got on the desktop, I entered Yast to modify the Grub settings. I remebered from 10.0 the "Merge with existing grub configurations" option, so I tried that. Stupid me forgot that I had Lilo installed by Mandriva 2007, and not Grub...
I didn't notice that until I first rebooted, and found the only option that was left in grub was... Windows ! Damn !!!
I reinstalled Mandriva so that I could at least boot into my main distro, changed the boot manager into grub, but I still would like to be able to boot in Suse 10.2.
So here is my question (at last... ) : what are the files I need to modify to be able to boot Suse 10.2 ? And do I have to write in them ? I have tried playing with the menu.lst, but to no avail.
My advice would be to install grub to the / partition of the Suse install and then chainload it with the Mandriva grub/lilo. That'll make things really simple. Follow these instructions from within Mandrake
Code:
mkdir /mnt/temp
mount /dev/hda8 /mnt/temp
chroot /mnt/temp
grub-install /dev/hda8
change /dev/hda8 to whatever your suse partition is. This will install grub to the root partition of your suse install. Type "exit" a few times to get out of the chroot and close the terminal.
Then add this to your Mandrake's /boot/grub/menu.lst
Code:
root (hd0,7)
chainloader +1
boot
Again, change (hd0,7) to whatever your root Suse partition is. Since grub starts counting at zero, (hd0,7) => hda8 or (hd1,0) => hdb1...
Thanks for your quick answer and your help. Unfortunately, the chroot command gave the following error :
Code:
[root@obelix guillaume]# mkdir /mnt/temp
[root@obelix guillaume]# mount /dev/sda5 /mnt/temp
[root@obelix guillaume]# chroot /mnt/temp
chroot: ne peut exécuter la commande `/bin/bash': Erreur de format pour exec()
Which could be translated in
Code:
cannot execute command `/bin/bash': Format error for exec()
From some quick googling, it looks like maybe the chroot program wasn't compiled against your current kernel... What does file chroot say?
If you still have problems, you could also set it up from a Live CD (like Knoppix). Just boot the live CD and follow the same steps for installing grub to / partition of Suse. Then reboot into mandrake and modify the grub menu.lst.
Sorry for the late answer, I've been sick and had to stay away from the computer for a while.
Anyway...
Code:
[root@obelix guillaume]# file chroot
chroot: cannot open `chroot' (No such file or directory)
Does it mean that chroot is not installed on my Mandriva ?
Something that might help : I am able to boot into Suse using the DVD. It has an option where it can boot into the installed Suse. Could I use this and then use Yast to install Grub onto my suse "/" partition ?
I have only theoretical knowledge on this particular issue, but it may help:
To boot one Linux from anothers bootloader shouldn't be a problem. All you need to do is to point grub to the kernel of the other distro. You can do this by modifiying menu.lst. Grub itself doesn't need to be installed on the other system, as all required files can be loaded from the first one. You could create an entry in Mandrivas menu.lst like this:
Code:
title SUSE
kernel (hd0,4)/vmlinuz root=/dev/hda7 vga=791
initrd (hd0,4)/initrd
You simply need to point to the correct partition, where the SUSE kernel is installed. Have a look at the quite comprehensive grub manual from suse: http://en.opensuse.org/SDB:The_Boot_Manager_Grub
Hope it helps!
EDIT: Maybe I should mention that I don't think it would help to install grub from SUSE, even if you can boot it from the CD. It will just do that same as it did during you initial installation and ignore the installed Mandriva partition. Unfortunately, most Linux installer automatically recognize a Windows installation, but ignore other Linux systems.
Sorry for the late reply, I have been on skiing vacation.
The above example assumes that hd(0,4) is a boot partition. If the kernel is located on the root partition (as in most cases), the path should point to /boot/vmlinuz. It might have been misleading. Try:
Code:
title openSUSE 10.2
kernel (hd0,4)/boot/vmlinuz root=/dev/sda5 splash=silent vga=791
initrd (hd0,4)/boot/initrd
Mandriva is installed all in one directory, and when it boots the /home directory (for Suse) is mounted as /suse
My menu.lst file is like this:
Code:
# Modified by YaST2. Last modification on Mon Dec 18 07:31:57 UTC 2006
default 0
timeout 8
##YaST - generic_mbr
gfxmenu (hd0,3)/boot/message
##YaST - activate
###Don't change this comment - YaST2 identifier: Original name: openSUSE 10.2###
title Linux - openSUSE 10.2
root (hd0,3)
kernel /boot/vmlinuz-2.6.18.2-34-default root=/dev/hda4 vga=0x317
resume=/dev/hda8 splash=silent showopts
initrd /boot/initrd-2.6.18.2-34-default
###Don't change this comment - YaST2 identifier: Original name: mandriva 2007.0###
title linux - Mandriva 2007.0
kernel (hd0,8)/boot/vmlinuz root=/dev/hda9 resume=/dev/hda8 splash=silent vga=788
initrd (hd0,8)/boot/initrd.img
###Don't change this comment - YaST2 identifier: Original name: windows###
title Windows
rootnoverify (hd0,0)
chainloader (hd0,1)+1
I've cut out a couple of additional entries that boot Suse or Mandriva in safe mode.
The way I do multi-boots with GRUB is to have the 1st instance of Linux install GRUB to the MBR. Then when I do another install, I have it install it's own GRUB in it's root, then I cut and past into the 1st GRUB menu.lst. The extra GRUB's are never used.
I have 4 OS's (Win98se, FC6, Kubuntu 6.10 & Slackware 11.0) on a desktop and that also works fine. Out of habit I keep Windows in the first partition. The only trouble I've had is when Windows trashes it's FAT.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.