Web Hosting Talk







View Full Version : compiling new kernel


clocker1996
05-30-2002, 05:54 PM
I ran into this problem yesterday.. http://www.webhostingtalk.com/showthread.php?s=&threadid=52252

so now i have to compile a new kernel, i want to do 2.4.18

The problem is i havent really compiled a kernel before, i know the general steps
e.g. make menuconfig, the bzimage stuff, etc

but still, the problem is
i dont konw what to configure, and what not to configure, what to choose as built in
what to choose as module
and what to do to make sure that when i reboot its going to come back on properly (basiaclly making sure doing it all right)
Is it possible to find out the necessary info via command line?
i mean i know u can do some things like lspci etc
but would the command line be able to tell me everything

What would i need to execute via the command line to make sure i dont run into any problems?

BTW, this is a rackshack server, which makes it more risky. Why? because from waht I can see, when the server goes down for the reboot, if the server doesnt come back up, rackshack won't do anything for me, besides "restore" the server for $29

restore means re installing the OS (i believe)
its pretty sad if you ask me. but thats just how things are looking right now

so could someone please help me out? i would like to do this carefully, and take my time to ensure i don't mess up

If anyone has first hand knowledge on compiling a new kernel remotely, not being in front of the box, or having local access/physical access, and can help me through this, please PM me.

thank you

Web Solution
05-30-2002, 06:14 PM
This is an excellent walk through on upgrading your kernel.

http://www.wzz.org.pl/~lnag/pl/kernel_upgrade.htm

BTW: 2.4.18 is an excellent choice :)

Thomas.N11
05-30-2002, 10:12 PM
There are docs on this as mentioned above... my process, if you are interested, goes like this (assuming we have our red hat source rpm downloaded):

1. rpm -iv sourcefile.rpm
2. edit /usr/src/linux-2.x/Makefile. Change the 'EXTRAVERSION' to something unique.
3. make mrproper
4. cd to /usr/src
cp -p configs/kernel-2.x.x-i686.config .config
5. make oldconfig
6. make menuconfig
7. make dep
8. make bzImage
9. make modules
10. make modules_install
11. make install
12. cp /usr/src/linux-2.x/.config /boot/config-2.x.x-uniqueid

If you're running grub the install will auto add the necessary info to your grub.conf. If you're running lilo you'll need to add a new reference to this kernel.

The 'x's in the steps indicate versions which are dependant on the kernel you're using. If you're running an athlon go with the athlon arch rather than i686. I'm running the 2.4.18-4.athlon on my personal desktop right now and it is very stable.

The make menuconfig step will require you make the necessary adjustments to your configuration. There are several dozen menus to peruse through and make changes. Standard practice will typically be if you don't know what it does then don't change the default option.

I feel bad that rackshack has left you in this situation. Please feel free to pm me if you need further assistance. Nobody should be left in a compromising situation such as this.