PDA

View Full Version : [all variants] [SOLVED] triple boot linux, blank grub when Xubuntu starts to load



j1mc
July 1st, 2008, 01:22 AM
[SOLVED] Please see the comments from unutbu and my follow-up comments for how this was fixed.

Hi All,

I'm writing here because I feel like I've done a good amount of searching, and I still can't find a way to fix this.

Basically, I'm triple-booting between CentOS 5.2 (which has it's grub installed on the MBR), openSUSE 11, and Xubuntu 8.04. CentOS and openSUSE load just fine, but Xubuntu gets stuck on a blank grub screen, requiring me to enter grub commands. After I enter some grub commands, it starts to boot, but then hangs when it gets to something about a cd-rom.

Xubuntu loads just fine when I set it to load grub from the MBR, but then CentOS will experience pretty much the same problems that Xubuntu does (i.e., blank grub screen, won't fully boot).

Here's the background info on my setup:

My fstab entry:


jim@springfield ~]$ su -c '/sbin/fdisk -l'
Password:

Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 9457 75963321 5 Extended
/dev/sda2 9458 9729 2184840 82 Linux swap / Solaris
/dev/sda5 * 1 16 128457 83 Linux
/dev/sda6 17 1107 8763426 83 Linux
/dev/sda7 1108 1123 128488+ 83 Linux
/dev/sda8 1124 2270 9213246 83 Linux
/dev/sda9 2271 2286 128488+ 83 Linux
/dev/sda10 2287 3494 9703228+ 83 Linux
/dev/sda11 3495 9457 47897766 83 Linux

My grub menu.lst file in CentOS:

su -c 'cat /boot/grub/menu.lst'
Password:
# 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,4)
# kernel /vmlinuz-version ro root=/dev/sda6
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
#splashimage=(hd0,4)/grub/splash.xpm.gz
#hiddenmenu

title openSUSE 11
root (hd0,6)
kernel /vmlinuz root=/dev/sda7 ro
initrd /boot/initrd
chainloader +1

title Xubuntu 8.04.1
root (hd0,8)
kernel /vmlinuz-2.6.24-19-generic root=UUID=410c151a-4781-40bc-850b-c156e406b736 ro quiet splash
initrd /initrd.img-2.6.24-19-generic
chainloader +1

title CentOS (2.6.18-92.1.6.el5)
root (hd0,4)
kernel /vmlinuz-2.6.18-92.1.6.el5 ro root=LABEL=root rhgb quiet
initrd /initrd-2.6.18-92.1.6.el5.img
title CentOS (2.6.18-92.el5)
root (hd0,4)
kernel /vmlinuz-2.6.18-92.el5 ro root=LABEL=root rhgb quiet
initrd /initrd-2.6.18-92.el5.img


My /etc/fstab file from CentOS:

LABEL=root / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
LABEL=swap swap swap defaults 0 0
/dev/sda11 /mnt/share ext3 defaults 1 3


Some neato grub "find" commands:

grub> find /boot/grub/stage1
(hd0,4)
(hd0,6)
(hd0,8)

grub> find /grub/stage1
(hd0,4)
(hd0,6)
(hd0,8)


The 'automagic' portion of the grub entry on Xubuntu's /boot/grub/menu.lst file:

## ## End Default Options ##

title Ubuntu 8.04.1, kernel 2.6.24-19-generic
root (hd0,8)
kernel /vmlinuz-2.6.24-19-generic root=UUID=410c151a-4781-40bc-850b-c156e406b736 ro quiet splash
initrd /initrd.img-2.6.24-19-generic
quiet


I realize that I've pasted a fair amount of code there, but hopefully that will help someone to troubleshoot this with me. Basically, I want the CentOS grub entry to be installed on the MBR, but the openSUSE and Xubuntu grub entries to be installed in the root partition of their respective installs.

The openSUSE boot process works as-is now. If someone could assist with this, I'd appreciate it. Thanks!

