Forum

Full Version: Auto fix SD card corruption
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
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.
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)
As far as i know, it wasn't Wink
He knows best
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.
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.
(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.
(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.
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
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.
We are working towards a better implementation already.
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>.
(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.
Pages: 1 2
Reference URL's