Page 1 of 1

Script to install/update kernel packages

Posted: 23 Sep 2019 17:58
by djemos
New users usually have difficulty to upgrade the kernel or install generic kernel.
If they forgot to run update-grub before reboot then will end with a non bootable system.
In this case an experienced user can fix the problem but new users cannot.

In Slackware upgrading a new kernel package, the previous installed kernel version is also removed from the system.
This script can upgrade as usual the kernel with the new one existed on repos and also run update-grub in the end.
Also can install the new kernel keeping also the previous kernel or kernels installed.
If user want to install or upgrade the generic kernel then an initrd.gz is created so system can boot.
In all cases update-grub is always run in the end so system always be bootable.

Of course user can always remove old kernel packages at any time by hand and run update-grub.

Running the script with no parameters or -h parameter will get the following output.

in English

Code: Select all

USAGE: install-upgrade-kernel [install|upgrade] [huge|generic]

   OPTIONS:
   install  Install huge or generic kernel
   upgrade  Upgrade huge or generic kernel removing the old one
   huge     Download huge kernel
   generic  Download generic kernel and also create an initrd
In Greek

Code: Select all

ΧΡΗΣΗ: install-upgrade-kernel [install|upgrade] [huge|generic]

   ΕΠΙΛΟΓΕΣ:
   install  Εγκατάσταση huge ή generic πυρήνα
   upgrade  Αναβάθμιση huge ή generic πυρήνα απεγκαθιστώντας τον παλιό
   huge     Λήψη huge πυρήνα
   generic  Λήψη generic πυρήνα και επίσης δημιούργησε το initrd
To install the new huge kernel and keeping the old one

Code: Select all

sudo install-upgrade-kernel install huge
To upgrade huge kernel, removing the old one

Code: Select all

sudo install-upgrade-kernel upgrade huge
To install generic kernel, keeping existing kernels and also creating an initrd

Code: Select all

sudo install-upgrade-kernel install generic
To upgrade generic kernel, removing the old one and creating an initrd

Code: Select all

sudo install-upgrade-kernel upgrade generic
source code and binary package
source code on git