Resin config inject: "Unmount failed..."?



On MacOS I’m trying to inject a configuration file into a local disk image that I previously created with resin os download and resin preload. Trying to run sudo resin config inject config.json --drive rpi.img --type raspberrypi3 gets me:

1: Command failed: /usr/sbin/diskutil umountDisk force “…/…/rpi.img”
Unmount failed for “…/…/rpi.img”

(Full paths redacted.)

Any ideas?


Hi Robin,
The resin config inject command is designed for a mounted disk image (for example, your image once you’ve already flashed it onto an SD card), so the problem you’re seeing is from specifying an image when it is looking for a drive. You can use resin os configure to create a configuration for a local disk image:


I just figured that out as well and it works - yay!

I’m confused, however, why in How to put the config.json generated from Resin Dashboard to the compiled image when build?, a Resin staffer suggested a few months ago that this should work, and why the documentation at also lists ‘resinOS image’ as a supported operand.

That’s the first thing that comes up with Google. It smells like the resin os configure approach is a new thing that isn’t documented anywhere else (e.g. the manufacturing blog post at even though it makes for a much better workflow.


That is confusing, I’ll have to do some more digging to figure out if pointing directly to an image as described in that forum post should work, and if so why it didn’t work for you. Either way the docs should be clarified.

As for the blog post, there are a number of updates we’ve made to the CLI that improve that process, and I’m currently working on a new blog post to reflect these changes.