2

This question is for those of you familiar with command-line tools and disk images. I'm stumped!

Previously, I could mount a read-only disk image with a "shadow" file to make it read-write using this command:

hdiutil attach "someDiskImage.dmg" -shadow "someShadowFile.dmg"

However, on Catalina (macOS 10.15) this doesn't work. I'm not sure why or whether it is related to the OS version. Here is the output I get:

-> ls -al

total 391168
-rw-r--r--@ 1 myname  admin  188484680 Nov  7  2018 example.dmg
-rw-r--r--  1 myname  admin   11767808 Nov  7  2018 example.dmg.shadow

-> hdiutil attach -shadow example.dmg.shadow example.dmg

Usage:  hdiutil attach [options] <image>
        hdiutil attach -help

->

Can anyone help me figure this out? Is -shadow just broken on Catalina? Thanks. Also, can you verify if you can reproduce this issue?

1
  • This still works. Just tested: hdiutil attach ~/Desktop/test.dmg -shadow ~/Desktop/test.dmg.shadow (with test.dmg compressed 100 MB read-only). Then dd 28 MB of random stuff to the mounted test.dmg: ls -la test.dmg= 31 kBytes and ls -la test.dmg.shadow= 28 MBytes. – klanomath May 20 '20 at 21:26
1

Alas, it seems that either macOS has changed the format of .shadow files in a breaking way, or that my .shadow files are corrupted (hundreds of them) without any corruption to the DMGs themselves (hundreds of them, all with checksums that match). I'm going to guess it's the first option. Nonetheless, the usage message only shows when mounting with these specific shadow files. When I create new shadow files, the disk images mount just fine.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .