Web Hosting Talk







View Full Version : Configuring GRUB with new kernel


Justin S
06-03-2002, 11:15 PM
Hi Everyone,

I'm running Red Hat 7.2, and I just compiled the new kernel 2.4.18. After finding out that the system is using GRUB instead of LILO (maybe it's a CPanel thing?), I've run into a question. How do I configure GRUB to boot with the new kernel? Here's 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,0)
# kernel /vmlinuz-version ro root=/dev/hda6
# initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Linux (2.4.7-10)
root (hd0,0)
kernel /vmlinuz-2.4.7-10 ro root=/dev/hda6
initrd /initrd-2.4.7-10.img


Would it be...


# 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/hda6
# initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Linux (2.4.18)
root (hd0,0)
kernel /vmlinuz-2.4.18 ro root=/dev/hda6
title Red Hat Linux Old (2.4.7-10)
root (hd0,0)
kernel /vmlinuz-2.4.7-10 ro root=/dev/hda6
initrd /initrd-2.4.7-10.img


Or am I totally off? Also, there isn't a initrd file for the new kernel, so I took that line out. Any help is appreciated.

ToastyX
06-04-2002, 12:18 AM
It has nothing to do with Cpanel. Red Hat 7.2 comes with both GRUB and LILO. You can use either one.

If you compiled and installed the kernel correctly, then the modifications you posted should work.

Justin S
06-04-2002, 10:43 AM
Well, I modified grub.conf with the changes I outlined in my first post, rebooted the server, and... it didn't come back online. Great.

Again I ask, how should grub.conf be configured for the new kernel?

ToastyX
06-04-2002, 11:45 AM
...then grub.conf is not the problem because it looks correct to me. You probably misconfigured the kernel. Did you include the appropriate file system support? If your root partition is ext3, then you need to include ext3 support. Also, make sure the kernel is in the right location with the correct file name, /boot/vmlinuz-2.4.18 in your case.

Justin S
06-04-2002, 11:58 AM
I followed this (http://www.wzz.org.pl/~lnag/pl/kernel_upgrade.htm) guide to upgrading the kernel. I used make oldconfig to configure to kernel, so it should be configured correctly.

Could it have something to do with initrd? I was told I didn't have to create this file for the new kernel.

Thanks for your help.

ToastyX
06-04-2002, 12:22 PM
Oh, well, in that case, if you used Red Hat's stock kernel configuration, then you either need to create an initrd image or include the appropriate file system support. Just recompile the kernel with the appropriate file system support, or create an initrd image using mkinitrd. Check out the mkinitrd man page to learn how to use it. I don't like dealing with initrd, so I just include what's needed into the kernel.