This page describes how to image an SD card, an SSD, or an NVMe disk for use by Allsky. (NVMe disks are only supported on the Pi 5 and above with an NVMe HAT.)
In the instructions below, a storage device refers to either an SD card, an SSD, or a NVMe disk because the instructions for all of them are almost identical.
The two main scenarios when imaging a storage device are described below.
1. New Pi or "starting over"
This scenario is used when:
- you have a new Pi
- you want to use a new storage device
- you want to "start over" and re-image your existing storage device
Do the following:
- Download the Raspberry Pi Imager> to a PC or Mac.
- Start the Pi Imager and choose your "Raspberry Pi Device".
- Choose your "Storage" (where to write the operating system to - your storage device). If nothing appears in the list then the Imager can't find your device; make sure it's plugged in and your PC or Mac can see it.
- Choose the Pi "Operating System".
Select the (Recommended) entry which is usually the first one. For Pi 4 and newer models, that will be Raspberry Pi OS (64-bit). For older models it will be Raspberry Pi OS (Legacy, 32-bit).
Allsky installs many of the packages used by the "Desktop" version so we suggest installing it. - Press "NEXT".
- When asked to apply OS Customisation settings press
EDIT SETTINGS and make these changes:
Do not skip this step unless you enjoy pain!
Skipping it means you'll need to make those changes after turning your Pi on the first time. Wi-Fi won't work so you'll need to use a wired connection to the Pi, or connect a monitor, keyboard, and mouse to it.- GENERAL tab:
- Set hostname:
allsky
unless you have multiple Pi's on your network in which case they must all have unique names. - Set username and password:
pi
and whatever you want for the password. - Configure wireless LAN:
it's MUCH easier to do this now rather than after your Pi is running. - Set local settings:
This doesn't actually change the "Locale"; it just changes the time zone and keyboard layout. Allsky will prompt for the Locale during installation.
- Set hostname:
- SERVICES tab:
- Enable SSH - Use password authentication
- GENERAL tab:
Plug the storage device into the Pi and power it up. After it boots, install Allsky and your favorite programs.
2. Use a new storage device but keep some files from the old device
In this scenario, you are using a storage device but want to use a new storage device AND keep some files from the existing device. Files like your Allsky images, darks, and configuration files are usually kept.
This is typically done because:
- you want a device with more disk space
- you want a device with better performance
- your current device is physically going bad
- your are seeing lots of strange behavior and suspect Linux files are corrupted
- your current device is getting "cluttered" and you want to start over with a clean install
You have a second storage device
The process is straightforward with a second storage device.
In the instructions below,
your current storage device is called the old device
and the second device is called the new device.
- Image the new device using the instructions above.
- If the new device is:
- an SD card:
using a USB-to-SD card adapter, plug the USB end of the cable
into a USB 3 port on the Pi
(or USB 2 port if your Pi doesn't have USB 3).
IS IT MOUNTED AUTOMATICALLY, AND IF SO, WHERE? - an SSD:
using a USB-to-SSD adapter, plug the USB end of the cable
into a USB 3 port on the Pi
(or USB 2 port if your Pi doesn't have USB 3).
IS IT MOUNTED AUTOMATICALLY, AND IF SO, WHERE? - an NVMe disk:
turn the Pi off and connect the NVMe HAT and the NVMe disk
per the manufacture's instructions.
Turn the Pi back on.
IS IT MOUNTED AUTOMATICALLY, AND IF SO, WHERE?
- an SD card:
using a USB-to-SD card adapter, plug the USB end of the cable
into a USB 3 port on the Pi
(or USB 2 port if your Pi doesn't have USB 3).
- The Pi should still be booted off the old device with the new device also connected.
- Copy the ~/allsky directory on the old
device to the new device in the same location.
You may need to use the
sudo
command. - Rename the allsky directory on the new device to
allsky-OLD using either the Pi desktop or the
mv
command. - If you have modules in the old device's /opt/allsky
directory, copy that directory to the new device using
sudo
. - Copy whatever other files you want from the old device to the new one. This normally includes files in your login's home directory ~. Don't forget hidden files that begin with ..
- Run
cd; touch OLD_DEVICE
. See below for why. - Shutdown the Pi and remove power.
- Switch the old and new devices on the Pi.
- Turn the Pi back on. It should boot from the new device with the old device also connected.
- Run
cd; ls OLD_DEVICE
. You should get an error that "OLD_DEVICE does not exist". That's because it's only on the old device and you are now on the new device.
If you do NOT get an error that means you are still on the old device. Check your work. - Install Allsky and tell the installation you want to use the prior version of Allsky; it will then restore your saved images, darks, and configuration files.
- When you are sure you've copied everything you want, remove the old device.
You only have one storage device
If you don't have a second storage device,
consider getting one and use the instructions above.
If you can't obtain a second storage device, do the following:
- Copy ~/allsky plus any other
files, images, etc. you want to keep from your SD card to a
USB drive, PC, Mac, or another device.
If you have modules in /opt/allsky, copy that directory as well. Suggestion: name its backup directory opt-allsky, - Shutdown the Pi and remove power.
- Remove the storage device from the Pi.
- Image the storage device using the instructions above.
- Plug the newly-imaged device back into your Pi and turn it on.
- Restore your files to the storage device.
Copy the saved ~/allsky directory to ~/allsky-OLD on the newly-imaged device.
If you saved /opt/allsky, copy that directory to the newly-imaged storage device usingsudo
. - Install Allsky and tell the installation you want to use the prior version of Allsky; it will then restore your saved images, darks, and configuration files.