.dmg images copied to external drives are corrupted

I've created an encrypted .dmg image on my M1 mac (500MB, Mac OS Extended (case-sensitive, Journaled)). When I copy this file to an external usb drive (via the Finder) the copy looks good, size-wise. I can even open it and inspect its contents. When I check its md5 hash it matches the original file.

Now I unmount the usb drive and remount it. The file size is now much smaller, 17MB and the hash no longer matches. Tried this same process on several external drives both sd and spinning hardware all with plenty of space to copy to.

Tried this copying from the command line using "cp". Same corrupted results. All external drives are formatted Mac OS Extended (case-sensitive, Journaled).

rsync worked. The files on the drives once remounted were correct.

Finally, I created a new image APFS (Case-sensitive). This file seem top copy fine via the Finder.


Any idea what is going on? My M1 Mac is running Sonoma 14.6.1.

iMac 24″

Posted on Mar 24, 2025 2:51 PM

Reply
10 replies
Sort By: 

Mar 24, 2025 4:24 PM in response to MrHoffman

RE: Sparse or Sparse bundle disk image?

I used the default which was "read/write disk image".


RE: "Case Sensitive is a poor choice"

I guess I misunderstood the necessity for case sensitive. I use mixed case with my file names and was under the impression I needed that.

Reply

Mar 24, 2025 4:28 PM in response to =->Rocketman<-=

Case sensitive is for allowing file/folder names that are technically spelled the same, but pays attention to upper and lower case. There are a few apps used by scientists that are written for, and meant to be used with a case sensitive drive.


On a case sensitive system, these would all be considered different:


foobar.psd

Foobar.psd

fooBar.psd


They would all be considered the same on a non-case sensitive drive, and you would be told the file name was already in use.


But it's not just that, case sensitive routinely throws off apps that aren't written for case sensitive drives. Some won't let you save a file. The Adobe apps will tell you when you start to install them if a drive is case sensitive and refuse to install until you reformat the drive as non-case sensitive.

Reply

Mar 25, 2025 2:46 AM in response to =->Rocketman<-=

This appears to be a macOS Sonoma bug with HFS+ journaling when copying encrypted .dmgs.

Your solutions are correct: either use APFS format (recommended) or rsync for transfers. For now, avoid Finder/cp with HFS+ encrypted images. Consider reporting to Apple via Feedback Assistant. APFS is more reliable on modern Macs anyway.

Reply

.dmg images copied to external drives are corrupted

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.