Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have several disk images in IMG format, which contain whole file system images presumably in ext2. I want to remove free sectors and therefore wasted space in the images. Is there any way in OS X/ Ubuntu / Windows to do this? Thank you for your reply in advance!

share|improve this question

migrated from Nov 23 '12 at 8:49

This question came from our site for professional and enthusiast programmers.

Why "presumably in ext2"? OSX doesn't use ext2, it uses hpfs+. – Paul Tomblin Nov 23 '12 at 3:17
@PaulTomblin: think you mean HFS+ – NSGod Nov 23 '12 at 3:32
You are correct. hpfs was in OS/2, wasn't it? – Paul Tomblin Nov 23 '12 at 3:39
What's this got to do with programming? – trojanfoe Nov 23 '12 at 7:37
@PaulTomblin: As disk images can contain whole file systems too, the disk image filesystem is ext2 and not HFS+/hpfs/NTFS/etc.. I would like to reduce the size of a disk image with a filesystem which may not be the default filesystem of the OS while maintaining its (the disk image's filesystem) boot abilities. trojanfoe: Sorry, this is for a programming project so I mixed up things in mind :) – blacktea Nov 23 '12 at 15:28

You must log in to answer this question.

Browse other questions tagged .