Put Fedora kernel on HOLD to prevent its removal on updates

In Ubuntu, I have put the few kernels that work flawlessly ON HOLD (locks it to prevent updater from removing them) by using these commands:

First, I use “dpkg --list | grep linux-image” as this will show a list of installed kernel packages, such as linux-image-6.8.0-85-generic…

Then I pick the kernel that I want to KEEP ALWAYS:

"apt-mark hold ‘kernel-package name’ "

doesn’t work on Fedora…

Not possible in Fedora. It isn’t straightforward. If you still want to get new kernels and keep some you’ll have to do manual kernel removal like sudo dnf remove kernel*6.12.77* kernel*6.19.9* from time to time and prevent dnf from auto removing then by putting in your /etc/dnf/dnf.conf installonly_limit=5 to keep 5 kernels max because of limited disk space in /boot. 5 is a suggestion. Remove unneeded kernels manually before dns starts to do it.

You could also set it to 0 instead of 5 to disable it completely. In such a case you are required to remove kernels manually to prevent eating up all disk space which would render your system unbootable.

There is the dnf versionlock plugin that should do the trick, although I’ve not used it with the kernel package:

versionlock doesnt work for kernel unfortunately: versionlock: ignored for `kernel` upgrade · Issue #2368 · rpm-software-management/dnf5 · GitHub

You could try, though someone mentioned that this isnt possible either Perfect Fedora WS - how to "pin" a specific kernel - #8 by anothermindbomb

I was aware of versionlock however a recent discussion mentioned it doesn’t work with kernels so I didn’t suggest it. I never tested it myself though.

OK - Thanks!

That’ll work: I put installonly_limit=0 in my /etc/dnf/dnf.conf, and we’ll just dump the ones that I have issues with (none so far)

my /boot is 2Gb w/1.5Gb free, so plenty of room for now - will keep watch on it

:wink:

Ditto. Happy you figured it out. Good luck!

OK - so thankfully I’m using Ubuntu grub and not the Fedora grub - with that I can use Ubuntu’s Grub Customizer to tweak my bootloader. I can add newer Fedora kernels as they come along, test them, and reject them by removing the newest as default…

Case in point: Currently my grub’s Fedora part of the list has 6.19.11-200.fc43.x86_64 as default. The latest two Fedora kernels were total crap and are now in the Fedora submenu where also any new kernel Fedora puts at me will land after getting tested and faiing. 6.19.12-200.fc43.x86_64 kept crashing firefox. 6.19.13-200.fc43.x86_64 won’t even run Conky. I’ll use sudo dnf remove kernel*6.19.12* kernel*6.19.13* and any other newer kernel that tries to break my Fedora later on…

Updates, either Ubuntu or Fedora, are great at just breaking things under the guise of ‘fixing bugs’. My grub’s Ubuntu part of the list uses 6.8.0-85 kernel as default, not the 6.8.0-110 current one now in the Ubuntu submenu due to it’s own failings (as did the previous five or more…)

:angry:

I read you. Granted, they’re not tested a lot. Debian is way better at this for extra stability. I ran it since debian 2. I ran ubuntu once, years ago and it crashed miserably, so never more.

And don’t forget most programs nowadays are full of bloat and patches over patches. With the execption of command line linux programs that do one thing and do it well. The sound system in linux is the perfect example. First there was OSS, then some obscure geek forced Alsa on us. With zero meaningful documentation. Then it was jack, then pulseaudio, then pipewire and wireplumber. All audio programs stopped working at one point or another. Have a look at my program to sound a chime at the top of the hour. Commented out are the audio programs that stopped working over 25 years.

~$ cat /home/shizuma/bin/bigben
#!/bin/sh
export XDG_RUNTIME_DIR=/run/user/1000
export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
export PIPEWIRE_RUNTIME_DIR=/run/user/1000
#PLAY="wavplay -q"
#PLAY="aplay -D pulse -q"
#PLAY="aplay -D plug:dmix -q"
#PLAY="alsaplayer -r -o alsa"
#PLAY=esdplay
#PLAY=artsplay
PLAY=pw-play
#PLAY="aplay -D pipewire -q"
THISHOUR=$(date +%l)
while [ $THISHOUR -ge 1 ]; do
    $PLAY /usr/share/sounds/towrclok.wav &
    sleep 3
    THISHOUR=$(($THISHOUR - 1))
