Problem: I am attempting to create an exact image of a compact flash and then compress the compact flash image for easier storage. The compact flash is not full (~1.5GB used, 32GB size). The problem is that when I compress the extracted image, it is not compressing well and I am not sure why.
I have tried multiple methods of compression and all result in no better than 50% compression ratio. I would assume that the zeros filling the ~30GB of the CF would compress very well and the resulting file would be ~1.5GB (or better).
What am I doing wrong? What am I overlooking?
- Zero the CF: dd if=/dev/zero of=/dev/sdb bs=1M
- Partition, Format, install files, data, etc (approx 1.5GB used)
- Create image of CF: dd if=/dev/sdb of=cf.img
- Compress CF (using gzip, bzip2, lzma, etc etc...)
- I am zeroing the CF by using a USB media reader, connected to a Windows 7 box. The USB device is attached to a virtual machine running Linux.