How to install kernel patches automatically on Slackware 2

For some strange reason, some time ago, I started to write down a simple Bash script that only detected the presence of new kernel patches on Slackware stable and installed the respective packages.

Then I tried to improve it until I reached the actual version.

I’m not so experienced in Bash scripting, but I decided to upload the script on GitHub anyway. You can find it here for now.

The implemented features

  • Automatic detection, retrieve and installation of the necessary kernel packages
  • Automatic creation of the initrd
  • Automatic (basic) LILO configuration with the possibility to append parameters
  • Support for SMP kernel (32 bit only).

How to run the script

  1. Configure slackpkg, if not yet done (you can take a look at the slackpkg and slackpkg+ section here)
  2. Launch slackpkg with slackpkg update and then slackpkg upgrade-all
  3. Launch the script to install the new kernel.

You can easily run the script with the following command:

curl https://raw.githubusercontent.com/crish4cks/Bash/master/kernel-patches | sh

If you are using a 32 bit architecture and want to select the SMP kernel, use this one instead:

curl https://raw.githubusercontent.com/crish4cks/Bash/master/kernel-patches | SMP_KERNEL=yes sh

Here below I show you how to upgrade the kernel from version 4.4.111 to 4.4.115 on Slackware64 14.2 (stable).

I’ve started capturing the screen just after having executed slackpkg.

The script is still under testing and I’m sure there are several things that can be changed and improved. Furthermore, I think there are some bugs in dialog. For example, when you try to maximize the terminal window, the text into a “yes/no dialog box” disappeares.

Despite this, for now I can say that after some tests the script seems to work fine.

As usual, comments and suggestions are welcome ;-)

Did you like this post? Share it! Email this to someone
email
Share on Google+
Google+
Tweet about this on Twitter
Twitter
Share on Facebook
Facebook
Share on LinkedIn
Linkedin

2 thoughts on “How to install kernel patches automatically on Slackware

  1. Reply Antonio Feb 21,2018 20:07

    Great work and very useful tool!

Leave a Reply