I know how frustrating it can be for slack noobs...everyone tells you that slack is too hard for a newbie and then when you're faced with your first kernel compile...fear rolls in. Relax...slack isn't hard...it just makes you learn quicker. Compiling a custom kernel isn't hard...it just requires that you pay attention and follow the proper procedures. Once you've successfully installed slackware, then customized your kernel, you are well on your way to unleashing the raw power of linux...under the best (IMO) distro ever made.
Now to the compiling part...
First, we need to edit lilo.conf. Pick your favorite editor...one that is easy for newbies (and I still use this from time to time) is pico.
pico /etc/lilo.conf
Add this to your config...you can just copy what is there and add the .old stuff.
image = /boot/vmlinuz.old
root = /dev/hda1
label = slack.old
read-only
Note: Replace /dev/hda1 with the correct location of your root partition.
Now we need to edit the Makefile to make sure your new kernel is copied to the appropriate directory.
If you are using 8.1 or later, open /usr/src/linux/Makefile in a text editor, scroll to line 74 and
uncomment the the line #export INSTALL_PATH=/boot.
For 8.0 you must leave this line commented.
So...cd /usr/src/linux
pico Makefile
scroll to line 74 and
uncomment the the line #export INSTALL_PATH=/boot.
For 8.0 you must leave this line commented.
Now for the fun
make menuconfig (make your changes here...when done, save your new configuration)
make dep (sets all the kernel dependencies)
make clean (removes un-needed files)
make bzImage (builds the kernel)
make
make install (installs, moves and renames all the needed files and updates lilo)
make modules (builds all the kernel modules)
make modules_install (installs the modules)
Note: The 'make install' command is the one that most don't use but it works fine in slackware as long as you have prepared lilo.conf and edited Makefile according to the instructions above.
Now you can reboot using your new kernel!!!
If things did not go completely according to plan you can boot your old (working)
kernel by selecting slack.old at the lilo screen.
This is my bible when it comes to recompiling my kernel, and it has never, ever failed.
Enjoy your new kernel!
Note: All references from
http://p-two.net
written by one of our own Moderators!