Forum
[IDEA] Auto fix SD card corruption - Printable Version

+- Forum (http://forum.xbian.org)
+-- Forum: Software (/forum-6.html)
+--- Forum: Testing & Experimental (/forum-21.html)
+--- Thread: [IDEA] Auto fix SD card corruption (/thread-421.html)

Pages: 1 2


RE: Auto fix SD card corruption - 2twisty - 22nd Feb, 2013 03:15 AM

Great idea! You should add this as a toggle in xbian-config! I had to start over from scratch the other day because of a bad filesystem error.

In fact, I'd recommend that it be enabled by default and can be disabled in xbian-config.


Re: Auto fix SD card corruption - BartOtten - 23rd Feb, 2013 09:22 PM

As far as I know it is enabled by default on A5. Reports of user pulling the plug three times in a row without corruption are somewhere at this forum (or was it IRC)


RE: Auto fix SD card corruption - CurlyMo - 23rd Feb, 2013 09:31 PM

As far as i know, it wasn't Wink


Re: Auto fix SD card corruption - BartOtten - 24th Feb, 2013 07:20 PM

He knows best


RE: Auto fix SD card corruption - b0rna - 5th Mar, 2013 04:34 PM

This is really really annoying. Three full corruptions in 3 days. Pretty much every 5th time i turn the tv off, I get corruptions, lose all my config and data and have to install fresh. This never happened before alpha 5.


RE: Auto fix SD card corruption - CurlyMo - 5th Mar, 2013 06:24 PM

So you have your RPi connected to the USB port of your TV and when you turn of your TV the RPi is removed from power as well? If so, then that's in general a bad idea because pulling the power from the RPi leaves unsynced data causing corruption. Just the way the FS works. However, we are working on implementing boot from usb, nfs, and samba.


RE: Auto fix SD card corruption - b0rna - 6th Mar, 2013 10:02 AM

(5th Mar, 2013 06:24 PM)CurlyMo Wrote:  So you have your RPi connected to the USB port of your TV and when you turn of your TV the RPi is removed from power as well? If so, then that's in general a bad idea because pulling the power from the RPi leaves unsynced data causing corruption. Just the way the FS works. However, we are working on implementing boot from usb, nfs, and samba.

I understand that this is a dumb thing to do, however, the shutdown function has never worked properly for me. Especially combined with CEC and constant power.

Boot from SAMBA would be absolutely EPIC.


Thanks,

Borna.


RE: Auto fix SD card corruption - Sim1 - 7th Mar, 2013 06:15 AM

(5th Mar, 2013 06:24 PM)CurlyMo Wrote:  [...] However, we are working on implementing boot from usb, nfs, and samba.

Do you mean SD card boot but mounting root partition over nfs, samba or usb?
My 2 pis work this way already using usb sticks with root partitions moved from SD card.
I've already tried all xbmc distros and settled on xbian. With root partition on USB I have never experienced fs corruption issues while with SD card only it was kind of standard issue. It seems to be rock stable comparing to plain SD card installation even when you play around with overclocking.
Actually that's the only useful way of work for me. Even standard install of alpha5 resulted in SD corruption after first or second reboot. I had to edit config.txt before install run and remove all overclocking settings (pure 700MHz run) to run installation/initialization and copy root partition to USB stick. Then I could safely get back to 840 for daily normal use.


RE: Auto fix SD card corruption - gizi - 17th Mar, 2013 10:10 AM

i had in the past many SD Card corruptions when i try to overclock my PI......
Or i do a reboot, sometimes i do a reboot i have only a blining coursor on the top left....

so i used thsi command form you:

sudo sed -i 's/#FSCKFIX=no/FSCKFIX=yes/g' /etc/default/rcS && grep "FSCKFIX=yes" /etc/default/rcS | wc -l
i had a 1 after installtion.

But for me it dont worked.... after that i had several SD Card error..... every time i overclock my PI my SD Card is corrupt so i had to format it and restore the image i made before.....

this is te resault of the check:


root@xbian:~# tune2fs -l /dev/mmcblk0p2 | grep "[0-9]\{1,2\}:[0-9]\{1,2\}:[0-9]\{1,2\}"
Filesystem created: Sun Oct 28 21:50:41 2012
Last mount time: Thu Jan 1 00:00:02 1970
Last write time: Thu Jan 1 00:00:02 1970
Last checked: Wed Feb 20 18:00:11 2013


RE: Auto fix SD card corruption - gizag - 21st Mar, 2013 06:48 PM

Since Xbian is more an embedded OS would it not be better to mount most parts of the root filesystem as RO ?

If I'm correct it's only the home directory that needs RW, maybe some temp and logging dirs that need it and if people run sickbeard and stuff maybe an opt or /usr/local that needs it.

In that case only when updates are ran it's possible to corrupt the root system. This allows people to reset the device be plugging it (most common way for embedded devices), it will allways boot but might hang on a check only for less important file systems.


RE: Auto fix SD card corruption - CurlyMo - 21st Mar, 2013 07:32 PM

We are working towards a better implementation already.


RE: Auto fix SD card corruption - Evansans - 9th Oct, 2019 02:06 PM

First, troubleshoot the hardware and then reinstall the SD card driver. Right-click on this computer > Device Manager > double-click on the disk drive > right-click on the SD card name in the sub-directory > select Uninstall > click OK > Unplug SD Card > Restart PC > Insert Card, it will be detected again. Finally, you can also use cmd to <LINK_REMOVED>.


RE: Auto fix SD card corruption - deHakkelaar - 12th Oct, 2019 02:54 PM

(9th Oct, 2019 02:06 PM)Evansans Wrote:  First, troubleshoot the hardware and then reinstall the SD card driver. Right-click on this computer > Device Manager > double-click on the disk drive > right-click on the SD card name in the sub-directory > select Uninstall > click OK > Unplug SD Card > Restart PC > Insert Card, it will be detected again. Finally, you can also use cmd to <LINK_REMOVED>.

Those instructions and commercial link are not relevant to the issue.
I removed the link.