Good programming practices

Compilation and installation of kernel 3.0.0 in Slackware

July 24th, 2011

New stable kernel series is available. On Slackware you can build and install it getting source from kernel.org. This process looks the same like in kernel 2.6 so I omit most of comments.

There are new drivers, so if you doesn’t disable some features, the image can be slightly bigger. Below are commands which compile and install new kernel. Remember to keep older kernel in boot options in case of any problem while running new kernel.

  1. wget http://www.kernel.org/pub/linux/kernel/v3.0/linux-3.0.tar.bz2
  2. mv linux-3.0.tar.bz2 /usr/src/
  3. cd /usr/src/
  4. tar xfj linux-3.0.tar.bz2
  5. rm -rf linux
  6. ln -s /usr/src/linux-3.0 /usr/src/linux
  7. cd /usr/src/linux
  8. zcat /proc/config.gz > .config
  9. make oldnoconfig
  10. #use what you need
  11. make menuconfig
  12. #use 'make -j(number of cores+1) all' for multicore processor
  13. make all
  14. make modules_install
  15. make install
  16. cd /etc/rc.d
  17. cp rc.modules rc.modules-3.0
  18. rm rc.modules
  19. ln -s /etc/rc.d/rc.modules-3.0 /etc/rc.d/rc.modules
  20. mv /boot/vmlinuz /boot/vmlinuz-3.0
  21. ln -s /boot/vmlinuz-3.0 /boot/vmlinuz
  22. mv /boot/System.map /boot/System.map-3.0
  23. ln -s /boot/System.map-3.0 /boot/System.map
  24. cp /usr/src/linux/.config /boot/config-3.0
  25. rm /boot/config
  26. ln -s /boot/config-3.0 /boot/config
  27. #add new option and reconfigure old if needed
  28. nano /etc/lilo.conf
  29. lilo

You should see the kernel version during boot or type

  1. uname -r

to make sure. “3.0.0″ means success. Keep in mind now there are just three numbers.

3 Responses to “Compilation and installation of kernel 3.0.0 in Slackware”

Diego Fernando TrujilloAugust 17th, 2011 at 13:46 pm

Thank you very much. The post was very comprehensive and so effective.

Regards from Cali, Colombia, South America.

Leave a Response