5

I currently start using different Raspberry Pis to monitor my (Wi-Fi) network. (OS: Raspbian)

Unfortunately one Pi often corrupts the SD Card and I definitely don't just plug off the power cable. It must be something else.

Since I'm starting to do this, I try different things to setup the pis. One is the manipulation of the /boot/config.txt but only for video options (which was, together with a reboot, the last thing I did before the file system got corrupted the last time).

Here is why I want to change this:

Because the raspberry pis should do their work automated, I don't have a monitor plugged in all the time. I want to set the HDMI hot-plug on, so that I can check the Raspberry Pi even when there is a problem with the network and ssh won't work.

Since hdmi_safe=1 doesn't fit my monitor resolution that good, I changed the entries manually.

Here is my configuration:

Disable_overscan=0          
Hdmi_force_hotplug=1  
Hdmi_group=2   
Hdmi_mode=28   
Hdmi_drive=1  
Config_hdmi_boost=4

The question:

Is it possible that I accidentally wrote something wrong into the config file, which lead to the corruption of the SD card or is there anything else which could cause this pi to corrupt the SD card? Sorry if this is a silly question/problem but Google didn't help me and I don't really know whats the problem because another pi didn't corrupt the file system even once.

By the way: the video configuration didn't even do what I want it to do. The console should have a resolution about 1280x800...

Update: I use the SanDisk 8GB Extreme Pro (Class 1) SD cards, and yes I did try different SD cards of this type.

Update2: I assume, that the card is corrupted, because either while I want to perform different commands or at boot up there are suddenly a lot of error messages, which come so fast, I even can't read them, and I won't be able to do anything else again but perform a new installation/write my backup again on the SD card. And I did try both options. The odd thing is, this happens (at least until now) only to one of my Raspberry Pis. And I put them all into cases right after unpacking it, so I don't assume the Pi is really damaged.

  • Have you tried a different SD card? – Xedret Jul 31 '13 at 0:27
  • 4
    possible duplicate of How can I prevent my Pi's SD card from getting corrupted so often? – nc4pk Jul 31 '13 at 2:21
  • At the moment I don't think I can't make the SD Card read only and again, that's not a problem of sudden power loss. – Dominik Jul 31 '13 at 16:33
  • 1
    You have not actually described why you believe the SD card is getting corrupted. The only "proof" of such would be if checking the main partition with fsck says it is so. If you are assuming it is corrupt for some other reason -- e.g. it won't boot properly -- there could be some other cause. You need to explicitly rule that out. – goldilocks Jul 31 '13 at 17:20
2

The only option I know of in config.txt capable of corrupting an SD card is overclocking. You do not use overclocking so I will provide some other steps for improving SD card lifespan.

  1. Put some subdirectories of /var in a ram drive. The following example would allocate /var/log up to 100M of RAM, but will only use the size of the files in /var/log, if put in /etc/fstab all on one line:

    tmpfs   /var/log    tmpfs defaults,noatime,nosuid,mode=0755,size=100m    0 0
    
  2. Use a bigger card.

    Due to the SD card driver's wear levelling, writes are spread out over all the card. A 16gb card has potentially double the lifetime of an 8 GB card.

  3. If possible, mount the SD card in read only mode and use a USB stick for storage.

This method can be used as a last resort. Append ro to the options in the SD card's fstab line. USB sticks or hard drives often have longer lifespans than SD cards.

Not all these options may be appropriate depending on your situation, but I hope these suggestions help.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.