Friday, October 5, 2012

Compilation of 3.5.4 Linux Kernel on Slackware64 14.0

Hello Slackers;

I bought a new notebook (Ivy Bridge Micro-Architecture) and installed Slackware64 14.0 running on long term supported 3.2.29 Linux kernel. After installation, everything was good. A new notebook, a new release and a new kernel... While studying on Slackware in the next hours, OS suddenly freezed. Then, I experienced again the same thing a few more times. After googling the problem, I saw that many people had experienced the same problem on Ivy Bridge Platform using 3.2.x Linux kernel. Upgrading 3.2.x kernel to 3.5.x completely solved the freeze problem for me.

Below, I explained that how 3.5.4 linux kernel simply compiled and installed along side the 3.2.29 Linux kernel on Slackware64 14.0 using "config-huge-3.5.4.x64" kernel configuration file in "/testing/source" directory of the official Slackware tree (or Slackware installation DVD). You can also use one of the other kernel configuration files depending on your choice and os architecture.

For switching to the new kernel 3.5.4, open a terminal emulator and run the following commands correspondingly.

mkdir -p /usr/src

cd /usr/src



tar -jxvf linux-3.5.4.tar.bz2

rm linux-3.5.4.tar.bz2

rm linux

ln -s linux-3.5.4 linux

cd linux-3.5.4

Remove any existing kernel configuration file.

make clean

make mrproper

Download the kernel configuration file. (For Slackware 14.0 32-bit, download "../config-huge-3.5.4") 


mv config-huge-3.5.4.x64 .config

For additional kernel options, configure the kernel source by "make menuconfig" command and save the configuration.

make menuconfig

make all

make modules_install

cp arch/x86/boot/bzImage /boot/vmlinuz-huge-3.5.4

cp /boot/

cp .config /boot/config-huge-3.5.4
cd /boot

ln -s

nano /etc/lilo.conf

Add following lines, to create your new kernel section,  into "/etc/lilo.conf" file above or below the default kernel section by replacing X with your root partition device number and save.
image = /boot/vmlinuz-huge-3.5.4
  root = /dev/sdaX
  label = 3.5.4
Finally run "lilo" command and reboot system.


After booting into new kernel, you can check your new kernel version by: 

uname -r

Output of "uname -r" command should be "3.5.4".

For further information about kernel compilation, look at here and here.

Take care!


  1. I think after:
    cp .config /boot/config-linux-3.5.4

    you need to:
    cd /boot

  2. Thank you. You are right. I must have missed that. :)

  3. Awesome How To, worked great for me.

    Side note, This works exactly the same for a 32bit kernel, just use the 32bit config file.

  4. Great post!

    adapted to the brazilian language and for the arquitecture x86:

    Thanks for sharing!

  5. Hello, Ismail! Thanks for the post, but i prefer using LTS kernels, so could you please tell me if such problem could be solved by using 3.4.x instead of 3.5.x (I'm going to buy a similar notebook)? Or share the link please ;)

    1. Yes, Yuri. Freezing problem completely disappears with kernel vesion 3.4.x too. Use one of the kernel configuration files on page "". In fact, I follow latest LTS kernel versions like you :). I have Slackware64 14.0 installed on Ivy Bridge Platform. Yesterday, I compiled latest 3.4.x series kernel 3.4.27 and now using without any problem :).

      See the page "". That is my notebook. I bought it four month ago. At that time, it was a good choice according to price-performance ratio. It is NVDIA GeForce 630M middle class GPU integrated along with Intel's GPU. Now, there are also NVDIA GeForce 635M integrated versions of other brands at about the same price with m notebook. For instance, Asus K55VJ-SX031D.

  6. Nice article…

    I need the kernel package of slackware 14 64bit with the below options.

    “Processor type and features” -> “High Memory Support” -> Make sure it is set to 64GB
    •”Processor type and features” -> “PAE (Physical Address Extension) Support” -> enable
    •”Processor type and features” -> “Paravirtualized guest support” -> enable
    •”Processor type and features” -> “Paravirtualized guest support” -> “Xen guest support” -> enable
    •”Device Drivers” -> “Block devices” -> “Xen virtual block device support” -> enable either as a module or built in
    •”Device Drivers” -> “Network device support” -> “Xen network device frontend driver” -> enable either as a module or built in