Arch Linux – How to Switch to LTS Kernel

arch linuxgrubkernellts

I'm running a headless server installation of arch linux. The high rate of kernel upgrades caused me some maintainance headache and I therefore wish to switch to the lts kernel.

I already installed the linux-lts and linux-lts-headers packages. Now, I got both kernels installed but I'm a bit clueless how to continue from here. The docs explain:

[…] you will need to update your bootloader's configuration file to use the LTS kernel and ram disk: vmlinuz-linux-lts and initramfs-linux-lts.img.

I already located them in the boot section:

0 ✓ root@host ~ $ ll /boot/
total 85M
4,0K drwxr-xr-x  4 root root 4,0K 21. Mai 13:46 ./
4,0K drwxr-xr-x 17 root root 4,0K  4. Apr 15:08 ../
4,0K drwxr-xr-x  6 root root 4,0K  4. Apr 14:50 grub/
 27M -rw-r--r--  1 root root  27M 20. Mai 17:01 initramfs-linux-fallback.img
 12M -rw-r--r--  1 root root  12M 20. Mai 17:01 initramfs-linux.img
 27M -rw-r--r--  1 root root  27M 21. Mai 13:46 initramfs-linux-lts-fallback.img
 12M -rw-r--r--  1 root root  12M 21. Mai 13:46 initramfs-linux-lts.img
 16K drwx------  2 root root  16K  4. Apr 14:47 lost+found/
4,3M -rw-r--r--  1 root root 4,3M 11. Mai 22:23 vmlinuz-linux
4,2M -rw-r--r--  1 root root 4,2M 19. Mai 21:05 vmlinuz-linux-lts

Now, I already found entries pointing to the non-lts kernel in the grub.cfg but the header tells me not to edit this file. It points me to the utility grub-mkconfig instead but I can not figure out how to use this tool to tell grub which kernel and ramdisk to use.

How to switch archlinux with grub to the lts kernel? What else do I have to be cautious about when switching the kernel?

Best Answer

Okay, after joe pointed me the right direction in comments, this is how I did it:

  1. basicly just install pacman -S linux-lts

  2. (optional) check if kernel, ramdisk and fallback are available in ls -lsha /boot

  3. remove the standard kernel pacman -R linux

  4. update the grub config grub-mkconfig -o /boot/grub/grub.cfg

  5. reboot

Note, for syslinux you'll need to edit the syslinux config file in /boot/syslinux/syslinux.cfg accordingly, just point everything to the -lts kernel.

Related Question