Five Useful Ideas

Rolling back the kernel in Slackware

03 October 2022

1. What happened?

So, with the announcements published on Slackware ChangeLogs, I tend to check if any of the new additions to the kernel or any other patches would break my setup. However, with the latest release for 5.19.12, I did not take the trouble of checking either the release notes on LWN or any reports of failure on the Framework Community. As is Murphy's Law, the update broke my machine. As documented on the forum, there is flickering and internal display does not show up when the login screen loads.

1.1. Fixes attempted

  1. Modifying the grub entry to run at init level 3: The flickering persists, and I'm unable to launch other TTYs.
  2. Adding "moduleblacklist=i915": This allows me to log into the machine without xorg running and without networking available.
  3. Another suggestion is available at the forum, but I haven't attempted it as I had downgraded the kernel by then.

2. What do I do?

Staring at a blank screen is never enjoyable, and one that is flashing black especially when you are in the middle of a work day can be frustrating. The easiest path I could think about at that time was to roll back the upgrade I had performed. A quick search on LQ and Slackdocs suggested that upgradepkg as the solution. However, I couldn't figure out where I can find the required files for me to downgrade the kernel. The wonderful and kind folk on the Slackware Matrix room came to my rescue when I panic posted there for some help. The user @ltlnx:halogen.city was kind enough to provide me with detailed steps to downgrade the kernel.

3. Steps to downgrade

  1. Download desired version of the `kernel-generic`, `kernel-huge` and `kernel-modules` from http://slackware.uk/cumulative/slackware64-current/slackware64/a/.
  2. Download the kernel source for the same version from http://slackware.uk/cumulative/slackware64-current/slackware64/k/.
  3. Copy the files onto the USB/local storage.
  4. Boot from installation media.
  5. chroot into the system after mounting required partitions.
  6. Install all the downloaded packages with 'upgradepkg –install-new'
  7. Run 'geninitrd' to create the boot image.
  8. Use 'eliloconfig' or 'mkinitird' followed by 'grub-mkconfig' based on your setup.