Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how do i upgrade my kernel? 4

Status
Not open for further replies.

farley99

MIS
Feb 12, 2003
413
US
how do i upgrade my kernel?

# uname -a
Linux localhost.localdomain 2.4.18-3 #1 Thu Apr 18 07:32:41 EDT 2002 i686 unknow n
 
Here's the basic steps on how you make and install a kernel.I'll assume that you already know the basics of Linux.

1: Go get a stable kernel (2.4.20 is a good stable kernel) from Get the full version. It's a hefty 26 MB.

2: Now you should have linux-2.4.20.tar.bz2 . Decompress the whole archive to /usr/src/linux . If you already have /usr/src/linux, rename it to /usr/src/linux-old

3: Go into /usr/src/linux and depending what configurator you wish to use: "make menuconfig" or "make xconfig"

4: The toughest part is here: Configuration of modules and kernel options. A lot of options are device modules. Still, plenty others reconfigure the settings of the kernel itself.

The best 2 things are to read the HELP tab on every option until you get used to what the options do, and Try the options out! If you dont know what it does, compile and try it out. Just make sure to keep the old kernel to revert to.

5: Now it's time for the batch compile. "make dep && make modules && make bzImage" If that gives you an error, you probably made a really bad choice on something, or there's a bug in the kernel configurator.

6: This is my personal choice, but I copy my kernels to /ddmmyyyy-kernelbranch format into root. Others may perfer to put kernels into /boot . the format shows me the date of compile and the version. /02042003-2.5.63 shows me it was made on APR 2, 2003 Kernel 2.5.63 .

7: Take the file name you chose (and the path) and add a line to /etc/lilo.conf to boot from the new kernel. Just follow the format of the other choices.

8: run "lilo" . If you dont, you wont be able to use the kernel. If you dont run lilo, and if this is your only kernel (very stupid to have only 1 kernel), your system wont boot.


*** 7 and 8 dont apply if you use GRUB. I'm unsure as how grub configures to new kernels as I dont use it.

Please let Tek-Tips members know if their posts were helpful.
 
I believe "make install" also automates steps 6,7, and 8. I've used it successfully on a redhat 8.0 system... I wouldn't be suprised if it doesn't work on other distros (especially since some use grub and others use lilo).

Also, it should be noted that Redhat (and I suspect others) distributes binary updates to the kernel in the form of rpms. These can be downloaded and installed using the up2date program. If you're just looking to upgrade an out of the box kernel, this is the easiest option. If you want to upgrade your kernel and make some tweaks then you should compile it from scratch, as krale has detailed.

-Venkman
 
8: run "lilo" . If you dont, you wont be able to use the kernel. If you dont run lilo, and if this is your only kernel (very stupid to have only 1 kernel), your system wont boot.


How do i run lilo? What do i do after i type lilo?
 
how do i know what to click on
make menuconfig

I tried it once clicking a lot of stuff, it didnt work
I tried it again and clicked nothing and it didnt work

didnt work = i got the 5 second time out error while starting up and it left me at a command prompt.

thanks!
 
once you edit /etc/lilo.conf , you load the changes into your MBR by running:
/sbin/lilo -v

(I think it's in the sbin directory)

You should really look for a FAQ online, as it sounds like you have very general getting started questions. Forums like these are much better for asking speciffic questions you are stuck on.

You should check out the Newbie Help Files located here:

Compiling a kernel can be a lot of trial and error, so don't expect it to just work. You should do your best to guess which options you need compiled in... about half of these options are speciffic to your hardware and the other half have to do with what type of things you want on your system (like ext2 vs. reiserfs or something). I wholeheartedly agree with Krale that you must read every help tab there is.... well except for maybe the random network drivers and stuff you know for sure you don't have... but even there be careful as many times companies use chipsets of other companies. Anyways, when you edit your lilo.conf make certain you do not delete the already existing entry for your kernel (and obviously don't delete that kernel file, which is probably found in /boot/, either). You may not be able to boot to your new kernel, but read the error message it gives when it tries to boot and try to figure out what you're missing.

-Venkman
 
no, you do not need to run anything for grub. It handles everything on its own.

 
I got an error, it wouldnt boot.

The error is....
cannot find these files...
/etc/rc5.d/505kudzu
/usr/sbin/kudzu
/var/lock/subsys/kudzu

Got any tips?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top