253 words
1 minutes
How to Install Other Kernels on Systemd-Boot
2025-01-27

Hello everyone! Happy New Year! It’s been a while since my last post, but I’m back today with another tutorial for you all. This time, I’ll show you how to easily install custom kernels on systemd-boot without encountering failures or crashes.

NOTE

In this tutorial, I am using Arch Linux. However, aside from the command to install the kernel itself, all the steps remain the same for other distros.

Steps#

1. Open Terminal#

First, we need to open the terminal. Don’t worry—if you’re using Linux, you shouldn’t be afraid of the terminal or command line. Just be patient, and you’ll get the hang of it!

Terminal

2. Install The Kernel#

Next, we can simply install the kernel normally. In my case, since I’m using Arch Linux, I can just do the following:

yay -Sy linux-cachyos linux-cachyos-headers

InstallKernel

3. Create Boot Loader Entry#

Afterward, we can simply duplicate an existing boot loader entry and make some adjustments to it. For example, in my case:

ExistingEntry

# duplicate entry
sudo cp /boot/loader/entries/2024-09-09_14-28-04_linux-zen.conf /boot/loader/entries/cachyos.conf
# edit duplicated entry
sudo vim /boot/loader/entries/cachyos.conf

Then, modify the title, linux, and initrd entries according to the newly installed Linux kernel.

EditEntry

WARNING

Do not modify the options unless you are certain about what you are doing.

3.1 Set Default Kernel (Optional)#

If you want to ensure that your system always boots into the newly installed kernel, you can simply do the following:

sudo vim /boot/loader/loader.conf

Then, add the default variable followed by the filename of your boot loader entry. For example:

default

4. Reboot#

Finally, all you need to do is reboot your device and select your newly installed kernel to boot into it.

done

How to Install Other Kernels on Systemd-Boot
https://blog.rei.my.id/posts/5/how-to-install-other-kernels-on-systemd-boot/
Author
Reidho Satria
Published at
2025-01-27