OT & feeling dumb: disk image without free space

jarednichols
Honored Contributor

Feeling dumb. Can someone tell me how to snap a disk image that doesn't include free space? I've got an external hard drive that I made a boot image of and I'm trying to snap an image of it so that it can be deployed to other USB devices (thumb drives, hard drives etc) for techs to boot from and image with.

The problem is that while it's only using ~7GB of disk, the image is ~20GB because that's how big the partition is that I installed the OS on. When I try and apply the disk image to a 16GB USB thumb drive it says there's not enough space.

Follow?

Thanks

1 ACCEPTED SOLUTION

rockpapergoat
Contributor III
  1. use instadmg to prep the image and avoid some of these issues.

  2. use `hdiutil resize -size 12G image.dmg` or similar. check the man page for specifics.

View solution in original post

4 REPLIES 4

dpertschi
Valued Contributor

I'm thinking I've had the same problem before, but I never considered free space thing.

What I did was mount the disk image, and then use CCC to clone the mounted volume to the USB stick. It worked in my case.

rockpapergoat
Contributor III
  1. use instadmg to prep the image and avoid some of these issues.

  2. use `hdiutil resize -size 12G image.dmg` or similar. check the man page for specifics.

mm2270
Legendary Contributor III

You probably need to use hdiutil to either create the image from the source, or reduce its size like Nate stated. I don't think doing it from the GUI will let you capture only the data and not the entire volume.

jarednichols
Honored Contributor

2 that's it.

Thanks, Nate.