Boot from usb on a raspberry pi3b

Hi all, im looking into managing a fleet of rpi3b(+) with balenacloud. Following the getting started guide, ive been trying to get balenaos to boot from usb. These PIs are currently all booting just fine from USB using raspbian. If I flash balenaos to SD card it works. Ive tried a few different USB sticks to no avail.

In 2.38 I see output on the screen, it says there was no OS detected and it tries to boot from tftp. In 2.43 I dont see anything on the screen.

Is it possible to boot balanaos through USB on a PI3B?

1 Like

Hi, We don’t officially support anything other than SD card booting at the moment. For workaround see similar thread: Can't boot from USB SSD?
We are working to make this feature available.

Looks like it does work in 2.31. For us USB is an absolute requirement, so I’ll check back in a few months to see if things have changed. Thanks for the reply.

I think why people are looking into USB boot is that SD boot have absolutely terrible reputation with reliability. However, Balena as a service uses SD Boot officially, which raises the question of: are the SD boot reputation just rumors and only related to bad power and heavy writes?
your kind elaboration on this are appreciated

thanks

Hi @nasserw, from experience I would say that booting from an SD card would not lead to such problems. Most corruptions indeed occur with the scenarios you described - different power issues and heavy writes.

The real majority of reports of SD card corruptions we have are because of using cheaper SD cards. Models like Sandisk Extreme Pro, Samsung Pro Endurance and the like will lead to far less reliability issues. I highly recommend using an SD card designed for heavy usage where reliability is important.

Thanks,
Zahari

The primary reason for us to use USB over SD is that the SD cards are a total PITA to replace when you have devices that are in tight spots. We have devices that are located in objects on the street, very hard to get to, and the SD slot is basically impossible. You’d have to disassemble the device from the object.

Hi @majorz, thanks for your reply, this prompt support is exactly why we are considering Balena paid service.
As for the SD boot issues, do you have any stats that we can take into account where we compare SD Boot and USB Boot (e.g. how many Samsung Pro Endurance or Extreme Pro cards needed replacement)? Also, do you think having premium SD cards will solve the power and heavy writes issues?

thanks again

@corbosman, I looked for the relevant issue for the original problem and found it here: https://github.com/balena-os/balena-raspberrypi/issues/341

Please check the last comment there - it looks like it was fixed recently and you may test this out with the latest balenaOS version.

If you still experience issues please let us know on that thread and also leave a ping here so that it can be seen faster.

@nasserw, we do not collect any stats for this, but we definitely have impressions from the reports we receive. What usually happens is that a device stops working as expected and we get a support request from the user/customer. The device is still online in most of the cases and the filesystem is accessible.

One could check if md5sum --quiet -c /resinos.fingerprint reports errors on files that should not be modified. Since most of those files are read-only and only a couple are modified it is easy to spot some of the corruptions. Different Docker related corruptions are more frequent than ones on the read-only rootfs files and those are worse.

Something to note is that corruptions are gradual, so one could employ a similar mechanism for his data files and checks from time to time from his application whether there are corruptions with his data. Since the corruptions mostly occur over the data that is written frequently (that would be user data) this is a really useful strategy as one would get the early signs before there are more serious issues.

One of our customers did a few years ago a comprehensive stress test on different SD cards models and reported to us that Sandisk Extreme Pro outperformed by a big margin the cheap SD cards. Nowadays there are other good options available as well like Samsung PRO Endurance. We get reports much much rarely for pro SD cards compared to the cheaper ones.

Power issues including frequent power cycles may lead to corruptions as well.

BTW, we have been adding more and more features in our device diagnostics tool as well (available on the dashboard). It currently have an opened issue for md5sum checks - https://github.com/balena-io/device-diagnostics/issues/106

Thanks for the kind words about our support. We definitely take it as a priority. Support is provided directly by our engineers - both on the forums here and with our paid plans.

Please let us know if you have any further questions.

Best,
Zahari