grub boot

Hi,
I’m trying to install 3 OS on 3 HD. They are laid out on the MB as OpenSuse 12.2 on (sda1) 250 GB hdd, Windows 7 on (sdh1) 80GB hddd, and Centos 6.2 on (sdg) 250GB hdd. I can boot to the centos because it was the last OS installed but not the other 2. I can boot individualy if I unplug the the other 2 from the MB. Is suse 12.2 using grub or grub2? Centos uses grub legacy. The output from centos is:

root@localhost dennis]# cat /boot/grub/menu.lst

grub.conf generated by anaconda

Note that you do not have to rerun grub after making changes to this file

NOTICE: You have a /boot partition. This means that

all kernel and initrd paths are relative to /boot/, eg.

root (hd0,0)

kernel /vmlinuz-version ro root=/dev/mapper/vg_livecd-lv_root

initrd /initrd-[generic-]version.img

#boot=/dev/sdf
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.32-279.22.1.el6.i686)
root (hd0,0)
kernel /vmlinuz-2.6.32-279.22.1.el6.i686 ro root=/dev/mapper/vg_livecd-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_LVM_LV=vg_livecd/lv_swap rd_NO_MD quiet rd_LVM_LV=vg_livecd/lv_root SYSFONT=latarcyrheb-sun16 rhgb crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM
initrd /initramfs-2.6.32-279.22.1.el6.i686.img
title CentOS (2.6.32-220.el6.i686)
root (hd0,0)
kernel /vmlinuz-2.6.32-220.el6.i686 ro root=/dev/mapper/vg_livecd-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_LVM_LV=vg_livecd/lv_swap rd_NO_MD quiet rd_LVM_LV=vg_livecd/lv_root SYSFONT=latarcyrheb-sun16 rhgb crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM
initrd /initramfs-2.6.32-220.el6.i686.img
[root@localhost dennis]#

I hav e tried to map (hd0) (hd1) to no avail trying to put windows on the first hd. Any suggestions? Thanks in advance.

If installed openSUSE with the DVD, follow this:
https://forums.opensuse.org/content/128-re-install-grub2-dvd-rescue.html

But once you get to this point:

Your prompt changes to: Rescue:/>
Before doing grub2-install
Please do this:

grub2-mkconfig -o /boot/grub2/grub.cfg

Then do:

grub2-install /dev/sda

Finish of with the exit and reboot

You should now have, at the very least openSUSE booting. If not all OS’s.

If you used a CD to install openSUSE:
https://forums.opensuse.org/content/146-using-livecd-take-over-repair-installed-system.html

Thank you cat 4926. I can boot to the centos drive with no problem, but I can’t boot to the other drives Your reply mentioned grub2; is opensuse grub2 or grub legacy? Centos is grub legacy Do I have to convert one to the other before it will boot all 3 drives? Will it boot the windows drive from grub2? Each of the drives will boot seperately if I unplug the other 2 from the MB.

openSUSE is grub2

But I think you misunderstand what I am asking

You could make it easier to do if you were prepared to install openSUSE again, just point to the same install partitions but set grub like this:
https://dl.dropbox.com/u/10573557/Grub2_Project/grub2-set.png

You can access that once you get here:
https://dl.dropbox.com/u/10573557/12.2_liveCD_Install/13_Install_Summary.jpeg

That should get you booting everything

Thank you cat 4926 but that does not help my problem. Here is the output from fdisk:

root@localhost dennis]# fdisk -l

Disk /dev/sdf: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0007d532

Device Boot Start End Blocks Id System
/dev/sdf1 * 1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sdf2 64 30402 243685376 8e Linux LVM

Disk /dev/sdg: 80.0 GB, 80025280000 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00034399

Device Boot Start End Blocks Id System
/dev/sdg1 * 1 13 102400 7 HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sdg2 13 9730 78046208 7 HPFS/NTFS

Disk /dev/sdh: 250.1 GB, 250058268160 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0003e429

Device Boot Start End Blocks Id System
/dev/sdh1 1 2611 20971520 83 Linux
/dev/sdh2 * 29771 30402 5065729 5 Extended
/dev/sdh3 2611 29771 218158080 83 Linux
/dev/sdh5 29771 30402 5065728 82 Linux swap / Solaris

Partition table entries are not in disk order

Disk /dev/mapper/vg_dennis-lv_root: 53.7 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/vg_dennis-lv_root doesn’t contain a valid partition table

Disk /dev/mapper/vg_dennis-lv_swap: 1577 MB, 1577058304 bytes
255 heads, 63 sectors/track, 191 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/vg_dennis-lv_swap doesn’t contain a valid partition table

Disk /dev/mapper/vg_dennis-lv_home: 194.3 GB, 194267578368 bytes
255 heads, 63 sectors/track, 23618 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/vg_dennis-lv_home doesn’t contain a valid partition table
[root@localhost dennis]#
How do I boot to each drive? Centos is grub and suse is grub2 and drive sdg is Windows7.

