LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   custom kernels... Why so hard? (https://www.linuxquestions.org/questions/linux-newbie-8/custom-kernels-why-so-hard-331458/)

mm0204 06-08-2005 03:26 AM

custom kernels... Why so hard?
 
Hello LQ!

i am so glad i found this site. I have slackware 10 installed and running usefully on my pII 400 named Strider.... yes, it's a LOtR reference.... Hobbits Rock!

I love it. I down loaded the disc 1 and 2 iso's and i was off.

now, however, I amd noticing some slowdown and i want to compile a custom kernel. Coming from FreeBSD, i figured it would be no sweat... in FBSD you edit a plain text config file, commenting out what you dont need, compile, install, reboot and ur done... everything i've seen on the subject in the linux world is about writing makefiles and "tweaking the source"... i'm a geek but i'm not a programer....

would someone please help me out?

thanks,

Q :scratch:

reddazz 06-08-2005 04:08 AM

Nah its neither too difficult nor complicated. Take a look at this article at kerneltrap. Its meant for those upgrading to the 2.6 kernel but I used it when I compiled my first kernel a while ago.

zord 06-08-2005 04:09 AM

It's even easier than editing a textfile, try 'make menuconfig' in the directory, and you'll get a menu, where you can edit each setting.

This is, how I would do it (for a 2.6.11.11 kernel):
unpack the new kernel to /usr/src/linux-2.6.11.11
rm /usr/src/linux
ln -s /usr/src/linux-2.6.11.11 /usr/src/linux
cd /usr/src/linux

copy your old config in the directory, so you can use it as a base for the new kernel: cp /boot/config /usr/src/linux/.config
make menuconfig
make && make modules_install

Now the new kernel is compiled, you'll have to copy it to your boot dir:
cp /usr/src/linux/arch/i386/boot/bzImage /boot/kernel-2.6.11.11
cp /usr/src/linux/.config /boot/config-2.6.11.11
cp /usr/src/linux/System.map /boot/System.map-2.6.11.11

Now edit your /etc/lilo.conf, add an entry like this above the existing image entry (make sure to change the root disk to the appropriate one):
image = /boot/kernel-2.6.11.11
root = /dev/sda3
label = slack-2.6.11
read-only

This way you can still boot your old kernel, in case something went wrong.
Run lilo as root, and all should be done.

Reboot and pray :P

Hope this helps, don't give up, if it doesn't work the first few times ;)

Good luck


All times are GMT -5. The time now is 03:33 PM.