Systemd & multiple kernels

Hi all… can someone point me to information on how-to modify systemd boot to add additional kernels


See Boot Loader Specification for the full documentation. The ArchWiki has a nice overview:

1 Like

Thank you… got 'er fixed. :wink:

1 Like

Since I just did this and the answer is of course in the wiki…the issue is there are some Archlabs specific things to consider. I am also reviving a year old post I know but the recent issues with grub may have some renewed interest in this topic. This just how I did it and it works but if anyone has an issue with it feel free to remove this post.

First install all the kernels and kernel headers you wish to have.
Archlabs has it’s own .conf file for this. What you are looking for is in: /boot/loader/entries/archlabs.conf
Those directories and file are contained within root so you will need to open it with elevated privileges with an editor. I use nano personally use what you like.
sudo nano /boot/loader/entries/archlabs.conf
It should look like this:

title   ArchLabs Linux
linux   /vmlinuz-linux-zen
initrd  /amd-ucode.img
initrd  /initramfs-linux-zen.img
options root=PARTUUID=7cdf7c53-4586-48e5-b79e-1cced78d6d31 rw

You need to now save this as another file name in the same place. I called it archlabs-lts.conf since I was adding the lts kernel. Then open that file the same way as you just did for archlabs.conf.
Edit these two lines (you should really read the wiki to why you are doing this.):
linux /vmlinuz-linux-zen
initrd /initramfs-linux-zen.img
linux /vmlinuz-linux-lts
initrd /initramfs-linux-lts.img
Don’t change anything else. Save the file.
Now you can optionally enable the service as per the wiki to update systemd boot on boot up as opposed to doing it manually.

systemctl enable systemd-boot-update.service

You should now have a second entry on boot for the new filename you created and it will boot into the lts kernel or the kernel you were adding providing your system can without further intervention. I use all AMD hardware so I almost never have an issue but it’s your system and if you need to add kernel parameters to your kernels it is also in the wiki.