Backing up MicroSD image

So I attempted to back up the image on my microSD card using Win32diskimager in order to prevent the install from becoming corrupted (as it did). However, the image that I backed up was MUCH larger than the card's actual size. Also, when I attempted to use the image to clone it to another microSD of the same size as the original card, I received a warning saying that the image was much larger than the card itself. What gives?

Posted Jun 22, 2017, 11:34 AM UTC

2513
funkboy27•

Look up Madlittlepixel on YouTube. He has a tutorial on shrinking the image which is clear and straight forward. Follow his instructions and you’ll be golden.

I’ve dealt with this issue on a number of occasions and this tutorial saved my ass.

4
HazBurgum•

I had the same problem as OP, I'll definitely go check out Madlittlepixel, thanks!

2
ElixDaKatOP•

Yes! I'll definitely check this out! Thanks!

2
MrAbodi•

Backing up a card backs up every sector of the card.

Also not all cards are created equal and some are slight bigger/small than others. Unfortunately the new ad card is slightly smaller.

There are methods to shrink the image size but it isn't super simple

3
Vachenzo•

I'm actually inclined to think it backs up every sector of the partition, not the disk itself. Just went through this last night with a 128GB disk with a partition formatted to 32GB FAT32. The backup I had made wound up being from that drive before I reformatted and the image size was in the 20GB range. I'd be interested to hear from others about how this works.

1
MrAbodi•

Perhaps it does

1
mayorse•

Probably not what you're looking for but I thought I'd comment just in case it might help you, but what I did is just go to the file manager on the pi and copy the roms and bios folder to my flashdrive.

Did a fresh install, or whenever I need to do a fresh install, I just copy the folders back to where they were before.

3
dankcushions•

However, the image that I backed up was MUCH larger than the card's actual size

sounds like you instead backed up one of your computer's drives. it should be exactly the same size as the capacity of your SD card.

2
Mcline11•

Yeah, that's what I was going to say. Well at least he didn't write over his computer's hard drive. . .

2
sonofdavidsfather•

That is what I am thinking as well.

1
The_queens_cat•

That's weird. The image should be exactly the size of your original SD card (say, 8GB). I guess every card is different so there could be a minor difference in actual usable size, but it shouldn't be that much larger. How much larger is it? Maybe try a card one step larger and see if that works (like 16, if the original is 8?)

1
king-_-friday•

I know you are asking about Win32diskimager, but if you have access to a linux machine, I have shrunk multiple Pi images with this tutorial: https://softwarebakery.com//shrinking-images-on-linux

1
dills•

Every sd card is slightly different. When you save an image of a card, you save every single byte. All sd cards will have a few more or a few less bytes than others, so if you are trying to restore an SD card image to another one that is labeled as the same size there is a good chance that it won't work because the new card may be a few bytes short.

The best way to fix this is to shrink down the image that you have saved. The easiest way to do that is to use a program called gparted. Gparted is a very powerful tool, and can only be run on Linux. If you are running Windows, you can either burn a disk that you can use to boot into gparted instead of Windows, or you can download a program called VMware that will allow you to run a virtual Linux machine inside windows.

For me VMware was a much easier option, it made things a lot easier down the road too because I could look through my SD images later in Linux, where Windows is unable to understand the formatting. Also I didn't have to restart my computer Everytime I needed to use gparted for something.

So download VMware, Ubuntu (a version of Linux that you will install on to your new virtual machine), and gparted. There should be plenty of gparted tutorials out there for you.

Good luck!

1