Cannot mount sparsebundle with hdiutil, but DiskImageMounter works
This has been driving me nuts for days. Have sparsebundles created by Time Machine (2 Macs back up to the same Time Capsule).
If try to mount from the command line using:
hdiutil attach /Volumes/Data/JDCMacBook.backupbundle
will get a "no mountable filesystem" message.
But then go to the Finder, go to /Volumes/Data and Open With -> DiskImageMounter it attaches correctly. Can see all the directories and files as expected - from either Finder or the command line.
But the weird thing is if you then detach the bundle, go back to the command line and use hdiutil again it attaches OK. Have tried this scenario multiple times with the same pattern of fail, succeed with DIM, then succeed with hdiutil.
So what does DiskImageMounter do differently internally? And it must clear some setting or something to then allow hdiutil to attach successfully - what would that be? Could it be a timing problem?
BTW: Normally, this hdiutil is issued internally from a background batch job. Did actually try invoking DiskImageMounter within the batch job, but if there is a real problem it pops up an error screen which must be OK'd, which then holds up the batch job forever if there is no user on the machine. And if there is a user, they are extremely confused since they have no idea where this error came from.
Are there any hdiutil settings that could make this work, or any way to invoke DiskImageMounter internally but suppress all pop-up errors and just return an error message if it fails?
Tech setup: MacBook Pro, macOS 10.15.5, the sparsebundles are on a TimeCapsule via wired Ethernet.
Thanks
MacBook Pro 15″, macOS 10.15