I have had enough of damaged Raspberry Pi SD cards due to frequent power outages here. This week I have ended up with damaged SD card number three and had to take measures to prevent this from happening again and again. Where I live, the power goes down frequently and this is ideal for SD card corruption to occur. And I mean not only damaged file system, but physically damaged SD card. Low level format doesn’t help. I have a good power supply and didn’t overclock; tried a variety of “supported” SD cards so those are eliminated as possible cause. I haven’t been able to run my Raspberry Pi straight for more than 3-4 days, leaving me pretty unhappy about the stability. Googling on the issue reveals it is a frequent problem with many users. I decided to try the approach described by Orer2ddo456 in this post, namely move Raspberry Pi’ root file system from the power sensitive SD card to external USB flash drive. The instructions are easy to follow and 30 minutes later I had my Pi running off the USB drive.
I have switched on the SD card’s write protection switch, so it is guaranteed to be read only [edit: apparently the SD card switch is for the OS to consider, not a hardware switch. So Raspberry Pi doesn’t consider it and you can still write to a ‘locked’ card]. The SD card is still required for booting (R/O), but with this approach you can use a 2GB card, so it is a saver.
The home directory is moved also to the USB drive, so from user’s prospective nothing is changed. I will give this setup a fair amount of abuse to see how it behaves, but it looks promising.
Page views: 23852