[NTLUG:Discuss] kernel upgrade

JR Newsletters jrnewsletters at jcrcomputing.com
Sat Sep 14 20:16:20 CDT 2002


Geremy L. Hamlett wrote:

>Ok,  I am bit of a newbie at the kernel aspect.  I am using Red Hat 7.3 
>currently.  In the past I have upgraded a kernel using the rpm method.  
>Now I think I am ready to make the leap to compile my own.  There is no 
>problem with my system, I just want to do it.  So....
>
I've recompiled the 2.4.19 kernel on my RH7.3 system and it works just 
fine <otherwise you wouldn't see this response> :)

>I have downloaded the 2.4.19 tarball, but have some questions before I 
>take the plunge.
>
>1)  All the online how-to's say to unpack the kernel in /usr/src/
>    The documentation with the kernel says not to use /usr/src/ to unpack 
>the kernel because of libraires might conflict.  Where should I and why?
>
/usr/src is fine, but you do have to take care about /usr/src/linux 
symlink which points to your current kernel directory.  I usually delete 
the /usr/src/linux symlink and the /usr/src/linux-2.4 symlink before 
unpacking the kernel so that your previous kernel does not get 
overwritten.  Some of the kernels in the past will unpack into /linux 
(which I generally move to the proper version...ex:  mv /usr/src/linux  
/usr/src/linux-2.4.18).  The good news is that the linux-2.4.19 actually 
unpacks as  linux-2.4.19 so you shouldn't have any problems.  Just 
remember to 'ln -s /usr/src/linux-2.4.19 linux' and 'ln -s 
/usr/src/linux-2.4.19 linux-2.4' after unpacking so that you restore 
your symlinks and can compile the kernel correctly.  (Have I confused 
you now?).  My kernel source is in /usr/src/linux-2.4.19.

>2)  I know Red Hat sometimes does things a little diffrently, than say 
>debian or slackware, Is there any thing special about compiling a kernel 
>on a recent Red Hat release?
>
Nope,  The stock kernel (ie - what you downloaded) has always worked 
just fine with my Red Hat systems (including RH7.3).  In fact, I prefer 
the stock kernel over what Red Hat uses for their kernel on installation.

>3)  Where do I look to find the modules I have installed.  I want to know 
>so when I compile the new kernel I know which modules to include.
>
First of all, when you configure your kernel before you compile, either 
by 'make config' or 'make menuconfig <my preference>' you will specify 
what is a module and what is included in the kernel.  Second, after you 
compile your kernel and modules, they will be located in 
/lib/modules/2.4.19 (for the 2.4.19 kernel).  You will usually specify 
what loads in /etc/modules.conf .

>Like I said, I have read all the documentation I can find on how to do 
>this.  Thats not the problem.  It just that somethings are a little vauge, 
>and I need ask the experts (NTLUG) for some direction, and mabey a little 
>encouragement.
>
You should do just fine....Follow the steps as stated in the README 
file, and you should be OK.  I will tell you that you should know 
exactly what devices are on your machine so you can configure the 
machine for those devices.  Also, Red Hat uses the gcc-2.96 kernel, but 
it works just fine for compiling the kernel.

The steps I take after unpacking the kernel and 'cd'ing to the kernel 
directory are:

make mrproper
make config
make dep
make clean
make bzImage (some people to make zlilo here - Consult the kernel 
documentation)
make modules
make modules_install
depmod -a 2.4.19  (for my linux-2.4.19 kernel)
cp System.map /boot/System-map-2.4.19
cp arch/i386/boot/bzImage /boot/vmlinuz-2.4.19

Add My new kernel entry to /etc/grub.conf (I use grub).  See 'man grub' 
or 'info grub' for more details on grub.

And finally, reboot.

>If there is any thing else I should know please speak up.
>
>Thanks for your time,
>  
>
Good Luck.  The first time is the hardest...afterwards it is a 'piece of 
cake'.







More information about the Discuss mailing list