Jim

PmDematagoda
July 1st, 2008, 01:55 AM
I think you may have got the locations wrong since they are supposed to be:-

kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=410c151a-4781-40bc-850b-c156e406b736 ro quiet splash
initrd /boot/initrd.img-2.6.24-19-generic
or perhaps GRUB got it wrong, anyway, give that a try and see if that works.

j1mc
July 1st, 2008, 02:24 AM
Thanks for your reply, PmDematagoda. When I put /boot in front of both vmlinuz and initrd, I got a grub error 15 message. :/

I've tried quite a few different options. Do you think that the boot flag on the sda5 partition (that's my CentOS boot partition) may have something to do with it? I'm also not sure if I should have all of those grub listings in (hd0,X).

loligager
July 1st, 2008, 03:31 AM
Well, i dont know if this will work, I had a diffrent problem, but try rebuilding the mbr.

Do this command "fdisk /mbr"
This will rebuild the mbr, If that does not work, get the live ubuntu cd.
Load it up, and go to https://help.ubuntu.com/community/GrubHowto


It basically says:
# Boot your computer up with Ubuntu CD
# Open a terminal window or switch to a tty.
#

Go SuperUser (that is, type "sudo -s"). Enter root passwords as necessary.
# Type "grub"
# Type "find /boot/grub/stage1". You'll get a response like "(hd1,0)". Use whatever your computer spits out for the following lines.
# Type "root (hd1,0)", or whatever your harddisk + boot partition numbers are for Ubuntu.
# Type "setup (hd1,0)", ot whatever your harddisk nr is.
# Quit grub by typing "quit".
# Reboot and remove the bootable CD.


If all fails try this site http://linuxmint.com/wiki/index.php/How_to_repair_your_grub


Hope this helps
:guitar: ROCK on

j1mc
July 1st, 2008, 03:39 AM
Thanks, loligager. Here's the thing, when I enter

root (hd0,8) (which is one of the items in the /boot/grub/stage1 list...)

I don't get anything like this:
Filesystem type is ext2fs, partition type 0x83

(that is one of the items from the "http://linuxmint.com/wiki/index.php/How_to_repair_your_grub" page). I'm not sure what the problem could be.

I've tried using the super grub disk to fix things, but it hasn't helped this situation.

confused57
July 1st, 2008, 03:57 AM
You might try a configfile entry to boot Xubuntu:

title Xubuntu
configfile (hd0,8)/boot/grub/menu.lst

unutbu
July 1st, 2008, 03:57 AM
The chainloader +1 command works when GRUB is handing off to another bootloader.
It would be normally be used like this:


title Xubuntu 8.04.1
root (hd0,8)
chainloader +1
boot

*if* you installed GRUB on the partition (hd0,8). If you haven't installed GRUB on the partition (hd0,8), then don't use chainloader +1.

The same goes for SUSE.

I wonder if you did not install GRUB on either (hd0,8) or (hd0,6), then the chainloader +1 command here


title openSUSE 11
root (hd0,6)
kernel /vmlinuz root=/dev/sda7 ro
initrd /boot/initrd
chainloader +1

is screwing up Xubuntu because the SUSE boot stanza really ends after the initrd line, and the chainloader +1 command is therefore becoming part of the Xubuntu boot stanza.

If you did not install GRUB on either (hd0,8) or (hd0,6), then I suggest removing both "chainloader +1" lines.

I also suggest keeping the "/boot" that PmDematagoda
suggested. Your Xubuntu installation would have to be different from the standard installation to have your boot files in your root directory rather than in /boot.

j1mc
July 1st, 2008, 04:54 AM
Hey, thanks, unutbu. You were on the right track - I think it was the chainloader entry that caused the problems. I removed the chainloader entries, and now xubuntu boots w/o a hitch.

Adding the /boot... beginnings of the lines did result in a grub Error 15, but keeping the "/boot" out let me boot up just fine. I will mark this topic as fixed. =)