- Different Types of Kernel for Arch Linux and How to Use Them
- Different types of kernels available for Arch Linux
- Mainline kernel (package name: linux)
- LTS kernel (package name: linux-lts)
- Hardened kernel (package name: linux-hardened)
- Performance-tuned kernel (package name: linux-zen)
- How to switch kernels on Arch Linux
- Step 1: Install the kernel of your choice
- Step 2: Tweak the grub configuration file to add more kernel options
- Step 3: Re-generate the GRUB configuration file
- Conclusion
- Switch to a 64-bit Linux Kernel
- Switch to a 64-bit Kernel
- Considerations
- Ubuntu and Debian
- CentOS and Fedora
- Arch Linux
- Gentoo
- More Information
- How to switch between different Linux Kernels on Arch Linux
- The Different Types of Kernels
- Mainline kernel
- LTS kernel
- Hardened kernel
- Performance-tuned kernel
- Switching Between Kernels in Arch Linux
- Step 1. Install the Desired Linux Kernel
- Step 2. Tweak the Grub Configuration File
- Disable the grub sub-menu
- Re-Generate the Grub Configuration File
- Conclusion
Different Types of Kernel for Arch Linux and How to Use Them
Last updated October 19, 2020 By Dimitrios 11 Comments
One of the reasons why people use Arch Linux is that it is a bleeding edge rolling release. You get most software and the Linux kernel before users of other distributions.
But this doesn’t mean that you have to always use the latest mainline kernel. There are several kernel options available, and I am going to show you switch kernels in Arch Linux.
Different types of kernels available for Arch Linux
First, let me tell you about different kinds of Linux kernels available to you as an Arch user.
Mainline kernel (package name: linux)
This is the latest stable Linux kernel. Most people use this kernel for the reason that it is the latest available kernel version.
LTS kernel (package name: linux-lts)
The linux-lts package gives you the latest long term support Linux kernel. There is no predefined life cycle for a LTS kernel but you can be assured to enjoy the same kernel version for a much longer period.
Kernel patches normally don’t break anything but a breakage is not impossible to happen. If your hardware isn’t the newest the market can offer, you can enjoy the bleeding edge software with increased stability by installing the slightly older LTS kernel.
Hardened kernel (package name: linux-hardened)
For the security concerned users, there is a hardened version of the latest stable kernel. Do note that several packages will not work when using this kernel.
Performance-tuned kernel (package name: linux-zen)
If you want to get the most out of your system, you can use the “Zen” kernel which is basically a fork from the latest kernel and provides tunes at the cost of throughput and power usage.
How to switch kernels on Arch Linux
Now that you are aware of various kernel choices, let’s see how to change kernel in Arch Linux.
It is a two step process:
- Install the Linux kernel of your choice
- Tweak the grub config file to add the newly installed kernel
Don’t worry, I am going to show you the steps in details.
Check the kernel version in arch Linux using this command:
If it shows only a number
To switch kernels on Arch, can be simply done by installing the kernel that you want to use and tweak the grub configuration file.
Step 1: Install the kernel of your choice
You can use the pacman command to install the Linux kernel of your choice. You just need to know the package name.
You may also install more than one type of Linux kernels at the same time in the system. You can choose which kernel to use from the grub menu.
For the latest stable kernel:
For the latest LTS kernel:
For latest stable kernel with hardened patches:
To get the Zen kernel:
Step 2: Tweak the grub configuration file to add more kernel options
By default, Arch Linux uses the latest kernel version as the default. Additional kernel versions are available from under the advanced options:
However, I prefer to do things a bit different and a bit better (in my opinion). Here’s what I do:
- Disable grub submenu so that all the available kernel versions are shown on the main screen (instead of under Advanced Options).
- Configure grub to recall the last kernel entry you booted and use it as the default entry to boot from the next time.
Sounds a lot better already, does it not?
To do this you need to edit the GRUB configuration file. All the configuration files in general are located at the /etc directory.
Open your terminal and edit the config file in your favorite terminal-based text editor. I am using Nano editor:
As you may notice I have changed the value that I mentioned but I have added another 2 lines so the final result should look like this:
The first and optional line is used to disable the GRUB submenu. I find it easier when instantly I can see all my kernels on the GRUB screen without having to enter the advanced options submenu.
The second line is used to save the last kernel entry.
Lastly you need to ensure that GRUB will use as a default the last saved entry.
Save the configuration file and exit.
Step 3: Re-generate the GRUB configuration file
To make the changes effective you need to re-generate the configuration file. To do so, open the terminal and run the following command:
If it looks familiar to you, you have used this command during the Arch Linux installation process.
Reboot your Linux system and select the kernel you want to use!
Conclusion
You don’t need to worry about updating the kernel in Arch Linux. If there are updates to your choice of kernel, it will be installed with the system updates. I guess you already know how to update Arch Linux system.
Switching kernels on Arch Linux is an easy to do process with several options tailored to your needs. I find the above method the safest and easiest as you don’t need to remove a kernel from your system. If you choose to run the latest kernel, it’s good to have installed the LTS kernel in case of a kernel panic.
I hope you liked this Arch Linux tip. Stay subscribed to It’s FOSS for more tips and tutorials.
Like what you read? Please share it with others.
Источник
Switch to a 64-bit Linux Kernel
Before an existing Linode can be migrated to a new host, you’ll need to ensure that all configuration profiles on that Linode are using a 64-bit kernel. This guide will show you how to make that switch, and warn about some of the more common issues to look out for in the process.
Switch to a 64-bit Kernel
Next to your Configuration Profile, click Edit.
Under Boot Settings click on the Kernel drop down. Select the Latest 64 bit option.
Press Save Changes, which will take you back to your Linode Dashboard. Now reboot your Linode.
Considerations
Switching to a 64-bit kernel does not mean you now have a 64-bit deployment of Linux. Until you redeploy, your user space and libraries will still be 32-bit. The 64-bit kernel will happily run software designed for 32-bit, but specific pieces of software may conflict with the new kernel.
The following is a list of software with known issues running on a 32-bit distribution with a 64-bit kernel. If you rely on any of these packages, we suggest a rebuild to a 64-bit distribution.
If you’re ready to rebuild your Linode using a 64-bit distribution, you can start by following the steps outlined in our Disks and Configuration Profiles guide to create a second deployment. From there, you can copy your data to the new 64-bit version, then delete your old profile and disks.
Otherwise, find your Linux distribution of choice below to check for additional known issues.
Ubuntu and Debian
For Ubuntu and Debian users, the Apt package management system will continue to download correct architecture version of software, despite the new kernel.
CentOS and Fedora
When switching a 32-bit CentOS or Fedora build to use a 64-bit kernel, you need to configure the distro’s package manager (Yum) to explicitly download x86 architecture builds of updates to existing and new packages. If you haven’t already, we recommend CentOS users switch to the package mirrors Linode provides. The instructions to switch to Linode’s package mirrors are in the package mirrors guide. Regardless of your decision to use our mirrors, you will want to run this command to ensure that only 32-bit packages are selected:
Once this is done, run a cleanup of yum:
Now all future software installed from Yum will use the correct CPU architecture for your 32-bit user space.
Arch Linux
The Arch package manager, Pacman, chooses what architecture-specific builds to download based on the kernel. After switching to the 64-bit kernel, adjust this setting in /etc/pacman.conf :
Gentoo
In Gentoo, all packages are compiled on the system. Ensure that the -m32 flag is set in CFLAGS .
More Information
You may wish to consult the following resources for additional information on this topic. While these are provided in the hope that they will be useful, please note that we cannot vouch for the accuracy or timeliness of externally hosted materials.
This page was originally published on Monday, April 14, 2014.
Источник
How to switch between different Linux Kernels on Arch Linux
Switching kernels can also come in handy when troubleshooting issues on your PC. We will show you how to switch between different kernels on Arch Linux.
A rch Linux is a popular Linux distribution that strives to stay on the bleeding edge rolling release, providing users with the latest software and packages. Even though the installation process is considered a little too hard, Arch Linux still maintains a large pool of users and a huge community fan base.
If you want to get the latest software packages and the kernel before they are shipped to other distributions, you should try Arch Linux. Please check out our Complete Master Guide on How to install Arch Linux.
Even though Arch Linux is commonly listed as one of the bleeding edge rolling releases available, you don’t have to stick to the latest mainline kernel. There several kernels available for Arch Linux, and you can actually install all of them. In this post, we will show you how to switch between different kernels on Arch Linux. Let’s dive in!
The Different Types of Kernels
In this post, we will look at the four main Kernels available for Arch Linux. They are:
- Mainline kernel
- LTS kernel
- Hardened kernel
- Performance-tuned kernel
Mainline kernel
The mainline kernel is the latest stable kernel available with the package name Linux. A huge number of Arch Linux users run this kernel due to the latest software packages available. To install this kernel, execute the command below:
Install Mainline kernel
From the image above, you can see I am currently running the mainline kernel, and it will be re-installed.
LTS kernel
Like its name, the LTS (Long Term Supported) kernel is the longest supported Arch Linux kernel. Even though there is no specified time frame of how long the kernel will be supported, you can be assured you will enjoy the kernel for quite a while. To install the LTS kernel execute the command below:
Hardened kernel
If you are focused more on security, you might consider running the hardened kernel, which goes with the Linux-hardened package name. Please note that some packages might not work well or work on this kernel due to the security features. To install the hardened kernel, use the command below:
Performance-tuned kernel
The performance-tuned kernel or commonly known as the Zen kernel, is a product of the collaboration of kernel developers to bring out the best Linux kernel available. It is forked from the latest kernel, and you are therefore assured of the latest stable packages available. To install the zen kernel, execute the command below:
Switching Between Kernels in Arch Linux
We will break down this into two steps:
- Install the desired Linux kernel
- Tweak the grub configuration file
Step 1. Install the Desired Linux Kernel
Select any kernel that you wish to install and install it with the commands provided above. In this post, we will install all four kernels.
Step 2. Tweak the Grub Configuration File
By default, Arch Linux uses the latest mainline kernel as the default kernel. All the others are available under the Advanced options in the grub menu on boot.
Advanced Options
However, to make things a little more orderly, we will perform to basic tasks:
- Disable the grub sub-menu enabling all kernels to be listed on the Kernel’s boot screen without the Advanced option feature.
- Configure grub to boot from the kernel used in the previous boot.
Disable the grub sub-menu
We will need to tweak the grub configuration to disable the grub sub-menu. Open the grub configuration file with the command below:
Grub configuration file
From the image above, you will notice I have set the value of GRUB_DEFAULT to true and added two more lines. The total changes include:
Save the file (Ctrl + O, then Enter) and Exit (Ctrl + X).
Re-Generate the Grub Configuration File
Since we have made some changes to grub, we will need to regenerate the grub configuration file. Execute the command below:
If you can recall, you used this command during Arch Linux installation. Now reboot your PC and select the desired Linux Kernel.
Select the desired kernel
Conclusion
That’s it! I believe you now know how easy it is to switch between Kernels in Arch Linux. Switching kernels can also come in handy when troubleshooting issues on your PC. In my case, Bluetooth wasn’t working on the mainline kernel, but on switching to the zen kernel, it worked flawlessly. Do you have any additional tips or questions you wish to share with our readers? Please feel free to leave a comment below.
Источник