How to Install Linux Kernel 6.1 on Debian 11 or 10

The Linux Kernel 6.1 version can be utilized on Debian 11 Bullseye and Debian 10 Buster systems, bringing many new features and upgrades. This includes early support for Rust programming language, improved performance of the Btrfs file system, advancements in Intel Arc graphics, further development for AMD RDNA3 graphics processing units, Thunderbolt compatibility for Intel Meteor Lake, broader support for audio systems, support for Xbox One Elite Controller paddles, better support for Nintendo replica controllers, and initial support for DualSense Edge controllers. This release also includes many other updates, making it a significant update for Linux users.

The tutorial will guide you through adding the sid repository and creating an apt pin using the command line terminal, allowing you to install Linux Kernel 6.1 on Debian 11 or 10 Bullseye with the Debian team’s upstream Kernel release.

Step 1: Update Debian

It’s recommended that you ensure your system is fully updated with all available packages before proceeding with the tutorial.

sudo apt update

For those who want to review or are simply curious, it’s optional to list the updates.

apt --list upgradable

Proceed to upgrade any outdated packages using the following command.

sudo apt upgrade

Step 2: Import Sid / Unstable Repository

The following instructions will detail importing the sid repository, also known as the unstable repository. To begin, copy and paste the command provided.

echo "deb http://deb.debian.org/debian unstable main contrib non-free" | sudo tee -a /etc/apt/sources.list
echo "deb-src http://deb.debian.org/debian unstable main contrib non-free" | sudo tee -a /etc/apt/sources.list

Step 3: Create APT Pinning File

To avoid having different version branches prompt for updates from the experimental repository, apt-pinning is a simple solution. To set up the required APT pinning, copy and run the following command in your terminal.

Note, replace “Pin: release a=bullseye” with “Pin: release a=buster” if you use Debian 10.

sudo tee /etc/apt/preferences<<EOF
Package: *
Pin: release a=bullseye
Pin-Priority: 500

Package: linux-image-amd64
Pin:release a=unstable
Pin-Priority: 1000

Package: *
Pin: release a=unstable
Pin-Priority: 100
EOF

Please remember to replace the amd64 with the architecture of your system.

If you wish to verify that the preferences file has been added successfully, you can open it using a text editor like nano.

sudo nano /etc/apt/preferences

Example:

example apt pinning with sid on debian 11 or 10 for linux kernel upgradePin

The process is set up so that all packages are preferred to Bullseye with a higher score (500) than unstable (100), ensuring that you will not be prompted to update various packages from the unstable repository.

To make it easy to keep the kernel up-to-date when you run the apt update command for your standard Bullseye packages, the APT pinning you imported sets the linux-image-amd64 package as a high priority (1000) using the unstable repository above any other source for that package.

Step 4: Install Linux Kernel 6.1

Before proceeding, the first step is to refresh your repository to reflect the changes made to your sources list and preferences.

sudo apt update

You will now have an available package to update.

1 package can be upgraded. Run 'apt list --upgradable' to see it.

To update to Linux Kernel 6.1, run the apt upgrade command as specified in the preferences.

sudo apt upgrade

Once the update process is completed, you will need to reboot your system for the new Linux Kernel to take effect.

reboot

After rebooting, open the terminal and type the following command to confirm the installation of the new Linux Kernel.

uname -r

Example output:

6.1.0-2-amd64

In the future, when you run the apt update command to check for updates for your Debian system repository packages, any new updates for the Linux Kernel will be automatically detected.

Additional Commands & Tips

How to Restore the Default Kernel

It’s important to note that some users may encounter issues with their hardware, such as loss of sound when using the new Linux Kernel. If this occurs, the following steps can be taken to restore the default kernel.

To begin the process of removing the kernel, the first step is to execute the following command.

sudo apt autoremove linux-image-6.1*

It’s important to note that after executing the above command, you will see a prompt that advises you to make sure a kernel is installed or re-installed before rebooting if you remove the current 6.1 kernel. Failure to do so may cause serious issues, such as rendering your system unbootable or broken.

Example:

Press the tab key, select <No>, and press the ENTER KEY.

It’s important to note that for users who have configured their preferences file for this package, you can remove the experimental repository or take out the kernel priority package referencing the unstable repository to avoid future updates from the unstable repository.

As an example, you can remove the preferences file.

sudo rm /etc/apt/preferences

Import the alternative with the kernel package now removed.

Note, replace “Pin: release a=bullseye” with “Pin: release a=buster” if you use Debian 10.

sudo tee /etc/apt/preferences<<EOF
Package: *
Pin: release a=bullseye
Pin-Priority: 500

Package: *
Pin: release a=unstable
Pin-Priority: 100
EOF

After sorting the preferences file or if you went a step further and removed the unstable repositories, now it’s time to execute an APT update.

sudo apt update

Before rebooting the system, ensure that the default generic kernel is installed.

sudo apt install --reinstall linux-image-generic

After verifying that the default kernel is installed, it’s time to reboot the system.

reboot

Now verify the kernel installed, which should be the default generic kernel.

uname -r

Example output:

5.x.x-x-amd64

As previously mentioned, you have successfully reverted to the default kernel.

Conclusion

In conclusion, installing Linux Kernel 6.1 on Debian 11 or 10 Bullseye can provide a variety of new enhancements and upgrades, such as preliminary support for the Rust programming language and increased performance of the Btrfs file system. However, as with any update, it’s important to ensure your system is up-to-date before proceeding and to keep in mind the potential for hardware issues. Using apt-pinning can help avoid having different version branches causing your system to prompt for updates from the experimental repository. And, if any problems arise, you can always revert to the default kernel by removing the experimental repository or taking out the kernel priority package referencing the unstable repository and rebooting the system.

Share to...