OpenSUSE grub2 can boot all of your installed operating systems. What type bios/motherboard are you using, it sounds like you can not select which hard drive to boot from the bios. Is that correct? If it is a fairly newish motherboard you can select which harddrive boots first and then you can have openSUSE boot and use grub2 to boot all the other OS.
Please check to see what order your motherboard/bios selects which hard drive to boot.

I have the choice of 1 hdd, 1 CD/DVDdrive, and 3 USB drives in the boot orfer. The mobo is Gigabyte GA MA78GM US2H with AMD 780G+ SB700 chipset. IT was designed for Windows, but can run linux. How do I get the bios to see the other drives and boot to them?

Couple things, you have one internal hard drive and the rest are all usb drives? As far as I know Windows 7 will not boot from a usb drive so that might be a problem. You can also just learn how to use centos and legacy grub to boot all your other os, I think it should work too. You can also follow caf4926 instructions which should work perfectly to replace the bootloader which is on /sda (centos legacy grub I guess) with the one from openSUSE.

To change your boot drive from bios varies slightly between motherboards but on my Gigabyte board I would either enter the bios (tap the del key on boot up) and then in the “standard settings”, maybe advanced settings you should see something about “hard drive priority” or boot order. You can select that and then play around with the settings. Sorry going off of memory here. The other option is to tap F10 on boot to get a boot menu. Maybe you still have the motherboard manual or can look it up on the web to see for sure how to do it.

Sorry, my bad. When I used the del key I could access the bios and change the boot order. Now I can load the suse and windows drives but I can’t get Centos (grub legacy)to display and boot without changing the boot order in the bios. Can I use Yast to boot to grub legacy? Thanks for all of your help.

but I can’t get Centos (grub legacy)to display and boot without changing the boot order in the bios.

So this suggests that if you switch boot order you can boot Centos. But how is that happening, I mean what grub is loading?

If you have it so as to be able to boot openSUSE, is that using openSUSE grub?
And in that case, if you are running openSUSE and you use your file browser to access the Centos /
Then open a terminal and become su -
And then do

grub2-mkconfig -o /boot/grub2/grub.cfg
grub2-install /dev/sda

Then reboot
Do you now have success?

I can use opensuse (grub2) to boot opensuse and windows7 but not centos (grub legacy). To boot to centos (legacy) I must go into the bios and change the boot order. When I do this, I can only boot to Centos and not the other 2. Centos is installed on (sdf) when you check the fdisk output. I used suse for your mkconfig code and it found grub2 but could not install on centos (legacy).

It used to be possible to boot grub 2 distros from legacy with Eg:

###Don't change this comment - YaST2 identifier: Original name: Some Distro Name###title A_Grub_2_Distro
    root (hd0,6)
    kernel /vmlinuz root=/dev/sda7 ro quiet splash
    initrd /initrd.img

Obviously tou need to change the hd0 and root=
to suit your circumstances

Ok! you have 3 OSs on 1 to each of 3 HDD, openSUSE (sda1), centOS on (sdg1) and window 7 (sdh1)
You are booting with grub and can only see CentOS. No openSUSE or window 7…
Your grub menu.lst file shows CentOS as the only choice. I am not familiar with CentOS as I have never used that distro.

If CentOS was the last OS installed, it most likely over written the MBR in the Boot partition. and during it’s boot configuration failed to detect the other OSs.

I know with openSUSE you can setup the MBR to be in the root partition of the HDD or on the Boot partition of the 1st HDD…
in your setup that would be ‘sda’ … I believe windows 7 can be setup to boot from any HDD…

You may be able to use the bios boot menu to select which HDD and OS to boot. If you can get it to boot openSUSE (sda1) and manage to get to your login prompt… go into ‘yast/boot loader’ and make a change (in Boot Loader Location = ‘Boot from Master Boot Record’ ). when you OK that it should update the MBR on sda to point to grub2 in openSUSE. When grub2 updates it will also locate all bootable drives and their os to include in it menu.

If it is possible in CentOS make the change to where it stores it’s bootloader… make it’s location the root partition of the CentOS HDD

I do not know grub2 commands well enough to assist you that way… I hope this helps…

I have tried to change suse to legacy by using Yast but it still only booted windows and suse and not Centos. Centos is using legacy and yum as a package manager. I could not upgrade centos to grub2 and the terminal sent me back to the yum package manager. Now I have suse (grub2) and windows on boot and don’t find centos. Can I use Yast or yum to make both linux either grub or grub2? Thanks for your help.

Did you re-install grub2 per instructions earlier in this thread? Did you move it to root? You have to have the centos partition mounted so that the grub2 install os-prober can pick it up. I see no reason why this will not work for you. When you re-install grub2 you can see the output and if it picked up the new linux partition. For sure you can add the Centos boot yourself, it is easy, maybe 5 lines added to the 40_custom file. You should check out the openSUSE grub2 page for some tips.