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.

mudangel

12-27-2010 07:50 AM

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.

XavierP

12-27-2010 09:06 AM

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.

comet.berkeley

12-28-2010 12:08 AM

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:

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.

EdGr

12-29-2010 09:45 PM

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.

sdiff -s /boot/config-generic-2.6.35.7 /boot/config-huge-2.6.35.7

will give you an idea of what doesn't need to be built-in to the kernel.
Ed

comet.berkeley

01-01-2011 03:36 PM

mudangel wrote:

Quote:

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.

darkstarbyte

01-02-2011 07:43 PM

Quote:

Originally Posted by comet.berkeley
(Post 4209770)

mudangel wrote:

After doing "make install_modules" I do this:

make bzlilo

which builds the bzImage, installs it into the /boot directory and then runs lilo.

Thanks for your comment, but I have this question do run it like this.

make && make install_modules
make bzlilo

comet.berkeley

01-10-2011 11:11 AM

Quote:

Originally Posted by darkstarbyte
(Post 4210836)

Thanks for your comment, but I have this question do run it like this.

make && make install_modules
make bzlilo

Sure, there are lots of ways to build a kernel.

the "&&" in make and make install_modules is shorthand for "and"

So it says to run "make" and if it works okay then run "make install_modules"

You could just do it like this which is what I usually do:

make
make install_modules
make bzlilo

Or as others such as Alien Bob suggest:

make
make install_modules

copy the bzImage to /boot/vmlinuz
copy the System.map to /boot/System.map

lilo

One of the ways I learned about all this was by reading the /usr/src/linux/README

H_TeXMeX_H

01-10-2011 11:43 AM

I don't see 'bzlilo' in the makefile, is this option only in newer kernels or something ?

comet.berkeley

01-11-2011 01:59 AM

Quote:

Originally Posted by H_TeXMeX_H
(Post 4219439)

I don't see 'bzlilo' in the makefile, is this option only in newer kernels or something ?

bzlilo is actually old but out of fashion as many Linux distributions use grub now instead of lilo.

It is in the /usr/src/linux/arch/x86/Makefile

There are some other interesting targets there including: bzImage and isoimage