0

I've been using dd if/mnt/sda1/images/$1 of=/dev/$2 to clone some embedded images for compact flashes. I used to only be using one brand of CFs, but, now I have two of them (both 2g, but obviously different amount of blocks) and the DD image is too big for the second brand.

How can I copy the image and ignore the empty blocks so I can fit the image on the new card? I know I can't use DD anymore and I saw reference to ntfsclone in my googling. What would be an effective way to do this? Thanks.

  • 2
    Is there a reason you're using a block level copy and not a file level copy? – jidar Feb 24 '12 at 17:19
  • Indeed, why not just copy the files? Also, you’re using *nix right? You can add an OS-specific tag to ensure you get the most applicable answers. – Synetech Feb 24 '12 at 17:23
  • @jidar I edited it for knoppix, and I was using block level because it leaves it as an ISO. Will a file level copy compact into an ISO as well? – Max Feb 24 '12 at 17:31

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.