How to switch arch linux to lts kernel?
Okay, after joe pointed me the right direction in comments, this is how I did it:
basicly just install
pacman -S linux-lts
(optional) check if kernel, ramdisk and fallback are available in
ls -lsha /boot
remove the standard kernel
pacman -R linux
update the grub config
grub-mkconfig -o /boot/grub/grub.cfg
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.
The answer from Afri works well for GRUB, but I’m using UEFI directly, which is more lightweight and makes full use of the UEFI motherboard.
- Install
linux-lts
- (optional) Check if LTS version of kernel, ramdisk and fallback are available in
/boot
folder. Generate the EFI entry, the same way as you generated the regular Linux one, but replacing ramdisk and loader with the LTS ones. For example:
efibootmgr --disk /dev/sdX --part Y --create --label "Arch Linux LTS" --loader /vmlinuz-linux-lts --unicode 'root=PARTUUID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX rw initrd=\initramfs-linux-lts.img' --verbose
Note the
--loader
value andinitrd
value. These files should be in the/boot
folder.Reboot. You may want to adjust the boot order in motherboad before booting into the operating system, for example by pressing F12 (depending on your motherboard). I actually use Hyper-V, which allows boot order configuration in "Hyper-V Manager".
(optional) After successfully booting into the LTS kernel (verify it with
uname -r
), remove the standard kernel withpacman -R linux
.
Install
linux-lts
(or any other kernel):pacman -S linux-lts
Update your boot loader entry:
$ sudo vim /boot/loader/entries/arch.conf
and change:
linux /vmlinuz-linux initrd /initramfs-linux.img ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ linux /vmlinuz-linux-lts initrd /initramfs-linux-lts.img
- Reboot and confirm with
uname -r