There are times when you come across a dmg image that has a larger disk geometry size than needed.  This can cause issues if you try to restore a monolithic disk image to a volume smaller than your total dmg size.  This is a common issue if Disk Utility was used to capture an Image of a Macintosh HD. To fix this issue, follow the commands below.

 

#Find out the resize limits

sudo hdiutil resize -limits /Users/username/Desktop/Read.dmg 


#Convert the dmg to read write
sudo hdiutil convert /Users/username/Desktop/Read.dmg -format UDRW -o Write.dmg


#Resize the DMG
sudo hdiutil resize -size 50g /Users/username/Desktop/Write.dmg


#Convert back to read only DMG
sudo hdiutil convert /Users/username/Desktop/Write.dmg -format UDRO -o Read.dmg

#Scan image for restore
sudo asr imagescan --source /Users/username/Desktop/Read.dmg

Keith Mitnick

As Senior System Engineer & COO at HCS, Keith wears many hats. He is responsible for a myriad of duties at HCS. Keith is always willing to do the job at hand and is never afraid to get his hands dirty.

Speak with an Apple Certified expert today

We’d love to discuss your business challenges, even if you’re not sure what your next step is. No pitch, no strings attached.

Let's Talk