Results 1 to 3 of 3
Hi,
I'm new here. My distro is ClearOS, which is RHEL so I assume this is the right place.
I moved my sytem from an old PATA-drive to a bigger ...
- 08-07-2010 #1Just Joined!
- Join Date
- Aug 2010
- Posts
- 2
Grub pointing to wrong kernel
Hi,
I'm new here. My distro is ClearOS, which is RHEL so I assume this is the right place.
I moved my sytem from an old PATA-drive to a bigger SATA. ClearOS uses LVM for the root directory and the swap directory, so this VolumeGroup was moved using lv-commands. I left the old hda drive in for the time being and hda also remained the BIOS start up disk. /boot is at hda2.
Now, clearly there are 2 VolGroup00/LogVol00 's: on hda and sda.
My menu.lst is:
In order to pick up the VolGroup on sda I just changed /etc/fstab according to the equivalent of:default 0
timeout 5
splashimage=(hd0,1)/grub/splash.xpm.gz
hiddenmenu
title Linux (2.6.18-194.8.1.v5)
root (hd0,1)
kernel /vmlinuz-2.6.18-194.8.1.v5 ro root=/dev/VolGroup00/LogVol00 video=vesafb vga=0x313
initrd /initrd-2.6.18-194.8.1.v5.img
rootnoverify (hd0,0)
chainloader +1
(on the sda drive the /boot partition is the first one).mount /dev/sda1 /boot
Don't know why its picks the bigger VolGroup/LogVol but it works beautifully for me. I can clearly verify the bigger harddisk is used.
Eventually I wanted to unload my hda. I copied /boot from the hda disk to sda, changed (hd0,1) to (hd0,0) as /boot is in different locations, later found out that I needed to do the same for the location of the splash image and did that as well, but I don't get access to my new VolGroup.
I did an /sbin/mkinitrd and a grub-install on the new sda but no luck. I have seen various error messages. The latter one is that grub loader 1.5 is active, giving me a grub prompt. BTW, I do not get the splash screen anymore, so it's obviously already wrong before that.
I thought I understood most of grub but I seem to miss something here.
Thanks for considering this problem. In the meantime I can happily use my new sata drive by booting from the pata drive.
Roel
- 08-08-2010 #2
Hi and Welcome !
Post the contents of /etc/fstab and grub.conf files here. Post the output of fdisk -l command too.It is amazing what you can accomplish if you do not care who gets the credit.
New Users: Read This First
- 08-08-2010 #3Just Joined!
- Join Date
- Aug 2010
- Posts
- 2
Thanks!
Actually, my pata disk is hdg, not hda.
BIOS = hdg: runs great, uses /dev/sda3 as /
BIOS = sda: fails in grub phase
Only now I notice the difference between my 2 VolGroup partitions. On hdg this is type 8e while on sda it's 83. Indeed, hdg5 was automatically made by ClearOS while I manually made sda3 and used lvmove to move the 2 directories in the VolGroup. This difference has been there from the outset and it has never influenced the working of my system.
[root@atom7 ~]# cat /etc/fstab
/dev/VolGroup00/LogVol00 / ext3 defaults 1 1
/dev/sda1 /boot ext3 defaults 1 2
# LABEL=/boot /boot ext3 defaults 1 2
devpts /dev/pts devpts gid=5,mode=620 0 0
tmpfs /dev/shm tmpfs defaults 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs defaults 0 0
/dev/VolGroup00/LogVol01 swap swap defaults 0 0
/var/www/html /var/flexshare/shares/atom7.xxxx.yyy bind defaults,bind 0 0
[root@atom7 ~]#
[root@atom7 ~]# fdisk -l
# Note: this is my PATA
# In the post I called it /dev/hda but actually it's /dev/hdg
# hdg3 is extended, hdg5 logical LVM
Schijf /dev/hdg: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Eenheden = cylinders van 16065 * 512 = 8225280 bytes
Apparaat Boot Start Einde Blokken Id Systeem
/dev/hdg1 1 2550 20482843+ 83 Linux
/dev/hdg2 2551 2562 96390 83 Linux
/dev/hdg3 2563 5354 22426740 5 Uitgebreid
/dev/hdg4 5355 19457 113282347+ 83 Linux
/dev/hdg5 2563 5354 22426708+ 8e Linux LVM
Schijf /dev/sda: 1500.3 GB, 1500301910016 bytes
255 heads, 63 sectors/track, 182401 cylinders
Eenheden = cylinders van 16065 * 512 = 8225280 bytes
Apparaat Boot Start Einde Blokken Id Systeem
/dev/sda1 * 1 10 80293+ 83 Linux
/dev/sda2 11 274 2120580 82 Linux-swap / Solaris
/dev/sda3 275 182401 1462935127+ 83 Linux
[root@atom7 ~]#
[root@atom7 ~]#
[root@atom7 ~]# mount /dev/sda1 /boot3
[root@atom7 ~]# ls -l /boot3
totaal 9439
-rw-r--r-- 1 root root 77593 aug 7 19:05 config-2.6.18-194.8.1.v5
drwxr-xr-x 2 root root 1024 aug 7 19:46 grub
-rw------- 1 root root 3306482 aug 7 19:05 initrd-2.6.18-194.8.1.v5.img
-rw------- 1 root root 3214613 aug 7 19:05 initrd-2.6.18-194.8.1.v5.rh.img
drwx------ 2 root root 12288 aug 7 18:56 lost+found
-rw-r--r-- 1 root root 120238 aug 7 19:05 symvers-2.6.18-194.8.1.v5.gz
-rw-r--r-- 1 root root 979074 aug 7 19:05 System.map-2.6.18-194.8.1.v5
-rw-r--r-- 1 root root 1906100 aug 7 19:05 vmlinuz-2.6.18-194.8.1.v5
[root@atom7 ~]# cat /boot3/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 have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,1)
# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/sda
default 0
timeout 3
# splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Linux (2.6.18-194.8.1.v5)
root (hd0,0)
kernel /vmlinuz-2.6.18-194.8.1.v5 ro root=/dev/VolGroup00/LogVol00 video=vesafb vga=0x313
initrd /initrd-2.6.18-194.8.1.v5.img
title Win XP
rootnoverify (hd0,0)
chainloader +1
[root@atom7 ~]#
[root@atom7 ~]# umount /boot
[root@atom7 ~]# umount /boot3
[root@atom7 ~]# mount /dev/hdg2 /boot3
[root@atom7 ~]# ls -l /boot3
totaal 21823
-rw-r--r-- 1 root root 76694 feb 2 2010 config-2.6.18-164.11.1.v5
-rw-r--r-- 1 root root 76693 dec 2 2009 config-2.6.18-164.6.1.v5
-rw-r--r-- 1 root root 77593 jul 15 07:44 config-2.6.18-194.8.1.v5
drwxr-xr-x 2 root root 1024 aug 6 16:10 grub
-rw------- 1 root root 3287887 jul 26 11:04 initrd-2.6.18-164.11.1.v5.img
-rw------- 1 root root 3231409 jan 10 2010 initrd-2.6.18-164.6.1.v5.img
-rw------- 1 root root 3306482 jul 28 23:49 initrd-2.6.18-194.8.1.v5.img
-rw------- 1 root root 3214613 aug 6 11:45 initrd-2.6.18-194.8.1.v5.rh.img
drwx------ 2 root root 12288 jul 24 2009 lost+found
-rw-r--r-- 1 root root 116411 feb 2 2010 symvers-2.6.18-164.11.1.v5.gz
-rw-r--r-- 1 root root 116413 dec 2 2009 symvers-2.6.18-164.6.1.v5.gz
-rw-r--r-- 1 root root 120238 jul 15 07:49 symvers-2.6.18-194.8.1.v5.gz
-rw-r--r-- 1 root root 964835 feb 2 2010 System.map-2.6.18-164.11.1.v5
-rw-r--r-- 1 root root 964677 dec 2 2009 System.map-2.6.18-164.6.1.v5
-rw-r--r-- 1 root root 979074 jul 15 07:44 System.map-2.6.18-194.8.1.v5
-rw-r--r-- 1 root root 1887764 feb 2 2010 vmlinuz-2.6.18-164.11.1.v5
-rw-r--r-- 1 root root 1886932 dec 2 2009 vmlinuz-2.6.18-164.6.1.v5
-rw-r--r-- 1 root root 1906100 jul 15 07:44 vmlinuz-2.6.18-194.8.1.v5
[root@atom7 ~]#
[root@atom7 ~]# cat /boot3/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 have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,1)
# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/sda
default 0
timeout 5
splashimage=(hd0,1)/grub/splash.xpm.gz
hiddenmenu
title Linux (2.6.18-194.8.1.v5)
root (hd0,1)
kernel /vmlinuz-2.6.18-194.8.1.v5 ro root=/dev/VolGroup00/LogVol00 video=vesafb vga=0x313
initrd /initrd-2.6.18-194.8.1.v5.img
title Win XP
rootnoverify (hd0,0)
chainloader +1
[root@atom7 ~]#


Reply With Quote