3

We use 50 and more RPi's in our company and now we are in difficult situation because we have to write new image of system to each of those devices. From Raspbian to Docker system where is easy to manage; for example Raspbian.

This is one interesting question. Is there some option to rewrite the SD card on a running Pi over the network since the RPi will work from RAM ?

Piotr Kula
  • 17,336
  • 6
  • 66
  • 105

3 Answers3

2

Likely you need a different distro to achieve this, one that runs from RAM. Otherwise you can't rewrite the entire SD card at once. My Nard SDK might be an option for this type of problem:
http://www.arbetsmyra.dyndns.org/nard/

Ronny Nilsson
  • 878
  • 5
  • 13
0

The answer to your specific question, is NO.

It is possible to do however, I just said with your situation using stock Raspbian it is not possible. Sorry it has to come out like that but in your situation you are pretty much, in a situation that needs some thought now.

In order to rewrite the SD card you need to be able to boot the device into a "bootloader" type pre-environment. This pre environment can be something very simple like busy box, that would normally daisy chain loading the next OS on the SD card.

But when you need to upgrade your OS you trigger the bootloader to download a new image (so it needs networking too) and then a script to specifically overwrite a specific partition, with the correct config....

Yes.. its a load to take in but maybe your company should dedicate some time and think about this situation now before it gets worse.

Good Luck! :)

Piotr Kula
  • 17,336
  • 6
  • 66
  • 105
-1

Upgrading raspbian from jessie to buster.

Stop all processes you can without locking yourself out of the pi.

Use rsync --delete-before --delete -aHAXx to replace all files on the running system (one partition at a time). Replace files on the root partition last.

Remount filesystems read-only and reboot the pi:

echo u >/proc/sysrq-trigger

echo b >/proc/sysrq-trigger

Mikko
  • 1