Donnerstag, 14. April 2011

S.A.K.C introducing SUSE Automatic Kernel Compiler

hi girls and guys,

in one of my lasts posts i briefly wrote about how you actually can install the latest kernel from Kernel:HEAD repository for your current release of opensuse using just the kernels src.rpm file.

Especially the last steps where you actually install the kernel and have to create a proper initrd as well as proper entries into /boot/grub/menu.lst are quiet tricky and messing them up may result in a system which no longer boots.

Spending some time in the opensuse forums i found this script. I also packaged an rpm in my :home Repository. So all you have to do now is to simply apply the patches and retar bz2 the sources and run the script.

If you get the Scripts from my repository you will find the script sakc and klist in the /usr/bin directory. I've modified them a little. Go to the ~/Kernel directory (if you don't have one create it) and type:

sakc ~/Download/linux-2.6.39.rc3.tar.bz2



The Script will unpack the sourcefile for you and configuring your kernel using the /proc/config.gz file. If you want to configure the kernel before sakc compiles it, you can do so. The script will ask if you want to configure it and is using make menuconfig. So you can spend some time to configure the kernel properly according to your needs.

Leaving the kernels configuration menu begins sakc to compile the kernel. The good thing is that the script determines how many cores you currently have and according to this uses the -j option to optimize the kernel compiling process.



After compiling is done you will be prompted for the root password, so don't leave the computer unwatched, and the script will not just install the kernel and its modules but also will create a valid initrd and a entry in
the /boot/grub/menu.lst