I’m trying to preload a BalenaOS image (downloaded from https://www.balena.io/os#download-os
) on my Intel Mac. It’s been a while since I’ve done this, so I had to update my balena-cli
and delete/recreate the preload image, but those steps went fine. The preload command fails during “Reading image information” with the following error:
| Checking that the image is a writable file
| Finding a free tcp port
- Creating preloader container
/ Starting preloader container
\ Reading image information
/ Reading image informationWaiting for Docker to start...
| Reading image informationDocker started
\ Reading image information
- Cleaning up temporary files
An error has occurred executing internal preload command 'get_image_info':
{"command":"get_image_info","parameters":{}}
Status code: 1
Error: Traceback (most recent call last):
File "/usr/src/app/preload.py", line 978, in <module>
result = method(**data.get("parameters", {}))
File "/usr/src/app/preload.py", line 935, in get_image_info
"config": get_config(),
File "/usr/src/app/preload.py", line 705, in get_config
data = get_json(partition_name, "config.json", image=image)
File "/usr/src/app/preload.py", line 688, in get_json
with part.mount_context_manager() as mountpoint:
File "/usr/lib/python3.8/contextlib.py", line 113, in __enter__
return next(self.gen)
File "/usr/src/app/preload.py", line 179, in mount_context_manager
with device_mount_context_manager(device) as mountpoint:
File "/usr/lib/python3.8/contextlib.py", line 113, in __enter__
return next(self.gen)
File "/usr/src/app/preload.py", line 170, in device_mount_context_manager
mount(device, mountpoint, **SH_OPTS)
File "/usr/lib/python3.8/site-packages/sh.py", line 1427, in __call__
return RunningCommand(cmd, call_args, stdin, stdout, stderr)
File "/usr/lib/python3.8/site-packages/sh.py", line 774, in __init__
self.wait()
File "/usr/lib/python3.8/site-packages/sh.py", line 792, in wait
self.handle_command_exit_code(exit_code)
File "/usr/lib/python3.8/site-packages/sh.py", line 815, in handle_command_exit_code
raise exc
sh.ErrorReturnCode_32:
RAN: /bin/mount /dev/loop0 /tmp/tmpl8qr8c0j
STDOUT:
STDERR:
mount: /tmp/tmpl8qr8c0j: unknown filesystem type 'vfat'.
Error: An error has occurred executing internal preload command 'get_image_info':
{"command":"get_image_info","parameters":{}}
As I mentioned, it’s been a while since I last preloaded an image, but it was working previously on this machine. Is there a requirement I’m missing somewhere? I’m running the latest release of macOS (14.2.1), balena-cli (17.4.12), and Docker Desktop (4.26.1).
Here’s the command I’m using to run the preload:
balena preload /path/to/raspberrypi4-64-5.0.8-v15.0.4.img --fleet [my fleet] \
--commit [commit hash] --pin-device-to-release --debug
In case it’s relevant, I’m using a generic release from the BalenaOS download page because the BalenaCloud UI is preventing me from starting the “Add Device” process, which is how I usually download a pre-configured OS image. I am at my device limit at the moment, but plan to upgrade my account once I get the preload set up (I don’t need to actually add an image just yet).