Kernel

From PCLinuxOS Knowledgebase
Jump to navigation Jump to search

The Kernel is one of the most important components of PCLinuxOS. It is core of the computer's Operating System (OS) with complete control over everything in the system. It is one of the first programs loaded on start-up (after the bootloader) and handles the rest of start-up as well as input/output requests from software for peripherals like disk drives, keyboards, monitors, printers, and speakers. It also handles the allocation of important resources such as memory and CPU time.

Default kernel in PCLinuxOS

You can find out which kernel is running in your system by running the uname command in a terminal window.

[terry@localhost ~]$ uname -r
6.6.118-pclos1

Kernel versions

As development of Linux kernel proceeds, new versions keep on getting released. Newer versions generally mean better hardware support and may be more responsive. The kernel version is made up of three numbers separated by dots e.g. 6.6.118. The first two numbers (6.6) identify the kernel branch and the last number (118) is the release within that branch which is incremented each time a new kernel is released. Branches exist to help separate out new functionality from security and bug fixing. Sometimes new functionality designed for modern machines will not work at all on older machines. These older machines can stay on an older branch but still get security and bug fixes. Certain branches are referred to as LTS (long-term supported) which means they are supported for an extended period of time for older hardware. See kernel.org for currently available branches. The PCLinuxOS repository usually has the latest stable kernel plus the latest updates in one or more of the latest LTS branches.

So when changing kernel you can choose to install the latest kernel in the same (LTS) branch (i.e. same first two numbers in version + highest third number). Or you can install the latest stable kernel (highest first, second and third number in version)

Reasons to do a kernel update / change

If all of your hardware works with the existing kernel you may not need to switch to the latest branch. However sometimes other major software components (e.g. drivers or Xorg) may require a minimum kernel version in order to work properly. When this happens an announcement is made in the forum instructing users to update their kernel. Other reasons for installing a new kernel include:

  • Important security or bug fixes
  • Better hardware recognition
  • Better performance
  • Miscellaneous - including but not limited to boredom with the existing kernel, adventurous lifestyle, need to fill lots of empty space in the harddrive etc.

Kernel updates

Kernels are treated differently by the update process. This is because updating implies removal of the previous version which is dangerous because if the new kernel is not compatible with YOUR hardware you could be left with an unbootable system!

Instead, new kernels are added to the system (much like installing a new application). The previous version is kept and will be shown on the boot menu and will remain the default until you select the new kernel to boot. Once you are happy with a new kernel you can remove previous versions (using DNF). In summary this means that kernels are not updated as part of the normal update process. If you want new kernels to be added and made available during the normal update process then you can install a dummy package called kernel-latest which will ensure that new kernels are added to your system as soon as they become available in the repository.

To manually add a new kernel to your system:

  • Ensure your system is fully updated
  • In DNF Package Manager make sure the Available tab is selected and type kernel-6 into the search box and the available kernels will by displayed in the window:

Dnf kerne1.png

  • Click the select checkbox next to the kernel you wish to install.
  • Click the Install button at the bottom of the window to continue with installation.
  • A confirmation dialog will appear, click OK to begin the installation.
  • Once the installation is complete you should see a Transaction completed successfully message:

Dnf kernel done.png

  • You can now reboot to try the new kernel
IconNote.png
Note!

The first time you reboot after adding a new kernel it may take longer to boot if you have 3rd party dkms drivers installed (e.g.NVIDIA) because the modules need to be rebuilt to work with the new kernel. You can monitor this process by pressing escape to dismiss the splash screen. Subsequent reboots / startups will be normal

The original kernel is still installed and is available as a choice in the ">GRUB menu.

Grub2.png

Development kernels

Sometimes you may encounter a new piece of hardware which is not yet fully supported by the kernels in the stable section of the repository. Or you may be just interested in trying the latest development kernel.PCLinuxOS makes these kernels available in a special repository called kernel which can be activated if you wish to try them. As mentioned above, your old stable kernel is still available so if you have difficulty with the new kernel you can just reboot into that kernel.

To enable the special kernel repository:

  • Click the Repositories button in the top action bar of DNF Package Manager.

Dnf kernel repo.png

  • Tick the checkbox for the kernel repository and click Save then Close
  • Click the Refresh button to update the package list.

There is also a kernel-latest package in that section which you can install if you would like the latest development kernel added to your system as part of Synaptic Updates when it becomes available.