Raspberry Pi Backup, Debugging & Config File
Overview:
Setting Up An Original Image
I always go to the Raspberry PI site found at https://www.raspberrypi.org/ and then click Downloads
You can always download the NOOBS, but I find it faster to just pull the Raspbian image down and directly image the SD card. The Raspberry Pi site has an Installation Image Instructions that you can follow.
This is what I do:
Down load the latest Raspbian Buster with desktop and recommended software image
Used Balena Etcher to create an image on the 32G SD card... This takes like AHHHHH 45 min
Plug SD card into Raspberry Pi.
Connect all the cables other than Power
Then connect the Power cable
Follow the bootup prompts and set the country and keyboard to "US"
Then it will do a software update that will take about 15 min...
Backing Up your Files
You will , as you use your Raspberry Pi, create files that you will want to backup. You may have a myPython directory, where you have all your <program>.py files. It would be sad if you lost these because your Raspberry Pi SD card got corrupted and you had to re-image your OS. Just like you would backup your PC, Laptop or Phone, you should backup your Raspberry Pi
Backing up your config.txt file:
For an overview of the config.txt see the Raspberry Pi config.txt documentation. Also check out https://elinux.org/R-Pi_configuration_file
On your Raspberry Pi, open your browser and open/log in to your Google Drive
On your Raspberry Pi, open your File Manager and go to the /boot directory, and find the config.txt
Copy the config.txt file to your Google Drive
Backing up your config.txt file:
On your Raspberry Pi, open your browser and open/log in to your Google Drive
On your Raspberry Pi, open your File Manager and go to the directory you want to backup files from
Copy the config.txt file to your Google Drive. You should be able to drag and drop them
Make Sure Your Raspberry Pi Is Up To Date
You want to make sure your Raspberry Pi is up to date and has the latest OS packages, tools and software. Before installing a software package, you need to first update the Raspberry Pi's current list of packages that are available to apt-get with apt-get update
Open a console dialog window
Run the command sudo apt-get update This will go out and request the latest package list and known dependencies. After updating, you are now ready to install a package.
Then run the command sudo apt-get upgrade This ensures that any potential dependencies for newly installed software are up to date and can potentially fix any bugs. The upgrade command will take several minutes to finish, and may require your verification/interaction during the process, depending on which packages are being upgraded.
Using update and upgrade regularly will keep your Raspberry Pi's OS image up to date. It is essentially the same as downloading the most recent image of Raspbian available.
RPiUpdate.sh File
Using jim.The.STEAM.Clown's RPiUpdate.sh file found on Github. I will be updating this as I find stuff I want on all my Raspberry Pi's
In a Raspberry Pi Command dialog, run the following commands. This will copy the latest version of my "restore a Raspberry Pi after a NOOBS re-inaging
sudo wget https://raw.githubusercontent.com/jimTheSTEAMClown/RaspberryPi/master/RPiUpdate.sh
sudo chmod 755 RPiUpdate.sh
sudo cat RPiUpdate.sh
sudo sh RPiUpdate.sh
Other Shell Scripts
RPi-IoT-RobotControl.sh
In a Raspberry Pi Command dialog, run the following commands. This will copy the latest version of my "IoT Control A Robot Over The Internet With Shell Scripts"
sudo wget https://raw.githubusercontent.com/jimTheSTEAMClown/RaspberryPi/master/RPi-IoT-RobotControl.sh
sudo chmod 755 RPi-IoT-RobotControl.sh
sudo cat RPi-IoT-RobotControl.sh
sudo sh RPi-IoT-RobotControl.sh
Recovering from a crash? May not be possible, but here are some Ideas
Check out the following links -
First... if you have the foresight to create a backup/clone image, you can just try to restore it.
Edit on Windows PC. You can potentially see the config.txt in your windows PC. See this link and scroll down to the section called How to edit from a Windows PC
Chromium settings
These are settings I like to have for Chromium:
Open Chromium settings, and scroll down to Startup. Set to <Continue where you left off> This will remember the current tabs you have open and re-open them next time you start.