Flashing the Image - mercadian/proteus GitHub Wiki
Flashing the System Image
We provide a stock image for the Proteus's SSD that contains a complete installation of Debian 11 and the Rocket Pool Smartnode ready to go out of the box. For safety and security purposes, you may want to flash the image onto the SSD once you receive your Proteus to ensure that nobody has secretly modified it during shipping. Alternatively, if you bought a conversion kit instead of a full unit, you can use this process to flash the Proteus image onto your SSD so that it will essentially become a Proteus.
If you'd like to reflash the image onto your SSD, this guide will walk you through the steps.
Tools You'll Need
To reflash the image, you'll need the following:
- Another computer such as a laptop or desktop
- An open NVMe to USB adapter, such as this one
- A 1.5mm (or 1/16") hex wrench / screwdriver bit for the M2 screws
- A 2mm (or 5/64") hex wrench / screwdriver bit for the M3 screws
- (Recommended) a pair of gloves to prevent fingerprints
- (For conversion kits only) a microSD card (at least 8 GB) and a microSD to USB converter, or some other way of writing to a microSD card
Removing the SSD
Start by following the assembly guides in reverse (e.g., for v1.2 units; pick the guide for your unit version). You'll need to perform the following steps:
- Remove the case top
- Unmount the Rock from the case bottom by unscrewing the four M3 screws
- Remove the SSD from the Rock by unscrewing the M2 screw holding it in place
The assembly guides walk through each step in detail with plenty of pictures, so just follow them backwards to remove the SSD.
Flashing the Image
Once removed, mount the SSD onto your NVMe to USB converter. Plug it into your computer's USB port.
Download the latest Proteus system image from here: https://github.com/mercadian/proteus-image/releases/latest
Install balenaEtcher - a free, open source, cross-platform tool for flashing images onto storage devices. Alternatively, if you already have a flashing tool you prefer, you are welcome to use it. We'll assume you're using balenaEtcher for the rest of this guide.
Once installed, launch balenaEtcher. You will be greeted with the following screen:
Click on Flash from file, and select the Proteus system image. The screen will change to this:
Now click Select target and check the Proteus's SSD. It will likely have a label in a yellow bubble on the right titled "Large drive" because the Proteus ships with a 2 TB SSD and balenaEtcher expects you to target a smaller, conventional flash drive by default. This is expected.
WARNING: ensure that you've selected your NVMe to USB adapter, and NOT your computer's actual system SSD! The next step will erase the disk, and you definitely don't want to erase your system's drive!
Once checked, press the Select (1) button and you will be returned to this screen:
Click Flash! to begin flashing the image. You will see this warning prompt indicating that the drive you've selected is larger than balenaEtcher expected, as discussed earlier. This is normal.
Click Yes, I'm sure and it will begin writing the Proteus image to the SSD. There are three steps:
- Decompressing
- Flashing
- Validating
The total process will take several minutes; each one will have a small "ETA" label underneath the progress bar in balenaEtcher. Once all three have been completed successfully, you will see the following success screen:
NOTE: if you use a Linux machine, the SSD will be mounted automatically to your filesystem. If you want to perform any modifications to it before reinstalling it into the Proteus, you can do so now.
You can now exit balenaEtcher, unmount the SSD (if it was mounted automatically), and disconnect the NVMe to USB adapter from your computer.
Reassembling the Proteus
Now that the image has been written, you can reinstall the SSD onto the Proteus. This is simply the reverse process from the removal guide prior - follow the assembly guide for your machine to connect and secure the SSD with an M2 screw, reconnect the Proteus to your case's bottom, and finish reassembling the complete case.
(Conversion Kits Only) Update the Bootloader and RTC
If you're using a conversion kit and you haven't already done so, you should now flash the bootloader onto the Rock 5B's built-in SPI storage so the machine can boot directly from the NVMe SSD. You should also ensure the real-time clock (RTC) is set up with the current time.
NOTE: full Proteus units already have this step done out of the box. You don't need to do it again.
The easiest way to do this is to flash the Proteus image onto a microSD card, just like you did with the NVMe drive. It's the same image, the same tools, and the same process; the only difference is that you're targetting a microSD card instead.
Follow these steps to flash the bootloader:
-
Use balenaEtcher to write the Proteus image to a microSD card.
-
Once finished, put the card into the microSD slot on the front of the Proteus (below the power button).
-
Plug the Proteus into the power supply to turn it on.
-
Allow the machine to do the one-time reboot.
-
Follow the Getting Started guide to attach the Proteus to your network, and either remote in via
ssh
or work with it via a direct connection. -
Download Radxa's blank SPI image to erase whatever was already installed on it:
wget https://dl.radxa.com/rock5/sw/images/others/zero.img.gz
(Note: if Radxa's server goes down, we maintain a mirror here: https://github.com/mercadian/proteus-image/raw/main/utils/spi/zero.img.gz)
-
Extract the image and flash it to the SPI ROM and wait until the writes are complete:
gunzip zero.img.gz sudo dd if=zero.img of=/dev/mtdblock0 sync
This will take a few minutes to complete.
-
Download the SPI image with the bootloader installed:
wget https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rock-5b-spi-image-g49da44e116d.img
(Note: if Radxa's server goes down, we maintain a mirror here: https://github.com/mercadian/proteus-image/raw/main/utils/spi/rock-5b-spi-image-g49da44e116d.img)
-
Flash the image to the SPI ROM and wait until the writes are complete:
sudo dd if=rock-5b-spi-image-g49da44e116d.img of=/dev/mtdblock0 sync
This will take a few minutes to complete.
-
Once that's done, update the RTC's time:
sudo hwclock -w
-
Now, verify that the RTC clock agrees with the system clock:
sudo hwclock -r && date
These should both report the same timestamp, though in slightly different formats.
-
You can now shut the Proteus down (e.g., with
sudo shutdown -h now
) and remove the microSD card. It is now able to boot from the NVMe SSD, so you can follow the next steps below normally.
Next Steps
Once reassembled, follow the Getting Started guide to configure the machine.