Update/configure systemd-boot after Kubuntu install
Systemd-boot: How can I specify that the system always boots from the LTS kernel?
How do I set a default Linux kernel (or downgrade it)?
Select kernel at boot
Videos
This has been infuriating me a lot. I updated the system, now it's on Linux 6.18 kernel. But as you may know it's buggy. The most fatal one for me is speaker not working. I managed to switch to the LTS kernel via grub.
So I thought of setting it as the default. After some google searches, apparently I need to go to /etc/default/grub, change to GRUB_DEFAULT=saved and GRUB_SAVEDEFAULT=true. I then rebuilt it using sudo grub-mkconfig -o /boot/grub/grub.cfg.
Except it doesn't work, I got error: commands/loadenv.c:check_blocklists:289: sparse file not allowed.. Apparently it's because I used btrfs. So I reverted the grub config file. But then I have to manually go to the "Advanced" menu (second menu) thing, then select the LTS kernel.
How do I just... set a default kernel? Is that not possible with btrfs?
If that's not possible, how do I just downgrade the kernel back to 6.17.9 then? I'm afraid it would screw my Linux installation
Adding CoreCtrl systemd-boot Kernel Parameter
In CachyOS, changing the systemd-boot kernel parameter is not straightforward. In this case, we can use their Systemd-boot-manager sdboot and change its kernel parameter to force systemd-boot to boot with the parameters needed for CoreCtrl.
On your terminal, write:
sudo nano /etc/sdboot/manage.conf
or sometimes:
sudo nano /etc/sdboot-manage.conf
(On two installations, I had them in different locations.) Look for LINUX_OPTIONS—it's usually near the top of the file. Near the end of the line, before the quotation mark, add the following parameter:
amdgpu.ppfeaturemask=0xffffffff
acording to u/Equalescent you need to run the following command to make the changes take effect.
sudo sdboot-manage gen
comment post
Reference: CoreCtrl Setup Docs
Hi! I get really strange behavior of pacman: updating kernel removes all entries:
> ls /boot/loader/entries arch.conf
> cat /boot/loader/entries/arch.conf title Arch Linux linux /vmlinuz-linux initrd /intel-ucode.img initrd /initramfs-linux.img options root=/dev/nvme0n1p5 rootflags=subvol=@ rw
> cat /boot/loader/loader.conf default arch.conf timeout 3 #console-mode keep
> sudo pacman -Sy linux .... .... (4/4) Updating systemd-boot entries Error: There are no boot loader entries after entry generation error: command failed to execute correctly
> ls /boot/loader/entries <empty>
Hey y'all I installed cachyos on my gaming PC and I believe I chose grub or systems but I kinda want to switch to liimine, is there any way to do that after the fact?
Also, what is the preferred for a dual boot? I have windows on another drive and wouldn't mind setting it up, is grub the only one?
First, your system has now been updated to kernel 5.17.5, and 5.16.19 is now probably the old-kernel. Please show the output of sudo bootctl list.
I don't use Pop OS myself, but as far as I've understood systemd-boot, the command to set the default boot entry is probably bootctl set-default, and the command to view the available boot entries is bootctl list.
Assuming I've understood correctly, kernelstub command just manages the details of each kernel, defaulting to operating on the newest one if you don't specify the exact kernel.
Since your kernelstub -v -l ... command apparently worked, there should be now a third entry for Pop OS in the bootctl list, with the 5.15 kernel that was first pushed into the old-kernel slot by 5.16 and then off the list entirely(?) by the introduction of 5.17. So you're on the right track, but just need a few more steps.
By using sudo bootctl list and sudo bootctl set-default you should be able to get the 5.15 kernel back into position as the default boot option.
After that, as long as you need to stick with your old ElasticSearch, you'll want to stop the new kernel packages from arriving. You should set up a package manager hold for the the kernel metapackage that has the latest kernel package as a dependency. It's the upgrade of the metapackage that triggers the installation of a new kernel image package.
In Debian, that would be linux-image-amd64, and the highest-level linux-image-generic would be a virtual package. It seems the Pop OS builders have simplified the structure a bit, and in your case, the metapackage would seem to be linux-image-generic instead.
You can use a GUI package manager to set up holds too, but on the command line it would be:
sudo apt-mark hold linux-image-generic
or
echo "linux-image-generic hold" | sudo dpkg --set-selections
To view existing package holds:
dpkg --get-selections | grep "\<hold$"
or
apt-mark showhold
Eventually, you might upgrade your ElasticSearch or otherwise get rid of the requirement to keep with the 5.15 kernel. At that point, you would want to remove the hold to allow kernel updates again:
sudo apt-mark unhold linux-image-generic
or
echo "linux-image-generic install" | sudo dpkg --set-selections
I've had a similar issue where I messed up the kernel versions on Pop!_OS 22.04 and had to go back and forth between versions to see the best one.
To set my kernel version to 6.6.10, I used
# update-initramfs -u -k 6.6.10-76060610-generic
Which is supposed to "Update an existing initramfs" using the kernel version 6.6.10-... (you can use tab to autofill the full kernel version if you only know the beginning of it)
This fixed the kernelstub -p display and used the wanted kernel (6.6.10) on startup. After a reboot:
$ uname -r
6.6.10-76060610-generic
$ sudo kernelstub -p
...
Kernel Boot Options:.quiet loglevel=0 systemd.show_status=false splash systemd.unified_cgroup_hierarchy=0
Kernel Image Path:.../boot/vmlinuz-6.6.10-76060610-generic
Initrd Image Path:.../boot/initrd.img-6.6.10-76060610-generic
Force-overwrite:.....False
...
As for checking the kernel versions used by the "Current" and "Old" configs, I compared the checksum of the kernel images in the /boot/efi/EFI/Pop.../ directory and the /boot/ directory, as the ones in /boot/ had the versions in the filename. Hacky, but it worked.