Skip to content

Instantly share code, notes, and snippets.

@mrmichalis
Created January 15, 2013 22:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrmichalis/4542637 to your computer and use it in GitHub Desktop.
Save mrmichalis/4542637 to your computer and use it in GitHub Desktop.
Install or remove Linux Kernel 3.7 in Ubuntu 12.10 or 12.04 http://www.itworld.com/software/327675/install-or-remove-linux-kernel-37-ubuntu-1210-or-1204
#!/bin/sh
echo ""
echo "$(tput setaf 3) ########### This bash script is created by UpUbuntu.com ###########$(tput sgr0)"
sleep 2
echo ""
echo ""
echo "$(tput setaf 3) ########### Kernel 3.7 will be installed in an `uname -i` system ###########$(tput sgr0)"
echo ""
sleep 2
read -p "Press Enter to continue, or abort by pressing CTRL+C" nothing
echo ""
echo ""
#i386 links
link1="http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.7.2-raring/linux-headers-3.7.2-030702_3.7.2-030702.201301111424_all.deb"
link2="http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.7.2-raring/linux-headers-3.7.2-030702-generic_3.7.2-030702.201301111424_i386.deb"
link3="http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.7.2-raring/linux-image-3.7.2-030702-generic_3.7.2-030702.201301111424_i386.deb"
link4="http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.7.2-raring/linux-image-extra-3.7.2-030702-generic_3.7.2-030702.201301111424_i386.deb"
#amd64 links
url1="http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.7.2-raring/linux-headers-3.7.2-030702-generic_3.7.2-030702.201301111424_amd64.deb"
url2="http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.7.2-raring/linux-image-3.7.2-030702-generic_3.7.2-030702.201301111424_amd64.deb"
url3="http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.7.2-raring/linux-image-extra-3.7.2-030702-generic_3.7.2-030702.201301111424_amd64.deb"
#System architecture
arch=`uname -m`
if [ $arch = i686 ] || [ $arch = i386 ]; then
mkdir -p $HOME/kernel-i386
cd $HOME/kernel-i386
wget -c $link1
wget -c $link2
wget -c $link3
wget -c $link4
sudo dpkg -i *.deb
sudo rm -rf $HOME/kernel-i386
elif [ $arch = "x86_64" ]; then
mkdir -p $HOME/kernel-amd64
cd $HOME/kernel-amd64
wget -c $link1
wget -c $url1
wget -c $url2
wget -c $url3
sudo dpkg -i *.deb
sudo rm -rf $HOME/kernel-amd64
else
echo "Unsupported Architecture"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment