I’d like to run BalenaOS directly from SD Card instead of burning it to eMMC on my Beaglebone Black device. It’ll work like RaspberryPi in this manner since eMMC of BBB is corrupted. How could I do this ?
Hey there @ahmet welcome to the forums.
If I understand things correctly, when you provision a BeagleBone Black, the image that you flash on to an SD card then installs the OS onto the eMMC on-board the device. It’s an image that then flashes the internal storage of the device.
I’ve never tried this but what you potentially need to try here is to ‘unwrap’ the image after downloading it (before flashing to SD card), to extract the OS image component that’s inside it, then flash that to an SD card. That way balenaOS should run directly from the card like it does on a Raspberry Pi (as you say).
We have a tool for doing that, although I can see it’s quite old, but it would be worth a try: GitHub - balena-os/balena-image-flasher-unwrap: Tool for unwrapping balena-image from a balena-image-flasher (unless you can find another way).
Hope this helps!
Thank you @chrisys ! It just worked great.
I just wondered if the opposite is possible? I.e., I unwrap the image, make some modification (for example, modification of uEnv.txt, configuring /etc/docker/daemon.json) then “wrap” it again to make flasher for my eMMC-using Beaglebone devices.
Cool @ahmet glad to hear it! There’s no reason why you couldn’t make a change then wrap it again - I am pretty sure that would work.
So is there any “wrap version” of this tool: balena-image-flasher-unwrap? Or else is it trivial to do?
@ahmet, you can just mount the original .img file and modify there. On a Mac you just double-click on the .img. Should work on Linux. May work on Windows as well.
Please keep in mind that any customizations (like uEnv.txt) that you make this way are unlikely to persist when you upgrade the OS via the dashboard.
@rosswesleyporter but the “flasher image” only contains flasher’s uEnv.txt, I want to change wrapped image’s uEnv.txt inside of it. So that when I put SD Card to the BeagleBoneBlack and flash it, it would write balenaOS with modified uEnv.txt.
After some investigation I’ve found the image located at flash-rootA/opt directory. Though having no file extension, I’ve successfully mounted it. Thank you anyway!
Yes you’re right, upgrading via the dashboard would erase it, I was planning custom upgrading since we were using openBalena.