I have found installing the latest version of the the Linux Kernel to be very fascinating. This is likely very curious to many as the Linux Kernel is just the underlining Operating System that drives our Linux Distribution we call openSUSE. It pretty much does its thing under the radar of most users. It has grown in complexity since the first release of Linux version 0.01 in September 1991 by Linus Torvalds. You can read the details about it here if you wish, Linux kernel - Wikipedia, the free encyclopedia. The Linux [size=3]Kernel is considered to be monolithic with all main OS services being run from the kernel. [size=3]However, the Linux kernel is modul[size=3]ar with core functions located in the main [size=3]kernel file [/size][/size][/size][/size][size=3][size=3][size=3][size=3][size=3][size=3][size=3]in /boot named [/size][/size][/size][/size][/size][/size]vmlinuz-version while optional drivers are built as separate modules (as in *.ko files) in the folder called /lib/modules [size=3]and grouped by kernel version. [/size]
When you tell someone you are using openSUSE Linux, what does that really mean you are doing? Well, openSUSE is our flavor of Linux distribution (Linux distribution - Wikipedia, the free encyclopedia) which you can read about here, https://en.opensuse.org/openSUSE-istribution_platform_strategy and Linux is the Operation system kernel you can read about here, Linux kernel - Wikipedia, the free encyclopedia. Ultimately, the ability to work with and on our computer, no matter its make or model, all comes down to the Linux Kernel Operating System. It is very true that the Linux distribution that you select can greatly effect the speed, reliability and usability of your total Linux installation, but in the end, all power comes from the Linux Kernel.
OK, so I like to work with the latest Linux Kernel because it effects how hardware and software work properly on my computer. If I buy some new piece of computer hardware, say a new sound card, it may not work with my default openSUSE kernel version. Yet, we all have the power to install the very latest kernel version into our installed copy of openSUSE. During the lifetime of your installed openSUSE version, it is possible to use the very latest version or select any kernel version in between its original released kernel version and the latest kernel release candidate.
The Linux kernel includes almost all hardware drivers for your PC, but not all. Some drivers are supplied externally and must be compiled into your present running kernel. The reason this is true is because not all companies provide information on how their product works for inclusion into the Linux kernel. Such examples include the VirtualBox VM drivers, the proprietary nVIDIA and AMD video drivers. It is important to realize that every time you update your kernel version, drivers such as these three mentioned here must be recompiled and reloaded before they will work again. This fact of how they work and install is outside the scope of this kernel document, but consider what I have said on this before you proceed any further.
[/size]There are four basic ways to install a newer kernel version. First and foremost, the most common way to install a newer kernel is when you get a kernel update from YaST. Kernel updates in openSUSE stay with the same major released kernel version, but the sub-release number changes. For instance, openSUSE 12.3 comes with kernel 3.7.10 with its sub-release version being 10 of kernel 3.7. Security and bug fixes come down from YaST as updates to kernel 3.7 in openSUSE, giving us the most common kernel version update.
The next most common way to get anew kernel version is to use a kernel repository, added to YaST / Software / Software Repositories. The kernel repositories come in two flavors, kernel head, the very latest kernel version released from www.kernel.org and the latest stable kernel.
- openSUSE 13.1 comes with[size=3] Kernel: linux-3.11.9 (Updated for you from YaST)
2[/size]) Latest Stable version is at: linux-3.12.3 [size=3](Works with VirtualBox 4.3.2)
[/size] [/size][size=3]3) Kernel Head version is at: linux-3.13-rc3
For info on getting openSUSE kernels, please have a look here: Portal:Kernel - openSUSE Wiki
[size=3]For more info on configur[size=3]ing your[size=3] kernel have a look here: menuconfig - Wikipedia, the free encyclopedia[size=3].
You already get the latest kernel update (now at version 3.7.10) when you allow YaST to run and update your openSUSE installation. To get the Stable Kernel, add this repository into YaST [/size][size=3](Terminal C[size=3]ommand Shown)[/size]:
sudo zypper ar http://download.opensuse.org/repositories/Kernel:/stable/standard/ Kernel-Stable sudo zypper refresh sudo zypper in --from Kernel-Stable kernel-desktop
To get the kernel Head, add this repository into YaST (Terminal Command Shown):
sudo zypper ar http://download.opensuse.org/repositories/Kernel:/HEAD/standard/ Kernel-Head sudo zypper refresh sudo zypper in --from Kernel-Head kernel-desktop
This is also called the kernel of the day: openSUSE:Kernel of the day - openSUSE Wiki
So, That covers three ways to get a new kernel, what is the forth way to get a new kernel version you might ask? Well, it is to download the kernel version you want from www.kernel.org and then compile it yourself on your PC. Before you attempt to compile your own kernel, please perform the following task:
Open YaST / Software / Software Management - Select the View Button on the top left and pick Patterns. Now, you will see several Patterns listed and you want to select:
Development [X] Base Development [X] Linux Kernel Development [X] C/C++ Development
Then Press the Accept button on the bottom right and allow these applications to install.
The basic procedure to compile your own kernel is as followings:
Download the selected kernel version (www.kernel.org) as a file linux-version.tar.xz, a compressed file tarball
Decompress the file in a folder of your choice using the terminal command:
tar -Jxf linux-version.tar.xz
- Change to the new linux folder:
- Fetch the present kernel configuration for your running kernel:
zcat /proc/config.gz >.config
- Configure your new kernel before compile:
- Compile your new kernel ([size=3]where (n+1) = number of CPU cores plus one used to speed up the compile. For four cores use make -j5):
- Install your new Kernel:
sudo make modules_install install
And that is it. Never compile a kernel as root, but you must be root to install the compiled kernel…Compile times can vary a lot, but can range from 10 minutes to over one hour, depending on the speed of your PC. One issue with compiling and installing your own kernel, outside of using YaST, is there is (normally) no automatic way for the new kernel to be removed for you. On the plus side, when you compile your own kernel, it does not remove or modify the default kernel installed by YaST in any way and both exist to be selected from your Grub selection menu at boot time.
Now as luck would have it, I have spent considerable time and effort to automate the ability to install, remove, and other wise locate any kernel version, released since the year of 2005. This ability comes as three different bash scripts you can find here:
S.A.C.K Kernel Compiler: S.A.K.C. - SUSE Automated Kernel Compiler
S.A.K.R. Kernel Remover: S.A.K.R. - SUSE Automated Kernel Remover
S.G.T.B. Kernel Tarball Creator : S.G.T.B. - SuSE Git Kernel Tarball Creator
Its my suggestion you visit each blog, read through the subject, do as required to install and use the bash script. It is my hope that you will find installing and configuring your own kernel is a blast, just as I do.
In the Grub 2 selection menu, the very latest kernel version is always the default. If you prefer the old version or any installed version,
[/size]For kernel boot parameters you can add using Grub 2, please look here: https://www.kernel.org/doc/Documentation/kernel-parameters.txt
All comments are welcome.