Just for reference, the kernel I built using these procedures was with the following hardware configuration:
CODE
Dell 1600SC Dual Xeon MB DAT54AMB8C2
Intel P4 Xeon 2.4Ghz 533mhz FSB Socket604
Transcend 1GB DDR266 ECC Registered
Unknown Onboard IDE
Seagate 80GB:IDE:7200RPM Barracuda ST380011a
Intel P4 Xeon 2.4Ghz 533mhz FSB Socket604
Transcend 1GB DDR266 ECC Registered
Unknown Onboard IDE
Seagate 80GB:IDE:7200RPM Barracuda ST380011a
Step 1:
Install wget.
CODE
apt-get install wget
Step 2:
Download the latest kernel sources from kernel.org. I'm not sure if the 2.6.X kernel releases will work with this little howto, so I would grab the latest 2.4.X release to ensure the kernel actually boots and is fully functional. The 2.6 kernels should work though but you are on your own in that case.
CODE
cd /usr/src
wget http://www.kernel.org/pub/linux/kernel/v2.4/linux-2.4.30.tar.gz
tar -xzvf linux-2.4.30.tar.gz
cd linux-2.4.30
wget http://www.kernel.org/pub/linux/kernel/v2.4/linux-2.4.30.tar.gz
tar -xzvf linux-2.4.30.tar.gz
cd linux-2.4.30
Step 3:
Install the debian kernel building utils:
CODE
apt-get install kernel-package
Step 4:
Browse this site:
http://wiki.osuosl.org/display/LNX/Debian%...0Dell%20Servers
Notice it has a link to a kernel config with iptables enabled in the comments. Here's that link.
http://www.erikin.com/index/Docs/linux/deb.../kernel/.config
Make sure you are in the /usr/src/linux-2.4.30 directory and wget that file.
CODE
wget http://www.erikin.com/index/Docs/linux/debian/dell/1750/kernel/.config
Step 5:
Run make menuconfig:
CODE
make menuconfig
Go to Networking Options ---> IP: Netfilter Configuration --->
You should see that most of the options are set to be built as modules. Just what we need!
Exit out of the kernel configuration. Save the kernel configuration when it asks.
NOTE: If you have the same system configuration you shouldn't need to change anything.
Step 6:
Run make-kpkg clean:
Lets just make sure everything is "tidy" for the kernel build:
CODE
make-kpkg clean
Step 7:
Build the kernel package:
CODE
make-kpkg kernel_image
Step 8:
Install the kernel package:
Assuming the kernel built, and there is no reason it shouldn't if you are following these instructions, there should be a new .deb package placed in /usr/src. Lets go install it!
CODE
cd /usr/src
dpkg -i kernel-image-2.4.30_10.00.Custom_i386.deb
dpkg -i kernel-image-2.4.30_10.00.Custom_i386.deb
If you are using a kernel revision other than 2.4.30 than the file may be named slightly different, ie 2.4.29, etc. If you are using the 2.4.30 kernel it should have that filename for the .deb package.
When you are installing, you'll be asked a few questions. You don't want to make a boot floppy, so say no to that. Also, if it asks to install to the boot block and run lilo (sorry, forget exactly what it says) say yes.
Step 9:
Verify that the kernel is installed correctly. Do the following:
CODE
ls -la /
Take notice of these lines:
CODE
lrwxrwxrwx 1 root root 19 Apr 18 03:29 vmlinuz -> boot/vmlinuz-2.4.30
lrwxrwxrwx 1 root root 25 Apr 18 01:45 vmlinuz.old -> boot/vmlinuz-2.4.26-bf2.4
lrwxrwxrwx 1 root root 25 Apr 18 01:45 vmlinuz.old -> boot/vmlinuz-2.4.26-bf2.4
vmlinuz.old can be booted with the LinuxOld entry in lilo when the server gets rebooted. It will default to the "Linux" lilo option though which is our new kernel.
Step 10:
Verify that our lilo.conf file isn't botched and rerun lilo.
Lets open /etc/lilo.conf. You can use vi or nano. I usually use nano myself though, so that's what this example shows.
CODE
lba32
boot=/dev/hda
root=/dev/hda3
install=/boot/boot.b
map=/boot/map
vga=normal
delay=100
image=/vmlinuz
label=Linux
read-only
append = "console=ttyS0,9600n8"
image=/vmlinuz.old
label=LinuxOLD
read-only
optional
append = "console=ttyS0,9600n8"
boot=/dev/hda
root=/dev/hda3
install=/boot/boot.b
map=/boot/map
vga=normal
delay=100
image=/vmlinuz
label=Linux
read-only
append = "console=ttyS0,9600n8"
image=/vmlinuz.old
label=LinuxOLD
read-only
optional
append = "console=ttyS0,9600n8"
NOTE: If you haven't cleaned up the lilo.conf file it is going to have a ton of comments in it. So, you are likely not to see anything remotely resembling the lilo.conf I use. lol
I wouldn't get into changing too many options if it doesn't look exactly the same. Just verify that the image=/vmlinuz and image=/vmlinuz.old are there. Take note that the append = "console=ttyS0,9600n8" is for the remote console access. Check out the Debian ROD/Remote Console How To for info on enabling that. If you haven't done that yet, do so now.
That should do it. Rerun lilo and reboot to use the new kernel.
CODE
lilo
Running lilo should show you the following if successful:
CODE
Added Linux *
Added LinuxOLD
Added LinuxOLD
Now you can reboot to use the new kernel with iptables support. Just type reboot in your console. I would definitely suggest having the rod/remote console working in case iptables ends up locking you out upon reboot
That should do it! You are on your own setting up iptables, but just make sure you allow the proper ip ranges in your firewall script so servermatrix/theplanet can monitor your server.