Click to See Complete Forum and Search --> : Compiling kernels?


T'Pel
04-02-2003, 12:37 AM
Hi! I have heard that one of the fun things to do with Linux is to recompile the kernel, and possibly make some changes. My big question is: how can I do this while preserving my ability to change things back. I know that I'll need to back up the originals, but is there a way to choose which kernel I boot into? Also, how does one go about compiling a kernel?
Thank you so much!
~Erin :)

enlinux
04-02-2003, 01:14 AM
cutomizing your own kernel is something that will give you great satisfaction. it's not that hard. just follow the basics. when you download a kernel and build it, you can always go back to your default. if you use lilo then choose linux or mykernel when you system boots up. if your new kernel does not but then restart your system and choose linux. then go into your new kernel directory and work on it some more or edit /etc/lilo.conf correctly.

i am working on a webstie to show how to customize your own kernel.

go to http://enlinux.netfirms.com

click on how-to then custom kernel. read that page a few times then try it out.

hope that helps out. the website is still being built. so it does not look all that good. once it is done then i will be putting it on my own freebsd server.

read the forums alot of people have had the same question.

see ya,

enlinux

rid3r
04-02-2003, 01:15 AM
you can follow this link (http://www.justlinux.com/nhf/Compiling_Kernels), also hit the search button above (search for "compiling kernel")
1.you do it as root
2.need the kernel source to be installed on your system.
3.you "cd" into the shortcut of your kernel source /usr/src/linux -> /usr/src/linux-2.4.20
4.compilation:
make mrproper
make oldconfig (or cp /boot/config /usr/src/linux/.config <--your kernel configuration file (hidden))
make xconfig (change only what you are sure needs to be changed)
vim Makefile (or pico Makefile <-- editing Makefile, so your new kernel does not overwrite the old one, change the $EXTRAVERSION variable to "-custom" for example)
make dep
make clean (optional)
make bzImage
make modules
make modules_install
make install
if everything goes O.K, you should find a vmlinuz-2.4.20-custom in your /boot directory.
5.add your newly compiled kernel to either grub.conf or lilo.conf file (both can be found in /etc directory)(read how)
6.if you use Lilo, don't forget to run /sbin/lilo -tv (to test), /sbin/lilo -v (to install modified lilo to MBR)

T'Pel
04-02-2003, 02:10 AM
Thank you very much for the help! I am excited and will probably begin on this project this summer when I'm out of school!
~Erin