done

All in all, my old 386sx33 with 1MB of RAM, a 8/16 bit machine was way faster that any modern computer, until I installed windows 3! Because the programs nowadays are monstruously huge.

I began computing back with a terminal on mainframe w/punch cards … then came Fortran 77… my first personal computer was a Victor 7000 running CPM - no hard drive - used 5 1/4" floppy on a variable speed floppy drive ~ got 1.0Mb storage on it… then DOS 1.0 came out.

Funny thing is that my computational fluid dynamics fire simulator runs in Windows XP64 using a Fortran shell :smiley:

@firebat
@josevillani

Please keep the discussion related to the issue shown in the title and first post.

Reminiscing about past history is off topic and can get your posts flagged as such, so please stay on topic.

Oops - sorry… my BAD :pensive_face:

Sure, no problem. Will do. Thanks!

6.19.11-200.fc43.x86_64 back as default as Fedora 43’s latest and greatest 6.19.14-200.fc43.x86_64 keeps crashing firefox like 6.19.12-200.fc43.x86_64 did (6.19.9 and 6.19.12 now removed… hanging onto 13 (doesn’t like Conky) /14 (crashes firefox) for now but they’re both heading to the trash bin soon!)

If only changing the kernel crashes I would assume its something to do with your hardware, maybe GPU. I’m don’t recall others reporting Firefox crashes.

What is your hardware, output of inxi -Fzxx please?

firebat@batgirl-E-475M:~$ inxi -Fzxx
bash: inxi: command not found…
Install package ‘inxi’ to provide command ‘inxi’? [N/y] n

The inxi command is very useful for troubleshooting. When asked to provide the output please install it and then provide the asked for data.

sudo apt-get install inxi
[sudo] password for batgirl:
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
Package inxi is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package ‘inxi’ has no installation candidate

FINALLY got inxi installed on Ubuntu… long story :wink:

batgirl@batgirl-E-475M:~/Desktop$ inxi -Fzxx
System:
  Kernel: 6.8.0-111-generic arch: x86_64 bits: 64 compiler: gcc v: 13.3.0
  Desktop: GNOME v: 46.0 tk: GTK v: 3.24.41 wm: gnome-shell dm: GDM3
    Distro: Ubuntu 24.04.3 LTS (Noble Numbat)
Machine:
  Type: Portable System: Gateway product: E-475M v: 3408494R
    serial: <superuser required> Chassis: type: 8 v: Rev.1
    serial: <superuser required>
  Mobo: Gateway model: N/A v: 86.05 serial: <superuser required>
    BIOS: Phoenix v: 86.05 date: 10/30/2007
Battery:
  ID-1: BAT1 charge: 30.3 Wh (99.0%) condition: 30.6/47.5 Wh (64.3%)
    volts: 12.4 min: 10.8 model: SMP-PAN24 MAL32b serial: N/A
    status: not charging
CPU:
  Info: dual core model: Intel Core2 Duo T7250 bits: 64 type: MCP
    arch: Core2 Merom rev: D cache: L1: 128 KiB L2: 2 MiB
  Speed (MHz): avg: 798 min/max: 800/2001 boost: enabled cores: 1: 798
    2: 798 bogomips: 7980
  Flags: ht lm nx pae sse sse2 sse3 ssse3
