Dealing with DMG files

If you landed on this article, well… I am sorry for your loss. I have been and you have my back.
You might have experienced pain due to .sparsebundle not opening anymore with either “no mountable filesystem” or some other arcane errors.
It is also possible that after you recovered your sparse bundle you might want to convert that image in a regular DMG so that you can either remove what you don’t need or comfortably perform other r/w operations.
Fret no more Daniel San, the chances of making are slim, however, you got nothing to lose besides stop trying. Here’s my recipe:
STEP 1
 hdiutil attach -nomount -noverify -noautofsck 
/Volumes/{name of your disk}/{name of}.sparsebundle
that will attach and skip a few steps normally performed by the system, which in this case would prevent from continuing.
/dev/diskx Apple_partition_scheme
/dev/diskxs1 Apple_partition_map
/dev/diskxs2 Apple_HFSX
Where x is the disk id for the external disk. You are interested in the one labeled Apple_HFSX or Apple_HFS. It might be 2, 3, 4 or higher.
STEP 2
fsck_hfs -drfy /dev/diskxs2
using whatever relevant device was located in STEP 1.
STEP 3
However, since OS X 10.6.x, Time Machine will refuse to write to a destination volume that fails its verification. Even if the process above succeeds in recovering the backup, you may still need to remove the black marks that Time Machine wrote when it failed verification.

Comments

Popular posts from this blog

Postgres on Synology

The Making of Basculo

Build an independent watch app - Part II