Saving and Reinstalling the Image #

Learn how to flash the RevPi using a Windows PC. Back up the current image to an external data carrier and then install a new operating system image. Use the command cat /etc/revpi/image-release to find out which image version is currently installed on your RevPi, see Query Device Information.

Alternatively, you can install a new image using the Raspberry Pi Imager.

The release notes contain information about breaking changes, bug fixes, security patches, and system requirements that are relevant for the migration and compatibility of your existing installation.

Prerequisites #

Connect your RevPi to a monitor, a mouse and a keyboard, see Setting Up Desktop Mode, or ensure that your RevPi is connected to a network and accessible via an SSH connection.

You require:

✓ A cable USB-2.0 type A to micro-USB or USB-C

✓ A data carrier with sufficient storage space, e.g. USB stick or hard disk

✓ An imaging tool e.g. Win32 Disk Imager

✓ A MD5 checksum checker, e.g. WinMD5Free

✓ A GPG certificate manager, e.g. gpg4win with Kleopatra

✓ The USB boot utility rpiboot

Note

▷ Always use the latest version of rpiboot to ensure that the current hardware versions are supported.

Several versions of rpiboot may be available for Windows:

▷ Open the program folder of rpiboot on your PC.

▷ Select the version that is suitable for your RevPi (e.g., CM5 for RevPi Connect 5).

Step 1: Starting Bootloader Mode #

▷ Deactivate the watchdog if necessary.

▷ Shut down the RevPi and disconnect it from the power supply.

▷ Connect the RevPi to your PC via the micro-USB or USB-C socket.

▷ Start rpiboot on your PC.

▷ Reconnect your RevPi to the power supply.

❯ With the micro-USB or USB-C cable connected to your computer, the RevPi will enter bootloader mode.

❯ rpiboot will then detect the device and load the necessary files until the RevPi appears as a removable disk.

▷ Select Action for removable disk  No action.

❯ A drive letter is assigned to the RevPi as a removable disk, e.g. (D:\).

Step 2: Saving the Image #

▷ Start the imager tool (Win32 Disk Imager).

▷ Under Image file, select the prepared data carrier, e.g. the USB stick.

▷ Enter a name for the image. The name must have the file extension .img.

▷ Select the drive letter of the RevPi under Data carrier.

▷ Select read.

❯❯ The backup of your image will be created. This process may take a few minutes.

Step 3: Downloading the New Image #

▷ Download the new operating system image.

▷ Unpack the image package (.zip).

The package contains, among other files:

  • the image in a disk image file (.img)

  • the MD5 file (.md5sum.txt)

  • the image signature file (.img.asc)

Step 4: Checking the MD5 Checksum #

▷ Start the MD5 checksum checker (WinMD5Free).

▷ Select the image (.img) for the check.

❯ The checksum is calculated.

▷ Open the MD5 file (.md5sum.txt) in an editor.

▷ Copy the contained checksum as original md5 value into WinMD5Free.

▷ Select Verify.

❯❯ The checksum is being verified.

❯❯ If Matched! is displayed, the unpacked image corresponds to the published checksum.

❯❯ If NOT Matched! is displayed, the image package must be downloaded and checked again.

Step 5: Checking the Signature #

▷ Start the GPG certificate manager (Kleopatra).

▷ Generate a new key pair if one does not already exist.

▷ Download the RevPi GPG-Release-key.

▷ Unzip, import and certify the key (.asc) in Kleopatra.

▷ Select Decrypt/Verify.

▷ Select the image signature file (.img.asc) from the image package.

❯❯ The signature is being verified.

❯❯ If Valid signature is displayed, KUNBUS is verified as the publisher of the image.

❯❯ If The files could not be verified is displayed, the image package must be downloaded and verified again.

Step 6: Installing the New Image #

▷ Start the imager tool (Win32 Disk Imager).

▷ Under Image file , select the new, checked image (.img).

▷ Select the drive letter of the RevPi under Data carrier.

▷ Select Write  Yes.

❯ The new image is installed on the RevPi. This process may take a few minutes. The message Writing was successful appears.

Step 7: Rebooting the RevPi #

▷ Disconnect the RevPi from the power supply.

▷ Remove the USB cable.

Note

As long as the micro-USB plug / USB-C plug is connected, the RevPi is in bootloader mode and cannot be started in operating mode.

▷ Reconnect the power supply to the RevPi.

❯ The RevPi boots with the new image.

▷ You may need to reestablish the SSH connection.

▷ After a new installation, log in initially with:

  • Raspberry Pi default user: pi

  • Raspberry Pi default password: raspberry

Note

In desktop mode, at this point, the English keyboard layout is active when entering this initial password, i.e., y and z are swapped.

Note

For RevPi devices without HAT EEPROM, the device configuration must be started manually after reinstalling the image.

▷ Enter the command sudo bash /etc/profile.d/revpi-factory-reset.sh to load the configuration.

▷ Enter the following command to restart the RevPi:

sudo reboot

▷ Log in with user name pi and the device password.
You can find the device password on the sticker on the side of the housing of the RevPi base module.

▷ Change the password.

❯❯ The new image is installed successfully.

Installing Updates #

Important

▷ Check at regular intervals whether updates are available.

▷ Install updates promptly to close security gaps.

As of RevPi Bookworm (10/2024) updates can be installed directly via Cockpit.

The RevPi Update Tracker provides up-to-date information on security patches and updates.