Web Hosting Talk







View Full Version : rh 7.2 + new kernel + grub


clocker1996
02-26-2002, 04:22 PM
Hi
last night i downloaded the linux 2.5.0 kernel, and recompiled it in /usr/local/src/linux

after i compiled, i copied the system map and vmlinuz files
cd /boot
cp /usr/local/src/linux-2.5.0/arch/i386/boot/bzImage ./vmlinuz-2.5.0
cp /usr/local/src/linux-2.5.0/System/map /boot/System.map-2.5.0

etc
however, this box is redhat 7.2 using grub to boot. I haven't used grub much, and i really don't want to mess up anything. I usually use lilo, alot easier for me.

i ran cat /etc/grub.conf
and i saw:


# 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


So then what i did was i used the mkinitrd or whatever command to create a .img file
(in /boot) and made the file name:
initrd-2.5.0.img

then i backed up grub.conf
then i edited grub.conf and it now looks like this:

# cat /etc/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 (2.5.0)
root (hd0,0)
kernel /vmlinuz-2.5.0 ro root=/dev/hda6
initrd /initrd-2.5.0.img
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

After saving, i ran ls -al /boot, and it looks like this now:
[root@mtr-internet root]# ll /boot/
total 3.3M
drwxr-xr-x 4 root root 1.0k Aug 27 15:31 .
drwxr-xr-x 20 root root 1.0k Aug 28 02:54 ..
-rw-r--r-- 1 root root 5.7k Jun 24 2001 boot.b
-rw-r--r-- 1 root root 612 Jun 24 2001 chain.b
drwxr-xr-x 2 root root 1.0k Feb 24 2002 grub
-rw-r--r-- 1 root root 320k Feb 24 2002 initrd-2.4.7-10.img
-rw-r--r-- 1 root root 258k Aug 27 14:56 initrd-2.5.0.img
lrwxrwxrwx 1 root root 14 Feb 24 2002 kernel.h -> kernel.h-2.4.7
-rw-r--r-- 1 root root 405 Feb 24 2002 kernel.h-2.4.7
drwxr-xr-x 2 root root 12k Feb 24 2002 lost+found
-rw-r--r-- 1 root root 23k Jun 24 2001 message
lrwxrwxrwx 1 root root 20 Feb 24 2002 module-info -> module-info-2.4.7-10
-rw-r--r-- 1 root root 13k Sep 6 2001 module-info-2.4.7-10
-rw-r--r-- 1 root root 640 Jun 24 2001 os2_d.b
lrwxrwxrwx 1 root root 19 Feb 24 2002 System.map -> System.map-2.4.7-10
-rw-r--r-- 1 root root 425k Sep 6 2001 System.map-2.4.7-10
-rw-r--r-- 1 root root 476k Aug 27 15:31 System.map-2.5.0
lrwxrwxrwx 1 root root 16 Feb 24 2002 vmlinuz -> vmlinuz-2.4.7-10
-rw-r--r-- 1 root root 783k Sep 6 2001 vmlinuz-2.4.7-10
-rw-r--r-- 1 root root 985k Aug 27 15:15 vmlinuz-2.5.0
====================================

The machine went down for a reboot, however when i run uname -a i still see the redhat defualt kernel
2.4.7-10 #1 Thu Sep 6 17:27:27 EDT 2001 i686 unknown

Does anyone konw what I am doing wrong?

cabalstudios
02-26-2002, 04:51 PM
Theres nothing wrong with that grub.conf, the only difference is, I normally add new Kernels below the old Kernel, and change the default to 1, I've never had probs with that...

Let me know if u still struggle....

some advice, if its rh7.2 make sure you got ext3 support built into the kernel, as 7.2 uses ext3

Regards

The Prohacker
02-26-2002, 06:24 PM
Not much of a use to install 2.5.0

http://www.kernel.org/pub/linux/kernel/v2.5/README


Linux-2.5.0 is exactly the same as 2.4.15, except for a version
number change. Subsequent releases diverge, with Marcelo Tosatti
maintaining the stable 2.4.x kernels, while the 2.5.x kernels are
for development work.


Sorry, but not much I can help you with grub....

clocker1996
02-26-2002, 06:53 PM
but a second processor is being put in
and i needed to compile a new kernel for dual processor support + this onboard nic that is on it (sis900)

so that is why i did it
and if there is no differnece bewteen then thats ok, it doesnt matter that much, does it?

the issue here is i need to get the new one working, and i can't, for whatever reason.

serve-you
02-26-2002, 11:45 PM
First, the warning... You should not be using the 2.5.x kernel on a production machine.

Have you tried using absolute addressing instead of relative in grub.conf.
/boot/vmlinuz-2.x....
instead of
/vmlinuz-2.x....

-Dan