Updating an Existing Raspberry Pi Boot Image#
To upgrade the agent or other software on an existing Raspberry Pi image, follow these steps.
Boot a Raspberry Pi using the existing microSD card image. Make sure you have network connectivity so you can SSH in.
SSH into the Raspberry Pi:
ssh local@<raspberry_pi_ip_address> # password is "local"
Restore the root filesystem to writeable mode:
sudo raspi-config nonint do_overlayfs 1 # on reboot the root fs will be writeable sudo reboot
Re-run the agent install script with the desired version:
curl -fsSLO https://raw.githubusercontent.com/DiamondLightSource/dra-usbip-driver/main/scripts/install-agent.sh sudo bash install-agent.sh <version>
Optionally update the Pico MAC sender:
curl -fsSLO https://raw.githubusercontent.com/DiamondLightSource/dra-usbip-driver/main/scripts/install-pico-mac-sender.sh sudo bash install-pico-mac-sender.sh <version>
Make any other desired changes.
Restore
runonce.shto re-enable read-only filesystem mode on next boot:cp /var/local/runonce.sh.done /var/local/runonce.sh
Create a new image file using these instructions: Step 10: Create a Backup Image of the microSD Card.