GM-Script-Writer-62850 / Ubuntu-Mainline-Kernel-Updater

Makes it easy to install and check for new mainline kernels
117 stars 18 forks source link

About:

This Updater was made to alert the user of update for mainline kernels and to make installing them noob/newbie friendly.
You can manually install the kernels from here without using this script.

If you think this looks long and complicated, it is just because I have listed 5 different ways you can download this project, based on your personal preferences. If you want a recommendation just use either Terminal Install or Recovery Console Install


GUI Install:

Download the zip archive (there is a button near the top of the page) and extract it
Drag and drop the install file into a terminal window and press enter
If that does not work type "bash " then repeat the above step
It will look like bash '/path/to/install'
Type your login password when prompted


Terminal Install:

Step 1: cd to /tmp
cd /tmp
Step 2: Download (Method 1/5: Use git)
git clone git://github.com/GM-Script-Writer-62850/Ubuntu-Mainline-Kernel-Updater
Step 2: Download (Method 2/5: Use wget to download a zip archive and extract it)
wget https://github.com/GM-Script-Writer-62850/Ubuntu-Mainline-Kernel-Updater/archive/master.zip -O Ubuntu-Mainline-Kernel-Updater.zip
unzip Ubuntu-Mainline-Kernel-Updater.zip
Step 2: Download (Method 3/5: Use curl to download a zip archive and extract it)
curl https://github.com/GM-Script-Writer-62850/Ubuntu-Mainline-Kernel-Updater/archive/master.zip > Ubuntu-Mainline-Kernel-Updater.zip
unzip Ubuntu-Mainline-Kernel-Updater.zip
Step 2: Download (Method 4/5: Use wget to download a tar.gz archive and extract it)
wget https://github.com/GM-Script-Writer-62850/Ubuntu-Mainline-Kernel-Updater/archive/master.tar.gz -O Ubuntu-Mainline-Kernel-Updater.tar.gz
tar -zxvf Ubuntu-Mainline-Kernel-Updater-master.tar.gz
Step 2: Download (Method 5/5: Use curl to download a tar.gz archive and extract it)
curl https://github.com/GM-Script-Writer-62850/Ubuntu-Mainline-Kernel-Updater/archive/master.tar.gz > Ubuntu-Mainline-Kernel-Updater.tar.gz
tar -zxvf Ubuntu-Mainline-Kernel-Updater-master.tar.gz
Step 3: Run the install script (If you used git for Step 2)
bash Ubuntu-Mainline-Kernel-Updater/install
Step 3: Run the install script (If you did NOT use git for Step 2)
bash Ubuntu-Mainline-Kernel-Updater-master/install
Step 4: Check for kernel update (If you would like a release candidate kernel remove -no-rc from this command)
KernelUpdateChecker -no-rc
# If you are using Raring and want the latest 3.9 kernel run this instead
KernelUpdateChecker -v 3.9 -r saucy
# You can install 3.10 but it will break some things in raring like nvidia/amd driver as well as virtualbox
KernelUpdateChecker -r \* -no-rc
# This would give you the latest stable linux kernel, ignoring the release branch; Kernels built as of July 11, 2016 do not have a branch and require the release branch to be set to *
Step 5: Install the new kernel (That is the reason you are here right?)
/tmp/kernel-update

Recovery Console Install: (Also works if you are too lazy to do the above)

curl http://pastebin.com/raw.php?i=hHS6rf6w | tr -d '\r' > /tmp/script
sh /tmp/script
/tmp/kernel-update

Alternative:

wget http://pastebin.com/raw.php?i=hHS6rf6w -O- | tr -d '\r' > /tmp/script
sh /tmp/script
/tmp/kernel-update

You can view the source code of that script if you like.


Advanced usage examples and notes:

KernelUpdateChecker -f -r quantal -no-rc -v 3.5
This would force the script to generate a install script for the latest 3.5 kernel compiled for quantal that is not a release candidate even if you are running a newer kernel
-f forces the script to make a installer regardless of now new the current running kernel is
-l tells the script to use lowlatency kernels
-r quantal tells the script to use quantal kernels even if you are using raring (13.04) or precise (12.04), defaults to the output of lsb_release -cs
-no-rc tells the script to ignore release candidate kernels
-v 3.5 tells the script you only want a kernel with a version number starting with 3.5, you can use the entire kernel version number to force a exact version
-nh tells the script you only want a kernel without header packages (required by eg: virtualbox and nvidia's drivers)
/tmp/kernel-update --silent will install the kernel without asking questions
/tmp/kernel-update --download-only will download the script, tell you were it downloaded it to, list the downloaded files, and exit
/tmp/kernel-update --uninstall will purge the kernel it would normally install from the system
If there is no update /tmp/kernel-update will exit without doing anything, keep in mind that /tmp/kernel-update does not exist until a little over 60 seconds after login
If the new kernel is detected as not installed it will exit with status 1, will exit normally if it did not try to install it
For help documentation, other options and alternative variants please use this command:
KernelUpdateChecker -h


Uninstallation:

These 2 commands will uninstall the Kernel Updater

rm ~/.config/autostart/KernelUpdate.desktop
sudo rm /usr/local/bin/KernelUpdate{Checker,ScriptGenerator}