2

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 ?

3
  • 1
    Possible duplicate of How to update multiple Pis at once? – goobering Aug 18 '16 at 16:04
  • Yes, it's possible but not easy. Why do you need to write a new image? Can't you just upgrade the existing with apt-get etc? – Ronny Nilsson Aug 22 '16 at 20:21
  • we want to upgrade all system under Docker => it is easy to manage all migrates etc... – Michal Sládeček Aug 22 '16 at 20:56
1

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/

4
  • Yes it looks fine, but firstly I would have to change image of each rpi to Nard image :D. So it would not help. I looging for some solution when there is not need to unplug sd card from RPI – Michal Sládeček Aug 23 '16 at 12:30
  • You do not need to unplug your SD card. It's possible to migrate from Raspbian to Nard from a remote location. :) I can give you the instructions if you're interested. – Ronny Nilsson Aug 23 '16 at 17:44
  • This information sounds great! I'm interested about it ;) – Michal Sládeček Aug 24 '16 at 6:53
  • Contact me via the email address at the Nard project website and I'll give you further info. – Ronny Nilsson Aug 24 '16 at 9:01
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! :)

3
  • "In order to rewrite the SD card you need to be able to boot the device into a "bootloader" type pre-environment." -> This is not true at all. If you used a root filesystem on a USB device, you could unmount any/all partitions on the SD card and do whatever you want to it, including completely overwrite the entire thing with a new image, etc. However, you better make sure you do it properly or you won't be able to get it to reboot. Sans a USB based rootfs, you could use something RAM based as the other answer suggests. – goldilocks Oct 31 '16 at 18:31
  • Sure, there are many ways to skin a cat :D (Happy Halloween) but end of the day, with his current setup the answer is NO. :( His company needs to do more R&D and sort it out them selves. There are a ton of other great ways of doing it without overwriting the entire OS. – Piotr Kula Oct 31 '16 at 18:33
  • 1
    I agree the OP would probably be playing with fire and some more thinking or expertise is needed ;) – goldilocks Oct 31 '16 at 18:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.