Updating an Existing Raspberry Pi Boot Image#

To upgrade the agent or other software on an existing Raspberry Pi image, follow these steps.

  1. Boot a Raspberry Pi using the existing microSD card image. Make sure you have network connectivity so you can SSH in.

  2. SSH into the Raspberry Pi:

    ssh local@<raspberry_pi_ip_address>
    # password is "local"
    
  3. Restore the root filesystem to writeable mode:

    sudo raspi-config nonint do_overlayfs 1
    # on reboot the root fs will be writeable
    sudo reboot
    
  4. 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>
    
  5. 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>
    
  6. Make any other desired changes.

  7. Restore runonce.sh to re-enable read-only filesystem mode on next boot:

    cp /var/local/runonce.sh.done /var/local/runonce.sh
    
  8. Create a new image file using these instructions: Step 10: Create a Backup Image of the microSD Card.