Are SD cards created equal?

I have configured Raspbx on my Raspberry Pi and it's doing pretty much what I want it to do so I thought I would clone the SD card as a backup.

I am using Win32 Disk Imager and it reports:

Not enough space on disk: Size: 7864320 sectors Available 7744512 sectors Sector size 512

Both cards are supposed to be 4GB the "source" card is an "Elite" £2.73 inc delivery from Hong Kong, and the "target" was a £5 "Transcend" from Maplin.

So to sum up, the original distro fits on both cards, a copy from the Transend to the Elite works but not the other way round.

Is this expected behaviour?

--
Graham. 

%Profound_observation%
Reply to
Graham.
Loading thread data ...

Pretty much. SD cards have a "nominal" size. 4GB in your case. The actual capacity depends on the implementation of the card and how many bad bits it has (I believe).

Older versions of Win32diskimager will copy from to a smaller card without complaining too much, but that could leave you with a damaged filesystem.

I use a Linux PC to copy my cards by partitioning the new card and copying the contents over with tar, rsync or any other handy tool.

You could use a Linux Live CD to temporarily boot your Windows PC to Linux (it doesn't install any software unless you tell it to), and use the tools on there to copy the contents of your card.

I've been toying with the idea of writing something that can copy cards using just the Pi itself, keyboard, screen, USB card reader, a special script and connecting two pins together on the Pi. It seems promising, but I got distracted by other projects :(

Reply to
Dom

Yes. I use gparted to shrink the partition size before copying from the SD card.

Reply to
Bob Martin

Cheap flash cards can exhibit dubious behaviour from lying about capacity to having uncorrectable bad bits every time you write/read. Try exercising the drives with one of the capacity checking utils like h2testw

Reply to
Rob Morley

Yes.

All 4 GB cards are substantially smaller than 4 GiB (the integral- power-of-2 size). The differences are in the amount set aside for replacing worn out blocks. There is no common specification for how much space is set aside for that purpose. Two cards from different manufacturers are very likely to set aside different amounts.

Dave

Reply to
Dave Higton

USB SDHC adapters exist, so attach one and copy with dd. Don't make things more complicated than they need to be!

Reply to
Jon Lane

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.