Graphics:
  Device-1: Intel Mobile GM965/GL960 Integrated Graphics vendor: Gateway
    driver: i915 v: kernel arch: Gen-4 ports: active: LVDS-1,VGA-1
    empty: DVI-D-1,SVIDEO-1 bus-ID: 00:02.0 chip-ID: 8086:2a02
  Display: wayland server: X.org v: 1.21.1.11 with: Xwayland v: 23.2.6
    compositor: gnome-shell driver: X: loaded: vesa unloaded: fbdev,modesetting
    gpu: i915 display-ID: 0
  Monitor-1: LVDS-1 model: Seiko Epson 0x3746 res: 1680x1050 dpi: 129
    diag: 390mm (15.4")
  Monitor-2: VGA-1 model: Acer E211H res: 1920x1080 dpi: 102
    diag: 547mm (21.5")
  API: EGL v: 1.5 platforms: device: 0 drv: crocus device: 1 drv: swrast
    gbm: drv: crocus surfaceless: drv: crocus wayland: drv: crocus x11:
    drv: crocus
  API: OpenGL v: 4.5 compat-v: 2.1 vendor: intel mesa
    v: 25.0.7-0ubuntu0.24.04.2 glx-v: 1.4 direct-render: yes
    renderer: Mesa Intel 965GM (CL) device-ID: 8086:2a02 display-ID: :0.0
Audio:
  Device-1: Intel 82801H HD Audio vendor: Gateway driver: snd_hda_intel
    v: kernel bus-ID: 00:1b.0 chip-ID: 8086:284b
  API: ALSA v: k6.8.0-111-generic status: kernel-api
  Server-1: PipeWire v: 1.0.5 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
Network:
  Device-1: Intel 82566MC Gigabit Network vendor: Gateway driver: e1000e
    v: kernel port: 1820 bus-ID: 00:19.0 chip-ID: 8086:104d
  IF: enp0s25 state: up speed: 1000 Mbps duplex: full mac: <filter>
  Device-2: Intel PRO/Wireless 3945ABG [Golan] Network driver: iwl3945
    v: in-tree:s pcie: speed: 2.5 GT/s lanes: 1 bus-ID: 02:00.0
    chip-ID: 8086:4222
  IF: wlp2s0 state: up mac: <filter>
  Device-3: Qualcomm Atheros AR9271 802.11n driver: ath9k_htc type: USB
    rev: 2.0 speed: 480 Mb/s lanes: 1 bus-ID: 2-4:4 chip-ID: 0cf3:9271
  IF: wlxe8de27a17927 state: up mac: <filter>
Drives:
  Local Storage: total: 465.76 GiB used: 72.62 GiB (15.6%)
  ID-1: /dev/sda vendor: Toshiba model: MQ01ABD050V size: 465.76 GiB
    speed: 3.0 Gb/s serial: <filter>
Partition:
  ID-1: / size: 95.81 GiB used: 72.62 GiB (75.8%) fs: ext4 dev: /dev/sda5
Swap:
  ID-1: swap-1 type: file size: 8 GiB used: 5.3 MiB (0.1%) priority: -2
    file: /swapfile
Sensors:
  System Temperatures: cpu: 59.0 C mobo: N/A
  Fan Speeds (rpm): N/A
Info:
  Memory: total: 4 GiB available: 3.82 GiB used: 1.99 GiB (52.2%)
  Processes: 227 Power: uptime: 14m wakeups: 0 Init: systemd v: 255
    target: graphical (5) default: graphical
  Packages: 3441 pm: dpkg pkgs: 3388 pm: flatpak pkgs: 7 pm: snap pkgs: 46
    Compilers: gcc: 13.3.0 alt: 9/11 Shell: Bash v: 5.2.21
    running-in: gnome-terminal inxi: 3.3.34
batgirl@batgirl-E-475M:~/Desktop$ 

…and here the output is under Fedora:

firebat@fedora:~$ inxi -Fzxx
System:
  Kernel: 6.19.11-200.fc43.x86_64 arch: x86_64 bits: 64 compiler: gcc
    v: 15.2.1
  Desktop: GNOME v: 49.6 tk: GTK v: 3.24.52 wm: gnome-shell dm: GDM
    Distro: Fedora Linux 43 (Workstation Edition)
Machine:
  Type: Portable System: Gateway product: E-475M v: 3408494R
    serial: <superuser required> Chassis: type: 8 v: Rev.1
    serial: <superuser required>
  Mobo: Gateway model: N/A v: 86.05 serial: <superuser required>
    Firmware: BIOS vendor: Phoenix v: 86.05 date: 10/30/2007
Battery:
  ID-1: BAT1 charge: 30.6 Wh (100%) condition: 30.6/47.5 Wh (64.3%)
    volts: 12.44 min: 10.8 model: SMP-PAN24 MAL32b serial: N/A charging:
    status: not charging cycles: N/A
CPU:
  Info: dual core model: Intel Core2 Duo T7250 bits: 64 type: MCP
    arch: Core2 Merom rev: D cache: L1: 128 KiB L2: 2 MiB
  Speed (MHz): avg: 1995 min/max: 800/2001 boost: enabled cores: 1: 1995
    2: 1995 bogomips: 7979
  Flags-basic: ht lm nx pae sse sse2 sse3 ssse3
Graphics:
  Device-1: Intel Mobile GM965/GL960 Integrated Graphics vendor: Gateway
    driver: i915 v: kernel arch: Gen-4 ports: active: LVDS-1,VGA-1
    empty: DVI-D-1,SVIDEO-1 bus-ID: 00:02.0 chip-ID: 8086:2a02
  Display: wayland server: Xwayland v: 24.1.11 compositor: gnome-shell
    driver: gpu: i915 display-ID: 0
  Monitor-1: LVDS-1 model: Seiko Epson 0x3746 res: 1680x1050 dpi: 129
    diag: 390mm (15.4")
  Monitor-2: VGA-1 model: Acer E211H res: 1920x1080 dpi: 102
    diag: 547mm (21.5")
  API: OpenGL v: 2.1 vendor: intel mesa v: 25.3.6 glx-v: 1.4 es-v: 2.0
    direct-render: yes renderer: Mesa Intel 965GM (CL) device-ID: 8086:2a02
    display-ID: :0.0
  API: EGL Message: EGL data requires eglinfo. Check --recommends.
  Info: Tools: api: glxinfo x11: xdriinfo, xdpyinfo, xprop, xrandr
Audio:
  Device-1: Intel 82801H HD Audio vendor: Gateway driver: snd_hda_intel
    v: kernel bus-ID: 00:1b.0 chip-ID: 8086:284b
  API: ALSA v: k6.19.11-200.fc43.x86_64 status: kernel-api
  Server-1: PipeWire v: 1.4.11 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    4: pw-jack type: plugin
Network:
  Device-1: Intel 82566MC Gigabit Network vendor: Gateway driver: e1000e
    v: kernel port: 1820 bus-ID: 00:19.0 chip-ID: 8086:104d
  IF: enp0s25 state: up speed: 1000 Mbps duplex: full mac: <filter>
  Device-2: Intel PRO/Wireless 3945ABG [Golan] Network driver: iwl3945
    v: in-tree:ds pcie: speed: 2.5 GT/s lanes: 1 bus-ID: 02:00.0
    chip-ID: 8086:4222
  IF: wlp2s0 state: up mac: <filter>
  Device-3: Qualcomm Atheros AR9271 802.11n driver: ath9k_htc type: USB
    rev: 2.0 speed: 480 Mb/s lanes: 1 bus-ID: 2-4:4 chip-ID: 0cf3:9271
  IF: wlp0s29f7u4 state: up mac: <filter>
Drives:
  Local Storage: total: 465.76 GiB used: 32.22 GiB (6.9%)
  ID-1: /dev/sda vendor: Toshiba model: MQ01ABD050V size: 465.76 GiB
    speed: 3.0 Gb/s serial: <filter> temp: 47 C
Partition:
  ID-1: / size: 100.28 GiB used: 31.71 GiB (31.6%) fs: ext4 dev: /dev/sda7
  ID-2: /boot size: 1.8 GiB used: 524.5 MiB (28.5%) fs: ext4 dev: /dev/sda6
Swap:
  ID-1: swap-1 type: file size: 6 GiB used: 0 KiB (0.0%) priority: -1
    file: /var/swap/swapfile
  ID-2: swap-2 type: zram size: 3.8 GiB used: 493.6 MiB (12.7%)
    priority: 100 dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 67.0 C mobo: N/A
  Fan Speeds (rpm): N/A
Info:
  Memory: total: 4 GiB available: 3.8 GiB used: 2.07 GiB (54.3%)
  Processes: 262 Power: uptime: 38m wakeups: 0 Init: systemd v: 258
    default: graphical
  Packages: pm: rpm pkgs: N/A note: see --rpm pm: flatpak pkgs: 31
    Compilers: N/A Shell: Bash v: 5.3.0 running-in: ptyxis-agent inxi: 3.3.40
firebat@fedora:~$ 

This is not a fedora command. Fedora would use sudo dnf install inxi or you could just say Y to the prompt to install when you enter the command inxi and it prompts you to install it.

This can be done from the live media desktop as well.