Trying to install balenaOS over network

We have a RPi, which already has a ubuntu-server installed on it, our R&D team decided to try out balenaOS and it seems to fit our needs perfectly. So we were researching on how we can get balenaOS installed on RPi which already has OS running on it, of course there is way, that we can just swap the SD card and flash a new image, but that’s not possible as the RPi are not physically accessible to us and they are also behind a VPN, the only way to access them is via connecting to VPN and then SSHing into them, we also have a desktop located on same network as the RPi, which we can access.

So is there a way to install balenaOS over network, if so how?
I did land on something called PXE boot, but couldn’t find any docs regarding to that in balena

Any suggestions and improvements or if there is better method to do is welcomed
Thanks in advance

Hi @curlinfosec,

Welcome to the Forums and glad to hear you’re getting along well with balenaOS!

We don’t have an officially supported network boot option today, but it’s something we’ve talked a lot about and will likely work towards at some point.

However, in the meantime, there is an unofficial network-boot solution that one of the folks from our OS team created as a quick proof of concept a few months back: GitHub - jakogut/balena-netboot-provisioner: Netboot provisioning server for balena devices To be clear, it is not officially supported and could change or be removed at any time, but with that warning out of the way, I think my colleague would actually really appreciate some customer feedback on it to help inform the path we take with a supported solution. So if you’re open to giving it a try as-is, I wanted to let you know about it at least and see what you think. :slight_smile:

Thank you so much for your response

I checked out the repo, although I don’t fully understand how one is supposed to setup the netboot server, I’ll look into it but any help would be appreciated ( The build for the repo was also failing)

Is there no other way/method than this to get balena on RPi which already has a OS running on it remotely

Hi there,

I’m the original author of the project Kenna shared. It’s primarily geared toward automating the provisioning of new devices by network booting an installer, which writes balenaOS to the internal disk. In your case, given you have a machine on the same network, it’s possible you could get this working, but you would likely still need physical access.

The process for network booting Pis varies depending on the model. The Pi 3, for instance, requires the bootcode.bin firmware file to be present on the sd card in the boot partition, and nothing else. I believe the Pi 2 works similarly to the Pi 3, though I haven’t tried it. The Pi 4 needs the boot order to be changed in EEPROM beforehand, at which point it can boot over the network without any sd card at all. The original Pi model A and Pi Zero family are incapable of network booting to my knowledge.

If you have an existing Linux system that you’d like to transition to balenaOS, another option is a brownfield migration, using something like our takeover tool.

Thanks bunches!
the takeover tool fits our needs perfectly.
Will create a new post if we face any issues, i’ll mark this as solution!

Great! Let us know if there’s anything else we can help with.

1 Like