Remember the last kernel used with `linux-meta`

I notice in the last two updates that linux-meta is switching my default Linux LTS setting from linux612 to linux617. I don’t want that. So, after a major update, is there a way that it would still remember my last kernel choices, other than removing linux-meta?

❯ grep GRUB_SAVEDEFAULT /etc/default/grub
GRUB_SAVEDEFAULT=true

inxi
System:
  Kernel: 6.12.62-1-MANJARO arch: x86_64 bits: 64
  Desktop: Xfce v: 4.20.1 Distro: Manjaro Linux
Machine:
  Type: Laptop System: Acer product: Nitro ANV15-51 v: V1.08
    serial: <superuser required>
  Mobo: RPL model: Sportage_RTH v: V1.08 serial: <superuser required>
    Firmware: UEFI vendor: INSYDE v: 1.08 date: 10/31/2023
Battery:
  ID-1: BAT1 charge: 43.4 Wh (100%) condition: 43.4/58.8 Wh (73.9%)
CPU:
  Info: 10-core (6-mt/4-st) model: 13th Gen Intel Core i7-13620H bits: 64
    type: MST AMCP cache: L2: 9.5 MiB
  Speed (MHz): avg: 1738 min/max: 400/4700:4900:3600 cores: 1: 1738 2: 1738
    3: 1738 4: 1738 5: 1738 6: 1738 7: 1738 8: 1738 9: 1738 10: 1738 11: 1738
    12: 1738 13: 1738 14: 1738 15: 1738 16: 1738
Graphics:
  Device-1: Intel Raptor Lake-P [UHD Graphics] driver: i915 v: kernel
  Device-2: NVIDIA AD107M [GeForce RTX 4050 Max-Q / Mobile] driver: nvidia
    v: 550.163.01
  Device-3: Quanta ACER HD User Facing driver: uvcvideo type: USB
  Display: x11 server: X.Org v: 21.1.21 with: Xwayland v: 24.1.9 driver: X:
    loaded: modesetting,nvidia unloaded: fbdev,nouveau,vesa dri: iris gpu: i915
    resolution: 1: 1920x1080~60Hz 2: 1920x1080~60Hz 3: 1920x1080~144Hz
  API: EGL v: 1.5 drivers: iris,nvidia,swrast
    platforms: gbm,x11,surfaceless,device
  API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: intel mesa v: 25.3.1-arch1.2
    renderer: Mesa Intel Graphics (RPL-P)
  API: Vulkan v: 1.4.328 drivers: intel,nvidia surfaces: N/A
  Info: Tools: api: eglinfo, glxinfo, vulkaninfo de: xfce4-display-settings
    gpu: nvidia-smi x11: xdpyinfo, xprop, xrandr
Audio:
  Device-1: Intel Raptor Lake-P/U/H cAVS driver: sof-audio-pci-intel-tgl
  Device-2: NVIDIA AD107 High Definition Audio driver: snd_hda_intel
  Device-3: HP USB Audio driver: hid-generic,snd-usb-audio,usbhid type: USB
  API: ALSA v: k6.12.62-1-MANJARO status: kernel-api
  Server-1: PipeWire v: 1.4.9 status: active
Network:
  Device-1: Intel Raptor Lake PCH CNVi WiFi driver: iwlwifi
  IF: wlp0s20f3 state: up mac: <filter>
  Device-2: Realtek RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet
    driver: N/A
  Device-3: Realtek RTL8153 Gigabit Ethernet Adapter driver: r8152 type: USB
  IF: enp0s13f0u1u4 state: down mac: <filter>
  IF-ID-1: docker0 state: down mac: <filter>
Bluetooth:
  Device-1: Intel AX201 Bluetooth driver: btusb type: USB
  Report: btmgmt ID: hci0 state: up address: <filter> bt-v: 5.2
RAID:
  Hardware-1: Intel RST Volume Management Device Controller driver: vmd
Drives:
  Local Storage: total: 2.75 TiB used: 1.57 TiB (56.9%)
  ID-1: /dev/nvme0n1 vendor: Western Digital model: WD PC SN740
    SDDQNQD-1T00-1014 size: 953.87 GiB
  ID-2: /dev/nvme1n1 vendor: Samsung model: SSD 970 EVO Plus 2TB
    size: 1.82 TiB
Partition:
  ID-1: / size: 1.31 TiB used: 1.18 TiB (90.1%) fs: ext4 dev: /dev/dm-0
  ID-2: /boot/efi size: 279.4 MiB used: 348 KiB (0.1%) fs: vfat
    dev: /dev/nvme1n1p1
Swap:
  ID-1: swap-1 type: file size: 43.4 GiB used: 5.78 GiB (13.3%) file: /swapfile
Sensors:
  System Temperatures: cpu: 57.2 C mobo: N/A
  Fan Speeds (rpm): N/A
Info:
  Memory: total: 32 GiB note: est. available: 31.05 GiB used: 19.46 GiB (62.7%)
  Processes: 597 Uptime: 2h 40m Shell: Zsh inxi: 3.3.40

It has nothing to do with linux-meta, and that is also not what that package does.

linux-meta is a package that replaces an EOL non-LTS kernel — which itself is getting removed from your system during an update — by the next oldest non-LTS kernel that’s still in the repos.

The problem you’re having stems from the fact that your /boot directory is on a btrfs filesystem. The saving of the last-booted entry in grub happens before the kernel is loaded, by grub directly writing to the filesystem that /boot is on. So far, so good, but the problem is that grub cannot write to btrfs, and in some cases, it even already has difficulty reading from it.

As a result, grub will always boot the kernel with the highest version number.

1 Like

The way is that YOU remember to install what you need.
The meta package is an anti-Alzheimer pill, for those noobs who do not care at all to manage the system. So that they can boot, at all.

3 Likes

So the problem would be solved by removing linux-meta.

No, not at all.

As I wrote higher up, linux-meta has nothing to do with any of this. The problem is grub’s broken support for btrfs.

The only solution, if you really, really, really want grub to remember the last-booted kernel, is to either split off /boot onto a separate and dedicated ext4 partition, or to reinstall your system on an ext4 root filesystem.

There is no other choice.

1 Like

thanks

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.