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)
- Support only for FTP mirrors (for now).
How to run the script
- Configure slackpkg, if not yet done (you can take a look at the slackpkg and slackpkg+ section here)
- Launch slackpkg with slackpkg update and then slackpkg upgrade-all
- 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 ;-)