LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   grub failing to dual boot after kernel upgrade (https://www.linuxquestions.org/questions/red-hat-31/grub-failing-to-dual-boot-after-kernel-upgrade-4175469423/)

SciGuy73 07-12-2013 01:11 PM

grub failing to dual boot after kernel upgrade
 
Hello,

I have an IBM x3850 with an LSI controller in a dual boot configuration running two RHEL 5.9 installations, one on /dev/sda, one on /dev/sdb.
Everything works fine booting from either disk. I'm using grub 0.97.

I'm booted from sdb, and I've applied patches that put a new 2.6.18-348.12.1.el5 kernel
on the box. Patches have not been applied to sda yet. When I reboot, I get:

-------
Booting 'Red Hat Enterprise Linux Server (2.6.18-348.12.1.el5)'

root (hd1,0)
Filesystem type is ext2fs, partition type 0x83
kernel /vmlinuz-2.6.18-348.12.1.el5 ro root=LABEL=/1

Error 15: File not found
-------

I boot the previous 348.6.1 on sdb and look at the /etc/grub.conf, and it looks ok to me:

-------
default=0
timeout=5
splashimage=(hd1,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux Server (2.6.18-348.12.1.el5)
root (hd1,0)
kernel /vmlinuz-2.6.18-348.12.1.el5 ro root=LABEL=/1
initrd /initrd-2.6.18-348.12.1.el5.img
title Red Hat Enterprise Linux Server (2.6.18-348.6.1.el5)
root (hd1,0)
kernel /vmlinuz-2.6.18-348.6.1.el5 ro root=LABEL=/1
initrd /initrd-2.6.18-348.6.1.el5.img
title Red Hat Enterprise Linux Server (2.6.18-348.4.1.el5)
root (hd1,0)
kernel /vmlinuz-2.6.18-348.4.1.el5 ro root=LABEL=/1
initrd /initrd-2.6.18-348.4.1.el5.img
-------

I look in /boot on sdb and the 348.12.1 files are there.

I ask grub where it thinks things are:

-------
grub> find /vmlinuz-2.6.18-348.6.1.el5
(hd0,0)
(hd1,0)
grub> find /vmlinuz-2.6.18-348.12.1.el5
(hd1,0)
-------

That looks right.

/boot/grub/device.map says:
# this device map was generated by anaconda
(hd1) /dev/sdb

Now the interesting part. If I copy the 348.12.1 files to the sda /boot partition, the system boots
fine from sdb.

It's as if the boot process is looking on hd0/sda for files instead of hd1/sdb. But I don't see why, nor how to fix it.

I noticed this because if I patch sda first, then sdb, I have no problem. But if I do sdb first, it
always fails to boot. This isn't kernel specific, it happens every time a new kernel comes out.
What's going on?

Thanks

malekmustaq 07-13-2013 12:36 PM

Quote:

I noticed this because if I patch sda first, then sdb, I have no problem. But if I do sdb first, it
always fails to boot. This isn't kernel specific, it happens every time a new kernel comes out.
What's going on?

Grub is confused. After upgrading the kernels at both hd0 and hd1, try reinstall the Grub with the "setup" command and reinstall unto the MBR.

Hope that helps.

yancek 07-14-2013 10:23 PM

Quote:

root (hd1,0)
Filesystem type is ext2fs, partition type 0x83
kernel /vmlinuz-2.6.18-348.12.1.el5 ro root=LABEL=/
That indicates Grub is looking in the / of the filesystem for the vmlinuz file.

Quote:

I look in /boot on sdb and the 348.12.1 files are there
If the vmlinuz is in the boot directory, then the Grub entry should be: kernel /boot/vmlinuz...

SciGuy73 07-14-2013 11:19 PM

Quote:

Originally Posted by yancek (Post 4990370)
That indicates Grub is looking in the / of the filesystem for the vmlinuz file.



If the vmlinuz is in the boot directory, then the Grub entry should be: kernel /boot/vmlinuz...


On this system /boot is a separate partition. Under that condition, the grub entry is properly just /. Note that grub finds files ok in /boot as / with the find command, and it boots when I copy the files to sda in /boot.


All times are GMT -5. The time now is 08:57 AM.