Suse & OpenSuse : Tips, Tricks, Tutorials, How Tos and Troubleshooting

Beginners Guide to Compiling Kernel on OpenSuSE 11.3

YaST Software Manager

Often, we move from a laboratory to another or from an organization to another, we are task with making changes to the Linux system’s kernel.  One thing to note is that each Linux distribution has a different “recommended” method for making changes.  Here, I will document a quick and easy method to compiling the kernel on OpenSuSE 11.3.

Firstly, you will need the development tools, such as gcc and also the Linux sources.  You can use the YaST Software Management to install the necessary.  For my OpenSuSE 11.3 system, the kernel sources are for version 2.6.34-12.

As superuser (root), go to /usr/src/linux.  You can skip the make menuconfig if you just want to try it out.  But it would be a good idea  to enter it and change the kernel name (in case it messes it up!)  Next, make a distributable rpm.

# make rpm

This will take some time depending on your config.  This process is also smart enough to use up all my 4 cores on my machine for the compilation.  Assuming that you have a 32-bit x86 machine (like me);

# cd /usr/src/packages/RPMS/i386

Install the newly created rpm (I renamed mine to have a test extension) using;

# zypper install kernel-2.6.34test-1.i386.rpm

Ok, all done … not quite.  For those who are slightly more experienced, you will immediately ask what about the initrd file?

# cd /boot
# make initrd

That’s it … oh, you need to edit your GRUB boot file.

RSS feed | Trackback URI

1 Comment »

2011-08-25 05:13:44

[...] the latest stable Kernel (3.1.0-rc3) for my box (openSuSE 11.3). I used the description from here. But when I boot, no nvidia driver has been found and I'm stuck to the console. I'm trying to [...]

 
Name (required)
E-mail (required - never shown publicly)
URI
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> in your comment.