So I have created an image of my RaspberryPi setup(using Win32DiskImager). I am using 32gb sd cards and when I go to write the image to other cards it doesn't fit. I've seen lots of others have this same issue and most of them say to use the live gpart desktop to resize it which I've done with no luck. I've also tried truncating like seen here: Image of a 16Gb card containing unpartitioned space at the end: Truncating possible? with no luck.

So here is where I am at:

  • I've downloaded and started up http://gparted.org/livecd.php
  • I have successfully resized the partitions that have all the extra space. I've tried setting their format type to be both unformatted and cleared neither seem to help(when it came to creating the image)
  • My new total size of the drive is 25gb instead of the 29 it was. When I go to create the image of the disk now its still the same size as it was before.

Can anyone help with how do I actually get the image to be smaller in size so I can write to multiple other sdcards?

Thanks for any help or direction!

  • The answers in your first link (involving truncate) will only work with images where "empty space" refers to space that is not occupied by a partition -- in which case using dd then truncate seems a bit silly, but in any case, if you try that on an image where the partition fills the card, it will trash it.
    – goldilocks
    Jun 22, 2016 at 14:29
  • 1
    You will need to explain how you "go to create the image of the disk" if you want serious help with this, since that is not something gparted does as far as I am aware. It may shrink the partitions on a card but it obviously does not shrink the card itself, so if you are creating an image from the card in a naive way, it will always just be the same size as the card, even if the card is totally empty.
    – goldilocks
    Jun 22, 2016 at 14:32
  • Sorry should have stated that, I've created it using Win32DiskImager, if there is a more appropriate way I can certainly give it a try! I run Windows on my main pc which is why I went that route. I'm just getting into Linux so pretty limited on my knowledge of tools included or out there. I haven't given dd a shot at creating images of the partitions but I may do that instead just to see.
    – Silent
    Jun 22, 2016 at 14:55
  • 1
    I don't know how Win32DiskImager works. If it is just a GUI interface to a blind tool that copies the whole card into an image irrespective of partition tables or content, then it will do it "in a naive way". If it is at all possible for you to do this using a linux system, see here. If you had additional storage attached to the pi that you could then read from another computer, you could use the pi and create it on that, or do it all from the pi if you have a USB - SD card adapter to burn to.
    – goldilocks
    Jun 22, 2016 at 15:01
  • You really put a lot of work into that other post, thank you! I will try it out after lunch sometime and let you know how it goes.
    – Silent
    Jun 22, 2016 at 15:32

2 Answers 2


It is not all that difficult to copy only the used part with dd and you will find LOTS of posts on this.

However if all you want to do is copy a card, just use the new SD Card Copier in the latest Raspbian. https://www.raspberrypi.org/blog/another-update-raspbian/


I did this yesterday with an 8GB card (I made the partitions fit in about 7.5 GB) and the image worked when written to another card, despite Win32DiskImager reading out all 8GB (and writing it to another card). When we made the partitions smaller, it ensured that nothing important was lost with the new smaller card.

Before I made the partitions smaller, I had a similar problem where the NOOBs bootloader would complain about a corrupt settings partition on some cloned cards. I believe it was due to some of the cards having fewer sectors (less than 8GB worth) physically available.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.