-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First public release of an utility script to make changing the kernel version of the host machine easier
- Loading branch information
1 parent
d248d63
commit adcef6b
Showing
1 changed file
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/env bash | ||
|
||
OLD_KERNEL_VERSION=$(uname -r) | ||
NEW_KERNEL_VERSION="5.15.0-116-generic" | ||
|
||
# TODO add a way to change new kernel version via param/args | ||
# TODO compare kernel versions before running | ||
echo "[INFO] Currently installed kernel version: $OLD_KERNEL_VERSION" | ||
echo "[INFO] Kernel version to be installed: $NEW_KERNEL_VERSION" | ||
|
||
echo "[INFO] Updating system package lists" | ||
sudo apt update | ||
echo "[INFO] Installing kernel $NEW_KERNEL_VERSION" | ||
sudo apt install linux-image-$NEW_KERNEL_VERSION linux-headers-$NEW_KERNEL_VERSION -y | ||
echo "[INFO] Updating GRUB and initramfs" | ||
sudo update-initramfs -u -k all && sudo update-grub | ||
|
||
echo "[INFO] Reinstalling the GTP-U kernel module" | ||
cd gtp5g/ | ||
#TODO if command above fails, clone gtp again, install then remove the new clone | ||
make | ||
sudo make install | ||
echo "[INFO] Installation finished, reboot to be able to use the new kernel version" |