BeagleBone SD card died - how to avoid?


The safest way to make a copy of the current card (but perhaps not the easiest) would require that you shutdown the Beaglebone and insert the microSD card in another PC.

On Windows, you can copy it to an .img file using Win32DiskImager. You could then use Win32DiskImager to copy the .img file onto other microSD cards.

On Linux, you would use the dd command. There are various options that affect the speed of the dd command, but the following will work (run as root):

To backup:

dd if=/dev/sde of=sdbackup.img

To restore onto a microSD card:

dd if=sdbackup.img of=/dev/sde

Of course, the “/dev/sde” part will vary depending on your configuration: it might be /dev/sdc or /dev/sdd or whatever. Check the output of dmesg after inserting the microSD card to see what device letter is assigned to it.

Having said all that, it is possible to make a “hot” copy of the microSD card while it is running the Beaglebone. That’s actually what I do, and so far I’ve been able to restore those copies onto other microSD cards and use them in Beaglebones without problems.

So, to make a hot copy onto a USB drive (you probably want to compress it):

dd if=/dev/mmcblk0 | gzip -1 > media/sda1/sdbackup.img.gz

To make a hot copy over SSH from a Linux PC, enter the following command on the Linux PC:

ssh root@ dd if=/dev/mmcblk0 | gzip -1 - | dd of=sdbackup.img.gz

The IP address will, of course, need to be changed to your Beaglebone’s address, and SSH will prompt for the root password.


Thanks a lot, Dan. Greatly appreciated. At the very least I'll have a spare card ready if (when?) the problem occurs again. Hopefully, the present card will last longer.




It certainly should last a lot longer. I have a Beagleboard XM that’s been running off the same microSD card for about 2 years, and I’m actually logging data to that card.

The 2 things that might be contributing to the problem are the daily reboot, and possibly package updates. Angstrom has many advantages, but its frequent package updates result in a lot of I/O. (Of course, this is an issue only if you are frequently running opkg update.) My Beagleboard is running Ubuntu, where package updates are much less frequent, and about the only time it is rebooted is when there are power outages.