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:

Do the following:

  1. Download the Raspberry Pi Imager> to a PC or Mac.
  2. Start the Pi Imager and choose your "Raspberry Pi Device".
  3. 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.
  4. 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.

  5. Press "NEXT".
  6. 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.
    • SERVICES tab:
      • Enable SSH - Use password authentication

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.

  1. Image the new device using the instructions above.
  2. 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?
  3. The Pi should still be booted off the old device with the new device also connected.
  4. Copy the ~/allsky directory on the old device to the new device in the same location. You may need to use the sudo command.
  5. Rename the allsky directory on the new device to allsky-OLD using either the Pi desktop or the mv command.
  6. If you have modules in the old device's /opt/allsky directory, copy that directory to the new device using sudo.
  7. 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 ..
  8. Run cd; touch OLD_DEVICE. See below for why.
  9. Shutdown the Pi and remove power.
  10. Switch the old and new devices on the Pi.
  11. Turn the Pi back on. It should boot from the new device with the old device also connected.
  12. 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.
  13. 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.
  14. 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:

  1. 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,
  2. Shutdown the Pi and remove power.
  3. Remove the storage device from the Pi.
  4. Image the storage device using the instructions above.
  5. Plug the newly-imaged device back into your Pi and turn it on.
  6. 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 using sudo.
  7. 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.