This Raspberry Pi Imager hack saves time with every project

If you use a Raspberry Pi, you need an SD card flashing tool to install the operating system. Supplanting Balena Etcher, the Raspberry Pi Imager includes everything we need to set up a Raspberry Pi operating system. However, hidden within that straightforward tool is another interface, which means you no longer have to spend time configuring every Wi-Fi connection and SSH password.

This is a massive advantage to anyone who regularly flashes a new microSD card or has multiple cards to install an operating system on (perhaps when setting up a cluster). I’ve been using the Raspberry Pi Imager’s hidden OS Customization screen for a while because it just makes setting up the Pi so much easier.

Configuring a Raspberry Pi is a slog

I could start my own Pi shop

Raspberry Pi 3B and 3B+ models

Since 2012, I’ve accumulated 16 Raspberry Pis. Unsurprisingly, I’ve lost count of the number of operating systems I’ve set up on the various models over the years. As I have so many Pis on the go, it’s not something that is worth keeping track of, even though I did almost start once.

The fact is, until I discovered this trick, setting up a Raspberry Pi — whether with Raspbian/Raspberry Pi OS, Ubuntu, or some other OS — was a bit of a pain.

You know the process: insert the Raspberry Pi’s SD card into your PC, select the correct Pi model, operating system, and target device (the SD card). Earlier alternatives, such as Etcher, followed the same path, as did Win32 Disk Imager on Windows.

Related


11 ways to maximize your Raspberry Pi’s performance

If you want to really get the most out of your Raspberry Pi, these tips will help maximize its performance.

Over the years, there have been various alternatives to the repetition. PiBakery, now discontinued (although it should still work up to Raspberry Pi 3), was a good way to set a configuration and save it for future use. I preferred to maintain a copy of the wpa_supplicant.conf and config.txt files on my PC’s hard drive to ensure every fresh image was ready to use — I’d just drop them into the Pi’s /boot directory after burning a new OS.

But I’ve found an easier way: Raspberry Pi Imager’s hidden OS Customization screen. All the settings I need to keep saved for future installs can be found here, which I access with Ctrl + Shift + X.

How I configure my Raspberry Pis

Prepare before you bake

When I’m imaging a microSD card for my Raspberry Pi, I typically use the same settings every time. This is far preferable to writing the OS to the microSD card, then manually setting up Wi-Fi, whether you use raspi-config or a desktop configuration. The same goes for naming the device and enabling SSH for headless access to the Raspberry Pi.

Remember, I can save these settings for use with subsequent Raspberry Pi installs.

I think my use of this is pretty standard. After opening Pi Imager’s OS Customization screen, I use the General tab first to set a hostname. I always prefix my devices with “atomic-” followed by either the device name or its purpose.

Related


11 ways to maximize your Raspberry Pi’s performance

If you want to really get the most out of your Raspberry Pi, these tips will help maximize its performance.

So, I might use “atomic-minecraft” for my son’s Raspberry Pi-hosted Minecraft server, or “atomic-pi4-nas” for my soon-to-be-retired NAS. Then, I specify a username and password, set up the Wi-Fi, and configure the locale (time zone) settings.

There’s no need to click Save until you’re done on the OS Customization screen.

In the Services tab, I always enable SSH, and usually rely on Use password authentication. The Run SSH-Keygen button will generate a pair of keys if preferred; however, they will be stored in a text file in my Home directory. It’s simple to copy the keys from the file into the Raspberry Pi Imager.

I don’t typically bother with the Options tab, leaving the default options intact. When I’m done, I click Save, and the OS Customization screen closes. This information is saved in the Raspberry Pi Imager, making it available for all subsequent microSD card writing operations.

Related


4 reasons why DietPi Dashboard is more than a pretty GUI

Managing a headless Pi is a lot simpler when you use a GUI interface like the DietPi dashboard with full system control.

Other Pi preset options for different purposes

A Pi with different fillings

Raspberry Pi 2

Now, it isn’t necessary to change everything. I’ve often just changed the account credentials — for instance, for my son’s Minecraft server — and Wi-Fi differs depending on where the Pi is situated. Usually, I select the power line Wi-Fi outlet in my office, so that’s stored as the default. However, if I were setting up a Pi for the house, I’d use the main router’s SSID and password.

Like the time I set up a Raspberry Pi Zero as a wireless USB storage device for the TV, on that occasion, I not only used the indoor Wi-Fi router, but I also gave the Pi a friendly name (“PiStick,” if memory serves me correctly!). That way, anyone who wanted to copy a file across the network to watch on the family TV could do so. We don’t use it so much these days as our current TV has built-in wireless casting, but it’s a good option to have.

Related


5 ways to make your Raspberry Pi feel more like a desktop computer

Turn your Raspberry Pi into a PC with these easy steps.

The ultimate installation time-saver

Installing an operating system is not a fun experience. While things are far quicker than they were in the days of Windows 95, it remains a drain on time and resources that could be better spent elsewhere.

A Raspberry Pi SD card doesn’t take long to flash an image, but account creation and Wi-Fi setup can take some time. Using a shortcut like the one offered in the Raspberry Pi Imager’s OS Customization screen just makes sense. It’s far easier than any of the alternatives (although I do still have old wpa_supplicant and config text files to clean up on some old hard drives…)

One thing to note. If you regularly install new operating systems on SD cards, it may be worth switching your Raspberry Pi to M.2 SSD storage. MicroSD cards are useful, but their lifespan is far shorter than that of solid-state drives.

Source link

Leave a Comment