Cannot create image that removes unused space

Asked by johnkubik

I am trying to create a disk image of a 64gb SD card (only has about 500mb of actual data) that removes all of the unused space (so I can restore it to a smaller 16gb SD card).

I am trying to do this exclusively in windows without using any virtual environments (no VMs, or ENVs).

Win32diskimager seems like it should be able to do this, but the image does not seem to be created correctly.

Is there any way you know of to this? I am at a loss.

Question information

English Edit question
Image Writer Edit question
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Tobin Davis (gruemaster) said :

By 'unused space', the program won't read beyond the end of the last partition. If you were to layout your drive like a bar graph, it would look like this:
| = partition start/end
x = data
- = blank

with the first '|' being the beginning of the device and the first two 'xx' being the partition table data. Note that the partition with data is smaller than the entire free space on the device. It is that free space that is ignored.

In your case, it likely looks like this:

This free space is inside of the partition and the program can't ignore it.

For what you want to do, the first step is to resize the partition to a size of ~14G-15G, so the drive looks like this:
Then win32disk imager can read up to the end of the defined partition and stop. Restoring it to a 16G device would then be possible, so long as the end sector isn't beyond the last sector of the new device.

Can you help with this problem?

Provide an answer of your own, or ask johnkubik for more information if necessary.

To post a message you must log in.