Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Sparce option to reduce img size' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Sparce option to reduce img size
Authored by: grapesh on Dec 24, '12 08:26:33AM

Thanks, this is the best tool on restoring a busted drive! I thought I would also share one hint I discovered.

I ended up in a situation when I needed to restore an external USB harddrive, and I only had a spare harddrive of the same disk capacity (500M). So, making a disk image of the failed drive on a new drive crashed (after 2 days of dd-ing) with 'no disk space left on device' error. So, instead of running to get a larger-capacity USB drive, I figured out I can compress a new image with 'sparse' option, so it will fit on the available drive of the same size:

dd bs=512 if=/dev/rXX# of=/some_dir/foo.dmg conv=noerror,sync,sparse

'Sparse' basically skips NULL blocks (empty disk space), and the resulting foo.dmg is only of the size of data on a busted drive.



[ Reply to This | # ]