Click to See Complete Forum and Search --> : Compiling a kernel


[P]Diablos
10-30-2001, 12:59 AM
Alright, I've been using linux (Debian woody) for quite some time now, and over that time it has become my main OS. I feel pretty comfortable in Linux now, so I've decided it's time to upgrade my dated 2.2.19pre17 kernel to the latest 2.4.13. I have the source, printed out the KERNEL-HOWTO, and backed up my vmlinuz file. I *think* I'm ready to go. Before I go on my venture, though, are there any last mintue tips / advice anyone can give me that might not be covered in the howto/NHF? Thanks, and wish me luck! :)

X_console
10-30-2001, 01:02 AM
1. Make sure you've backed up your entire system.
2. Make sure you've got a boot disk in case your new kernel refuses to load up.
3. If you run LILO, don't remove your current Linux entry, but add a new one for your new kernel to see if it works.
4. Coffee. Lots of it. ;)

twen
10-30-2001, 10:21 AM
If you want to make the compile time shorter and you have more than 16M you can edit the "/usr/src/linux/Makefile"
find the line that reads MAKE=makeand change to "Make=make -j N"
where N is =([ram in MB]/8)+1
eg 16M would give you 3, 24M would give you 4

but definetly back-up!!! :D

teeitup
10-30-2001, 02:59 PM
Debian has a unique way of handleing new kernels. http://www.debian.org/doc/FAQ/ch-kernel.html

You don't have to do it this way. I've had erratic results using their tools. I prefer to do it the old fashioned way.

Make sure you have installed all the dependencies. Debian doesn't install all the tools needed by default.

A little trick I picked up for testing new kernels is to add and entry to the lilo.conf file.

image=/usr/src/linux/arch/i386/boot/bzImage
label=Fresh-Kernel
read-only
optional

run lilo after making the change to lilo.conf
The optional flag means it doesn't have to be there, but if it is it will add it.

After you gen a new kernel and make/install the modules, run lilo.

You can then reboot and choose "Fresh-Kernel" and test the new kernel. If the kernel fails your original is still in place and you can reboot to your default kernel.

Once you create a kernel you're happy with, you can move it to the appropriate place.

Good Luck,

[P]Diablos
10-31-2001, 02:11 AM
alright thanks guys, I managed to upgrade my kernel with almost no problems at all. I am now finally able to play 3D games with DRI acceleration (my video drivers wanted a 2.4.x kernel) so I can say goodbye to windows for good! :)