Last active
February 27, 2018 00:42
-
-
Save kusayuzayushko/80142de084ca1507134b1fbcb6cfee69 to your computer and use it in GitHub Desktop.
NV-kernel-upgrade.sh
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
#!/bin/bash | |
nvidia_path="http://us.download.nvidia.com/XFree86/Linux-x86_64/387.22/NVIDIA-Linux-x86_64-387.22.run" | |
update="http://5.129.88.102:8000/NV-UPDATE.tar.gz" | |
echo " stopping miner " | |
echo "########################################################################" | |
sudo killall -9 screen | |
sudo killall -9 Xorg | |
echo " preparing installation " | |
echo "########################################################################" | |
cd /var/tmp/ || echo "Cannot enter temporal directory" | |
sudo umount -l /tmp | |
sudo mount -t tmpfs -o size=1G,mode=1777 overflow /tmp | |
rm -f NVIDIA* NV-UPDATE* | |
wget $nvidia_path -O NVIDIA.run | |
wget $update | |
tar -xzvf NV-UPDATE.tar.gz | |
echo " installing new kernel " | |
echo "########################################################################" | |
sudo dpkg -i -E NV-UPDATE/linux-headers-4.13.10-smos+_2_amd64.deb NV-UPDATE/linux-image-4.13.10-smos+_2_amd64.deb || echo "Something is wrong, contact SMOS support and report the problem" | |
echo " installing driver " | |
echo "########################################################################" | |
chmod +x NVIDIA.run | |
sudo ./NVIDIA.run --ui=none --no-questions --accept-license --no-kernel-module | |
echo " installing libs" | |
echo "########################################################################" | |
sudo cp /var/tmp/NV-UPDATE/libcudart.so.9.0.103 /usr/local/lib/ | |
sudo ln -sf /usr/local/lib/libcudart.so.9.0.103 /usr/local/lib/libcudart.so.9 | |
sudo ln -sf /usr/local/lib/libcudart.so.9.0.103 /usr/local/lib/libcudart.so | |
echo " Looks like i'm done " | |
echo " Rebooting" | |
# sudo reboot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment