I am really nervous about compiling my own kernel on Slackware and...
Linux - KernelThis forum is for all discussion relating to the Linux kernel.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am really nervous about compiling my own kernel on Slackware and...
I am really nervous about this compiling of my kernel on Slackware. I have never built a kernel on Slackware before and I am wondering what to do. I have been following instructions on Alien Bob's site and because it's some what out dated I am wondering what has changed and what I should be doing? I compiled it in the /usr/src/ as he has advised for Slackware and I am in the middle of compiling it right now. How should I update Lilo for this new kernel? I am using Slackware 13.1 Please can some one help me or give me reassurance about this. Thanks for your help.
PS.
I am compiling my own kernel for speed, and to cut out support for hardware I don't have. (In the hopes of saving ram like in my Gentoo desktop where I cut down 100 megs of unnecessary ram usage.) I am using the latest stable vanilla kernel from www.kernel.org. One more thing thanks for reading this and the help you may provide to me in this dying matter.
It's really not that big a deal; if it doesn't work right, just use the stock kernel and try again 'til it does. Alien Bob's guide looks pretty much like the way I do it, so you should be fine with that(it covers the lilo thing too, btw).
Good luck, and if you run into trouble, just ask... there are plenty of folks here who will be happy to help.
I have followed Alien Bob's guide many times and it has never steered me wrong. Just take your time, follow all of the steps and think about what you are doing. Don't be afraid to google some of the options to ensure that they match your hardware. And, as mudangel says, if it goes wrong just boot into an existing known working kernel and try to fix the compile.
Save the old kernel and the kernel modules first before installing a new kernel.
Then if something goes wrong and the system will not boot, then these files can be put back by booting the slackware install cdrom (or dvd).
The old kernel comprises the kernel itself and the /lib/modules directory
that goes with the kernel.
For me they are:
1) /boot/vmlinuz-huge-smp-2.6.33.4-smp
2) /lib/modules/2.6.33.4-smp/
And the config and the System.map (but they are not essential)
3) /boot/config-huge-smp-2.6.33.4-smp
4) /boot/System.map-huge-smp-2.6.33.4-smp
It is okay to have multiple /lib/modules/... kernel modules sub directories, so I leave the old one alone until you have tested the new kernel for a while.
But the /boot files and symbolic links often get overwritten by the install process:
/boot/vmlinuz
/boot/config
/boot/System.map
So for example to back up my system I might create a "/boot-save" directory and copy the old kernel files there from the /boot directory:
mkdir /boot-save
cp -a /boot/vmlinuz-huge-smp-2.6.33.4-smp /boot-save
cp -a /boot/config-huge-smp-2.6.33.4-smp /boot-save
cp -a /boot/System.map-huge-smp-2.6.33.4-smp /boot-save
But the /boot files and symbolic links often get overwritten by the install process:
/boot/vmlinuz
/boot/config
/boot/System.map
It's easier to to do make install_modules, then manually cp the kernel and System.map, rather than doing make install- then the old kernel remains in place, and can be selected at boot if needed.
The easiest way to cut down on kernel bloat in Slackware is to switch from the huge kernel to the generic kernel. The generic kernel requires an "initial ramdisk" as described in /boot/README.initrd
The second easiest way (which is still easy and is my preferred method) is to compile a custom kernel based on config-generic-2.6.35.7, but has built-in support for the filesystems in use on your machine. The custom kernel won't require an initrd.
It's easier to to do make install_modules, then manually cp the kernel and System.map, rather than doing make install- then the old kernel remains in place, and can be selected at boot if needed.
12-27-10 09:08 PM
After doing "make install_modules" I do this:
make bzlilo
which builds the bzImage, installs it into the /boot directory and then runs lilo.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.