Win32 Disk Imager Creates an .IMG file that is too big to restore to identical media
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Image Writer |
New
|
Undecided
|
Unassigned |
Bug Description
I used a SanDisk 4GB microSD card to create an Android (CyanogenMod 7.1) external boot card for a Nook Color. For backup purposes, I used Win32 Disk Imager (either v.3 or v.4, installed on a Windows Vista SP2 computer) to capture the image to a file, as the program permits. As a test, I then tried to restore that image, using Win32 Disk Imager, to another identical, new SanDisk 4GB microSD card. I get an error message telling me that there's not enough space on the new card. I then used a partition manager to unallocate some space on the source microSD card, figuring this would reduce the captured image size. I recaptured the image and tried again - same results. Windows reports that the captured image file size was not reduced on the second attempt, despite unallocating some space on the source microSD card. I then formatted the target microSD card using SDFormatter, and repeated the experiment; same results. Windows reports the captured image file as 3.79 GB in size; Windows also reports the size of a freshly-formatted 4GB microSD card as 3.68 GB. Obviously, the captured image is too large to fit on the target microSD card, but I am at a loss to determine why Win32 Disk Imager captures an image that then cannot be restored onto an identical microSD card, especially if there is unallocated space on the source microSD card!
I looked at the partitions of the source microSD card after going through the process of installing CyanogenMod to it. The image installer for this process, which must be done on the Nook Color, creates a mixed microSD card structure that contains the following:
Partition Type Size
1 FAT32 415.71 MB
2 EXT4 462.81 MB
3 EXT4 964.84 MB
4 FAT32 all remaining space
Reported Total Size: 3.79 GB
So, I can see where the image size of the image that Win32 Disk Imager creates comes from, but the target (blank) microSD card needs to be formatted to get a drive letter for use with your program, and the maximum size that I can seem to get with any microSD card formatting program that I'm aware of (including Windows) is 3.68 GB! While common sense tells me that I should be able to restore an image to an identical microSD card for backup and restore purposes, it appears that your program does not permit that, either due to error or by design.
win32-image-writer works with the raw device for reading & writing, so partition sizes should be irrelevant. I'll look into the issue with not enough space.
Part of the problem is figuring out how big the raw device is (in Windows). I can do this easily in linux, but that doesn't help here.