Voici un sript bach, qui permet d’installer de manière automatique le dernier kernel en date(3.16.3) pour Ubuntu et dérivées.
Ce sript réalise un test sur l’architecture du CPU, ce qui permet d’installer soit la version 32 ou 64 bits du kernel.
Installation du kernel 3.16.3 pour Ubuntu
- Télécharger le script :
wget https://memo-linux.com/wp-content/uploads/2014/09/upgrade-kernel.sh.tar.gz
tar xzvf upgrade-kernel.sh.tar.gz
chmod +x upgrade-kernel.sh
./upgrade-kernel.sh
Code du script
#!/bin/sh # Check if the user is ROOT if [ $(id -u) -ne 0 ] then echo "You are not ROOT! Please login as ROOT." exit fi # Latest Available Kernel version LatestKernel="3.16.3-031603-generic" # Required Packages Headers_All="http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.16.3-utopic/linux-headers-3.16.3-031603_3.16.3-031603.201409171435_all.deb" Headers_i386="http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.16.3-utopic/linux-headers-3.16.3-031603-generic_3.16.3-031603.201409171435_i386.deb" Image_i386="http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.16.3-utopic/linux-image-3.16.3-031603-generic_3.16.3-031603.201409171435_i386.deb" Headers_amd64="http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.16.3-utopic/linux-headers-3.16.3-031603-generic_3.16.3-031603.201409171435_amd64.deb" Image_amd64="http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.16.3-utopic/linux-image-3.16.3-031603-generic_3.16.3-031603.201409171435_amd64.deb" # Debian Packages DEB="linux-headers-3.16.3*.deb linux-image-3.16.3*.deb" # Currently Installed Kernel Version CurrentKernel_release=$(uname -r) # System Architecture SystemArch=$(uname -i) # Check if System already has latest kernel installed if [ "$CurrentKernel" = "$LatestKernel" ] then echo "Wow! Your System is Already Updated to Latest Available Kernel Version!" echo "Program will now exit..." sleep 2s exit fi # If latest kernel is not available, then check the system architecture and download necessary packages # For 32-bit Systems if [ $SystemArch = "i386" ] || [ $SystemArch = "i686" ] then echo "Kernel upgrade process for 32-bit systems will now start..." sleep 2s echo "Downloading required packages.." sleep 2s wget $Headers_All wget $Headers_i386 wget $Image_i386 echo "Download process completed. Packages are present in $(pwd) directory" sleep 2s echo "Installing the packages..." dpkg -i $DEB # For 64-bit Systems elif [ $SystemArch = "x86_64" ] then echo "Kernel upgrade process for 64-bit systems will now start..." sleep 2s wget $Headers_All wget $Headers_amd64 wget $Image_amd64 echo "Download process completed. Packages are present in $(pwd) directory" sleep 2s echo "Installing the packages..." dpkg -i $DEB # If system architecture is not compatible else echo "Packages for following system architecture not found : $SystemArch" echo "Program will now exit..." sleep 2s exit fi echo "Your system has been successfully upgraded to latest kernel version $(LatestKernel)." echo "System will now reboot." sleep 5s shutdown -r now
source yourownlinux.com
bonjour,
erreur 404 pour la recupération du script … :(
Merci
Salut Magam !
erreur du lien corrigé et testé :-)
Bonjour,
Idem erreur 404 lors du lancement du script …
Merci
Chez moi ça fonctionne, bizarre…
http://memo-linux.com/wp-content/uploads/2014/09/upgrade-kernel.sh.tar.gz
Bonjour,
Quand on n’est pas doué, on y reste …
La prochaine fois, je nettoierai mieux mes lunettes.
Tout fonctionne correctement,
Merci
ok cool ! :-D