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.
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?
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.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.