bsmyth77
November 20th, 2010, 11:41 AM
I have a laptop with one hard disk partitioned 3 ways with vista on the first partition, CentOS 5.5 on the second and Ubuntu 10.04 on the third. I installed CentOS last over a Fedora installation. Before that the GRUB 2 on the Ubuntu partition was doing the bootloading and everything was fine. Now GRUB 1 on the CentOS partition has the job and I can't load Ubuntu. The problem seems to be that GRUB can't read anything on the Ubuntu partition. Here's some info:
Here's fdisk:
[root@seven ~]# fdisk -l
Disk /dev/sda: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 12752 102424576 7 HPFS/NTFS
/dev/sda2 12752 25503 102424576 83 Linux
/dev/sda3 25503 37782 98633728 83 Linux
/dev/sda4 37783 38913 9084727 5 Extended
/dev/sda5 37783 38913 9084726 82 Linux swap / Solaris
Here's what grub gives me. Notice that it doesn't like any file on the 3rd partition.
GNU GRUB version 0.97 (640K lower / 3072K upper memory)
[ Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists the possible
completions of a device/filename.]
grub> root
(fd0): Filesystem type unknown, partition type 0x0
grub> find /boot/grub/stage1
(hd0,1)
grub> root (hd0,2)
Filesystem type is ext2fs, partition type 0x83
grub> cat /root.txt
Error 2: Bad file or directory type
I can however mount the 3rd partition and read /root.txt
[root@seven ~]# ls /mnt/ubuntu/
bin etc lib opt sbin tmp vmlinuz.old
boot home lost+found proc selinux usr
cdrom initrd.img media root srv var
dev initrd.img.old mnt root.txt sys vmlinuz
[root@seven ~]# cat /mnt/ubuntu/root.txt
this is /
Here's /boot/grub/grub.conf:
[root@seven ~]# cat /boot/grub/grub.conf
# 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,1)
# kernel /boot/vmlinuz-version ro root=/dev/sda2
# initrd /boot/initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,1)/boot/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-194.el5)
root (hd0,1)
kernel /boot/vmlinuz-2.6.18-194.el5 ro root=LABEL=/ rhgb quiet
initrd /boot/initrd-2.6.18-194.el5.img
title Windows Vista
rootnoverify (hd0,0)
chainloader +1
title Ubuntu
root (hd0,2)
# chainloader +1
kernel /boot/vmlinuz-2.6.32-25-generic ro root=/dev/sda3 rhgb quiet
initrd /boot/initrd.img-2.6.32-25-generic
I previously tried chainloader +1 but that failed. Vista loads fine. The vmlinuz and initrd files are there. I've tried (hd0,2)/boot/vmlinuz-2.6.32-25-generic but that also doesn't work. I'm out of ideas. I can think of two solutions that would be acceptable: fix GRUB on the CentOS partition to load Ubuntu, or switch the MBR to use GRUB 2 on the Ubuntu partition and hopefully I'll be able to load CentOS from there.
Thanks in advance.
Here's fdisk:
[root@seven ~]# fdisk -l
Disk /dev/sda: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 12752 102424576 7 HPFS/NTFS
/dev/sda2 12752 25503 102424576 83 Linux
/dev/sda3 25503 37782 98633728 83 Linux
/dev/sda4 37783 38913 9084727 5 Extended
/dev/sda5 37783 38913 9084726 82 Linux swap / Solaris
Here's what grub gives me. Notice that it doesn't like any file on the 3rd partition.
GNU GRUB version 0.97 (640K lower / 3072K upper memory)
[ Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists the possible
completions of a device/filename.]
grub> root
(fd0): Filesystem type unknown, partition type 0x0
grub> find /boot/grub/stage1
(hd0,1)
grub> root (hd0,2)
Filesystem type is ext2fs, partition type 0x83
grub> cat /root.txt
Error 2: Bad file or directory type
I can however mount the 3rd partition and read /root.txt
[root@seven ~]# ls /mnt/ubuntu/
bin etc lib opt sbin tmp vmlinuz.old
boot home lost+found proc selinux usr
cdrom initrd.img media root srv var
dev initrd.img.old mnt root.txt sys vmlinuz
[root@seven ~]# cat /mnt/ubuntu/root.txt
this is /
Here's /boot/grub/grub.conf:
[root@seven ~]# cat /boot/grub/grub.conf
# 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,1)
# kernel /boot/vmlinuz-version ro root=/dev/sda2
# initrd /boot/initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,1)/boot/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-194.el5)
root (hd0,1)
kernel /boot/vmlinuz-2.6.18-194.el5 ro root=LABEL=/ rhgb quiet
initrd /boot/initrd-2.6.18-194.el5.img
title Windows Vista
rootnoverify (hd0,0)
chainloader +1
title Ubuntu
root (hd0,2)
# chainloader +1
kernel /boot/vmlinuz-2.6.32-25-generic ro root=/dev/sda3 rhgb quiet
initrd /boot/initrd.img-2.6.32-25-generic
I previously tried chainloader +1 but that failed. Vista loads fine. The vmlinuz and initrd files are there. I've tried (hd0,2)/boot/vmlinuz-2.6.32-25-generic but that also doesn't work. I'm out of ideas. I can think of two solutions that would be acceptable: fix GRUB on the CentOS partition to load Ubuntu, or switch the MBR to use GRUB 2 on the Ubuntu partition and hopefully I'll be able to load CentOS from there.
Thanks in advance.