Last active
December 19, 2016 17:11
-
-
Save Mausy5043/16aa4be0c31d4e81d880ac5233b577f3 to your computer and use it in GitHub Desktop.
Bash script to make an installed `raspbian-ua-netinst` system convert to and track the RPF kernel
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 | |
# switch to the RPF kernel | |
echo "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" | |
echo "% THIS WILL UPDATE THE KERNEL %" | |
echo "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" | |
echo "" | |
echo "" | |
echo "" | |
echo ">>> 1: Update the apt-get cache" | |
sudo apt-get update | |
echo "" | |
echo "" | |
echo ">>> 2: Remove packages" | |
sudo apt-get -yuV remove raspberrypi-bootloader-nokernel | |
# clean up | |
sudo apt-get -y autoremove | |
sudo apt-get -y autoclean | |
echo "" | |
echo "" | |
echo ">>> 3: Install RPF kernel and related packages" | |
sudo rm /etc/apt/preferences.d/01vcgencmd.pref | |
sudo apt-get -yuV install raspberrypi-bootloader libraspberrypi0 libraspberrypi-bin raspberrypi-kernel | |
echo "" | |
echo "" | |
echo ">>> 4: Adjust system settings" | |
sudo sed -i 's/kernel=/#kernel=/' /boot/config.txt | |
sudo sed -i 's/initramfs/#initramfs/' /boot/config.txt | |
# let's check what we got | |
cat /boot/config.txt | |
apt list --installed |grep raspberry | |
echo "" | |
echo "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" | |
echo "% REBOOT TO USE THE NEW KERNEL %" | |
echo "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" | |
echo "" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment