Please Note: You should atleast read Eric Hameleers’ Guide once if you are new to kernel compiling. I always refer this guide to people who just started kernel compiling since it’s very well-written and explained in details. Here is the link.
This is my second kernel compile guide [actually more like a report of my experience]. A few things I did differently than last time, so instead of updating the previous guide I thought of creating a new one. So, here goes.
Get root privilege by using su, then continue.
# cd /usr/src/
# rm -rf linux
# wget -c http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.32.tar.bz2
# tar xvfj linux-2.6.32.tar.bz2
# ln -s /usr/src/linux-2.6.32 /usr/src/linux
Now your linux directory points to your newly extracted kernel tree source.
I am not going to link my kernel config here as many people previously asked me why their kernel config didn’t work, it’s not supposed to! Your hardware is different than mine and my .config will be different than yours. So you must understand what to enable or disable in your own kernel config. Or just use:
# cp /usr/src/linux-2.6.29.6/.config /usr/src/linux
Now run:
# make localmodconfig
Now you can strip off your kernel and fine tune your config. Remove support for what you don’t need and select accordingly. Read more about it here.
Now run :
# make menuconfig
Carefully check out each sections to see if localmodconfig stripped off something which you need.
WARNING: My USB Mass storage device support and Intel Sound card support was stripped off by localmodconfig and hence I had to recompile kernel again with those support re-enabled.
Now scroll all the way down and select load kernel configuration and press enter to select the .config.
# make
This will take a while, meanwhile open another tab and configure lilo.
# nano /etc/lilo.conf
Scroll all the way down and copy the existing linux entry. Just change the part which says /boot/vmlinuz to /boot/bzImage and then add another line just below it called initrd. Here’s my entry:
image = /boot/bzImage
initrd = /boot/initrd.gz
root= /dev/hda3
label = Linux
read-only
Remember to replace /dev/hda3 with your own root partition. Yes yes, I know we haven’t created an initrd image yet. Patience! Just save and exit for now.
Now that make is over run:
# make modules_install
# cp arch/x86_64/boot/bzImage /boot/bzImage
# cp System.map /boot/System.map.new
# rm /boot/System.map
# ln -s /boot/System.map.new /boot/System.map
You may copy over the config file to /boot but I see now use for that and hence I skipped it.
Anyways, now for the next step, you are own your own since it depends on what partition type you are using. I use ext3 throughout and have no separate partition for /boot and hence this is how I generated my initrd image. Please refer to /boot/README.initrd file for details!
# mkinitrd -c -k 2.6.32~pdg -m mbcache:jbd:ext3 -f ext3 -r /dev/hda3
# cd /etc/rc.d
# rm rc.modules
# cp rc.modules-2.6.29.6-smp rc.modules-2.6.32~pdg
# ln -s /etc/rc.d/rc.modules-2.6.32~pdg /etc/rc.d/rc.modules
# lilo
If you get a warning about LBA32 just add “lba32″ in your lilo.conf and re-run lilo. And now reboot into your new kernel!
Good Luck

1 responses to “[example] Compiling 2.6.32 kernel in Slackware 64”
skm
September 27th, 2011 at 09:30
The last thing: where do you put “lba32″ in lilo.conf?
Thanks
7 Trackbacks / Pingbacks
[example] Compiling 2.6.32 kernel in Slackware 64 « The Linux Space | Linux Affinity December 9th, 2009 at 12:04
[...] original post here: [example] Compiling 2.6.32 kernel in Slackware 64 « The Linux Space Posted in: Kernels ADD [...]
Samsung PL60 Digital Camera – Black (10MP, 5x Optical Zoom) 3.0 inch LCD | 37 inch LCD HDTV Buy Now January 5th, 2010 at 02:04
[...] [example] Compiling 2.6.32 kernel in Slackware 64 « The Linux Space [...]
Toshiba REGZA 37AV600E -37 HD Ready LCD MultiSystem TV PAL/NTSC for Worldwide Use. | 37 inch LCD HDTV Buy Now January 5th, 2010 at 16:36
[...] [example] Compiling 2.6.32 kernel in Slackware 64 « The Linux Space [...]
! Adjustable Tilt +15/-15 degrees Wall Mount in Black BRACKET fits SAMSUNG LE37B550 37 inch LCD TV Flat Panel HD Ready Screen | 37 inch LCD HDTV Buy Now January 9th, 2010 at 02:17
[...] [example] Compiling 2.6.32 kernel in Slackware 64 « The Linux Space [...]
Toshiba HD-A3 720p/1080i HD DVD Player | Blu-ray Multimedia Buy January 10th, 2010 at 19:33
[...] [example] Compiling 2.6.32 kernel in Slackware 64 Related Blogs Related Blogs on 1080p Review On Samsung LN52A650…1080i panasonic blu-ray player on a 1080p samsung tv? I’ve got a panasonic blu-ray player that only gives me…VIZIO VBR100 Full HD Blu-ray Player … [...]
Silver Tilting Wall Mount Bracket for Sharp LC-37ADIE LCD 37 inch HDTV TV | 37 inch LCD HDTV Buy Now January 11th, 2010 at 03:18
[...] [example] Compiling 2.6.32 kernel in Slackware 64 « The Linux Space [...]
[SOLVED] Latest Kernel not appropriate for my CPU April 4th, 2012 at 01:36
[...] Check Rebuild Guide* http://blog.tpa.me.uk/slackware-kernel-compile-guide/ http://pdg86.wordpress.com/2009/12/0…-slackware-64/ [...]