Is there a way to use 'dd' command to get a hard drive image that ignores the free space on the hard drive?
|
migrated from stackoverflow.com Dec 20 '09 at 0:20
|
No. dd is a block-by-block copy that ignores content (nothing is ever free, just not yet overwritten). If you want to ignore free space you have to use a logical imaging tool such as Ghost, Acronis or similar. |
|||||||||
|
|
As others have pointed out that is not possible with dd. It's a very low level tool and just copies the bitstream from one device to another or file. Partimage however is capable of doing what you're looking for and it supports a long list of file systems. The easiest way to use this is to download the clonezilla livecd. It's a livecd that has wrapped partimage with an easy to use wizard. |
|||
|
|
|
If you first make sure that the free space on the hard drive is filled with zeros, it's possible to convert the disk image into a sparse file, where the zeros won't take up storage space. Details in an another answer. |
|||
|
|
|
You need to use file system level utilities that recognise used and free space. One program that uses a nice GUI for accomplishing this is GParted, but there are several GUI and command line tools to copy, resize, and modify file systems. |
|||
|
|
|
It was my understanding that So, no. I don't think so. |
|||
|
|
|
No, If most of the disc that is unused has never been used since a full-format (so is still all zeroes), running the output of |
|||
|
|