Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4406

General discussion • Remote flashing of Pi devices

$
0
0
I am looking for a way to flash my Pi devices from time to time with the following requirements:
- My devices are all headless, so that I cannot interrupt boot procedure by keyboard
- Flashing needs to be done in non-interactive mode
- As such all required steps need to be run from comand line so that I can build a script for the required steps

I see two ways of achieving that on the first view, but both have their limitations.

Solution 1: HTTP Boot (raspberrypi.com/documentation/computers ... #http-boot)
I am not able to interrupt boot procedure and force Pi to load image via HTTP. as my devices are headless. So I need to provide a way to force the Pi to load the image via http at next boot (otherwise the Pi would simply load from USB-SSD). Is this possible from cli?

Solution 2:
I tried to run rpi-imager locally on that Pi device from cli with the following commands:

Code:

wget https://downloads.raspberrypi.com/raspios_lite_arm64/images/raspios_lite_arm64-2023-12-11/2023-12-11-raspios-bookworm-arm64-lite.img.xzsudo rpi-imager --cli --enable-writing-system-drives 2023-12-11-raspios-bookworm-arm64-lite.img.xz /dev/sda
But this creates the following error:

Code:

Error: Write error while trying to zero out last part of card.<br>Card could be advertising wrong capacity (possible counterfeit).
Can anybody help?

Statistics: Posted by oliver2 — Mon Feb 12, 2024 6:42 pm — Replies 0 — Views 60



Viewing all articles
Browse latest Browse all 4406

Trending Articles