RPI 4 Tips and Tweaks

Updating the firmware

The Pi developers call the bootloader “EEPROM”. It is a critical component of the Pi’s architecture and should periodically updated to the current release. This is accomplished with a single command as follows:

sudo rpi-eeprom-update This will return a screen informing you that the EEPROM is either up to date or there is an update available. obviously if your Pi is up to date, do nothing. Otherwise, if an update is available, repeat the command as follows: sudo rpi-eeprom-update -d -a The two parameters will result in the download of the update. Reboot immediately to install.

About Backups

Some people simply us the SD Card Copier utility and do a “hot” backup to an external SD card in a card reader. This risky and not recommended. However. you will need external storage for the following three “safe” methods. SD card readers are inexpensive and reliable.

Method 1 Shutdown the Pi. Remove the card and using another computer, copy to another card of the same or greater capacity. This is a nuisance and assumes that there is an alternate computer.

Method 2 Make a zipped copy of the folder. Then move it to external storage. The commands are as follows:

cd /home/ sudo tar czf pi_home.tar.gz pi The first command results in leaving the pi directory to its parent homedirectory. The second command creates a zipped tarball with the name pi_home.tar.gz. If needed the process is reversed, unzipping the tarball with the command tar xvf pi_home.ta.gzr. There are some caveats. The zipped file must still fit on the SD Card. It will fail on a nearly full card. User data outside of the home folder in other parts of the OS will not be backed up, Despite it’s shortcomings, this method does work and is popular.

Method 3 Use a backup script based on the rsync command. Find such a script at github.com/billw2/rpi-clone. (link) Installation is simple and fast, the details are on Mr. Wilson’s site. Note that the target drive must be at least as the source. If you are using a target drive that has existing partitions, Wipe the drive with fdisk or parted and create a single ext4 partition.

Extend the life of the SD Card

Eventually you are likely to be booting from an external drive that is faster and more reliable than SD Card. In the meantime there is a script that will significantly reduce the number of writes to the SD by redirecting them to RAM. Find it at github.com/azlux/log2ram (link) . Again, installation details are on the site, Basically,You run a script and reboot the Pi.

[Optional] Install rpi-imager

The RPI developers promote the use of the rpi-imager utility download official images from their website. The utility has versions for Windows, Mac OS X, and Linux. It is not included in the RPI desktop itself. While this does make some sense, you might like to try another OS, Ubuntu for example. To install this utility simply issue the command sudo apt install rpi-imager.

Other Software

If you do try Ubuntu it will boot to a good looking Gnome desktop. The Snap packaging system is pre-installed and activated. Snap is the future! Ubuntu is not needed for Snap. It is simple to install it into the official RPI OS. I installed it and tried installing a few packages with mixed results. The problem is that Snap will find packages not yet compiled for the ARM processor. One app that was successful was the Firefox browser.

Running Firefox with Snap tells you a lot about the Snap experience in general. The app loads slowly with numerous messages on the screen. Once running, the terminal remains open. It appears that Snap has created a virtual machine dedicated to Firefox. The I learned that Mozilla (Firefox’s creator) had released versions for Snap and also for ARM processors in general. That being the case, there is little point in using Snap. I removed the Snap package. Optional, Recommended Install Firefox-esr

Not much to say here. Simply issue the command sudo apt install firefox-esr and Firefox will be on your system. From the menu choose Run and enter firefox-esr.

Optional, Recommended Install Pi-Apps

A developer who goes by the handle “Botspot” realized the convenience of a repository containing only ARM enabled apps. It is being actively developed and at this point can install, remove, and provide information about apps making it an app manager. Again, installation is simple via an install script. I was truly impressed by the number of available apps. I installed the markdown editor Remarkable and am using this app to compose this post. Find it at gitjub.com//Botspot/pi-apps (link) .

The Linux user is accustomed to issuing the sudo apt update and sudo apt upgrade on a daily basis. The RPI developers recommend upgrading with sudo apt full-upgrade instead.

Hits