The SD card's we usually use and sell in the shop are Transcend 4GB cards which in reality are 3.73GB. The emonSD pre-buit-SD-card image for the emonPi/emonBase fits on these cards no problem (the image was created by imaging one of these cards).
I assumed there would be no problem writing the image onto a larger card. I recently acquired a batch of SanDisk 4GB micro SD cards which in reality are 3.77GB. I was therefore suprised when dd threw a block error while writing to the card and I get a 'unable to mount' error when I try and insert the card.
Has anyone any idea what could be the problem here? How could the image be made to fit on a 'larger' card! Has anyone else experienced this issue with other SD cards?
I'm using Linux dd to write the .img to the card with bs=4M parameter.
Standard 3.73GB card on the right and new 3.77GB card on the left (with mount error showing)
Re: Error writing emonSD SD card image to larger card
I have something similar in the past.
Easiest way around it is to back up your old card using fsarchiver and then again using fsarchiver write the image to your new card.
fsarchiver is a very powerful tool which I use all the time now to back up my system, as the 8Gb backups are only about 1.2Gb stored space.
I think you can apt-get it.
Paul
Re: Error writing emonSD SD card image to larger card
Thanks Paul, I've just given fsarchiver a go to backup the old card (all three partitions)
$ sudo fsarchiver savefs fsarchiver_emonSD-17Jun2015.img /dev/sdc1 /dev/sdc2 /dev/sdc3
Returns error:
oper_save.c#947,filesystem_mount_partition(): filesystem of partition [/dev/sdc1] is not supported by fsarchiver: filesystem=[vfat]
Can fsarchiver not handle fat?
Re: Error writing emonSD SD card image to larger card
Errm no. I forgot about the boot partition. I only backed up 'root' as I am using a USB HDD.
Can you not copy the remaining 2 partitions using fsarchiver, and before writing them to the destination copy over sdc1 using something else. fsarchiver will then fill the remaining space with the other 2?
Paul
Re: Error writing emonSD SD card image to larger card
I use GParted to resize the images like you but I don't use dd.
I copy the new image to a Windows OS, fire Win32DiskImager and copy the file to the SD card.
It works just fine.
Re: Error writing emonSD SD card image to larger card
@ glyn
How did you solve your problem?
Thanks