MoosePi
Posts: 112
Joined: Wed Nov 06, 2013 4:42 pm

SDCard Corruption - is it really ? - Solved

Sun Nov 10, 2013 9:13 am

Recently bought a 512MB Model B, had previously had a 256MB, and as have several SD Cards went about using them.

These cards have been used previously in several devices, Cameras, Tablet, Laptops, Android TV Sticks etc and in Linux used Parted to re-create partition table and format them FAT32.

First and foremost DDing a RAW Image gave errors when booting, whereas using NOOBS I had no issues and successfully configured and used for a day or two before the boot would stick and request fsck or sometimes complain of missing files.

I even used a Windows Machine to utilize DiskImager to write a RAW Image, I lost count of the different cards I have tried and permutations of clocking.

Also tried differing power supplies as per the numerous posts and read through all the relevant posts, to no avail.

In desperation bought a new external USB Card Reader from Poundland UK and a £6.99 8GB Class 4 SD Card from Wilkinsons UK (generic brand) and it is like I have bought a different Pi. So maybe SD Card is not always down to power issues ??

It was the really pathetic that I was being a cheapskate by using old SD Cards and wasting 4 weeks of my life !!
Pi Forum Search and Google yields answers to many questions

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26857
Joined: Sat Jul 30, 2011 7:41 pm

Re: SDCard Corruption - is it really ? - Solved

Sun Nov 10, 2013 9:20 am

The SD Card issue is odd. I've used a load of different cards, old new etc, and never had a problem, and yet others using similar cards have no end. It seems to me to be fairly rare, but given the large number of Pi's out there, it is noticeable.

Note that the Foundation is expending a lot of effort getting to the bottom of the problem - there is a bug fix currently being tested that may help.

My personal opinion is that there is a bug somewhere, but also that some SD cards simply have bad performance, and wear out quickly. Combined this causes the number of cases we see.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

MoosePi
Posts: 112
Joined: Wed Nov 06, 2013 4:42 pm

Re: SDCard Corruption - is it really ? - Solved

Sun Nov 10, 2013 9:30 am

Yes it seems that the cards have come to the end of their read/write life, though some are "branded" I would not bet that are not cheap imitations.

Another issue I have found that different devices seems to format them differently, so I would surmise it could be that not all manufacturers of devices are following good practice when writing their inbuilt formatting software ?

Needless to say I have binned them all ! I have learn't my lesson !

On a side note I have rpi-updated Wheezy and would like to say thanks to the developers for the vast improvement over the last 18 months or so.....
Pi Forum Search and Google yields answers to many questions

KenT
Posts: 758
Joined: Tue Jan 24, 2012 9:30 am
Location: Hertfordshire, UK
Contact: Website

Re: SDCard Corruption - is it really ? - Solved

Sun Nov 10, 2013 9:44 am

Interesting observations

The other independent variable you have changed is that you are now using an external card reader on your PC. I wonder if your laptop was in some way damaging the cards which the card reader isn't. Would be interesting to use the laptop with your new cards.
Pi Presents - A toolkit to produce multi-media interactive display applications for museums, visitor centres, and more
Download from http://pipresents.wordpress.com

MoosePi
Posts: 112
Joined: Wed Nov 06, 2013 4:42 pm

Re: SDCard Corruption - is it really ? - Solved

Sun Nov 10, 2013 9:55 am

KenT I have formatted the cards in a Laptop, Tablet, Camera and External Card Reader, apologies for not making that clear.

I have binned my old external SD Card Reader as well and have given up on using any other device to format the NEW Card in the future.

It seems best to stick to one card and one card reader...................
Pi Forum Search and Google yields answers to many questions

User avatar
DougieLawson
Posts: 39581
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: SDCard Corruption - is it really ? - Solved

Sun Nov 10, 2013 11:34 am

MoosePi wrote:KenT I have formatted the cards in a Laptop, Tablet, Camera and External Card Reader, apologies for not making that clear.

I have binned my old external SD Card Reader as well and have given up on using any other device to format the NEW Card in the future.

It seems best to stick to one card and one card reader...................
Nonsense.

The problem with reading it on a Window laptop is that Windows can't see the ext4 partitions so it ignores them and reports just the fat32 partitions it can see. Same with a camera or tablet, they will ALWAYS ignore partitions that aren't type 0x0C.

If you want to clean an SDCard for reuse use fdisk (or cfdisk or gparted) to remove ALL partitions and rewrite the partition table with a single fat32 (type 0x0C) partition that uses all the space on the whole card.
http://www.tldp.org/HOWTO/Partition/fdi ... oning.html
Once the card has a good partition table then you need to format it as a fat32 filesystem with sudo mkfs /dev/sda.

Or on Windows use the SD Formatter program to do all of that stuff automagically.

Windows will then see the SDCard as a) empty and b) full size.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All fake doctors are on my foes list.

MoosePi
Posts: 112
Joined: Wed Nov 06, 2013 4:42 pm

Re: SDCard Corruption - is it really ? - Solved

Sun Nov 10, 2013 12:28 pm

DougieLawson wrote:
MoosePi wrote:KenT I have formatted the cards in a Laptop, Tablet, Camera and External Card Reader, apologies for not making that clear.

I have binned my old external SD Card Reader as well and have given up on using any other device to format the NEW Card in the future.

It seems best to stick to one card and one card reader...................
Nonsense.

The problem with reading it on a Window laptop is that Windows can't see the ext4 partitions so it ignores them and reports just the fat32 partitions it can see. Same with a camera or tablet, they will ALWAYS ignore partitions that aren't type 0x0C.

If you want to clean an SDCard for reuse use fdisk (or cfdisk or gparted) to remove ALL partitions and rewrite the partition table with a single fat32 (type 0x0C) partition that uses all the space on the whole card.
http://www.tldp.org/HOWTO/Partition/fdi ... oning.html
Once the card has a good partition table then you need to format it as a fat32 filesystem with sudo mkfs /dev/sda.

Or on Windows use the SD Formatter program to do all of that stuff automagically.

Windows will then see the SDCard as a) empty and b) full size.
What have you been smoking ????????????????

I never stated anything about reading SD Cards on Windows !

In Windows Disk Management can be utilized to wipe a Linux Formatted Card.

Sometimes I wish I never bother with Forums when receive this type of irrelevant response........
Pi Forum Search and Google yields answers to many questions

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26857
Joined: Sat Jul 30, 2011 7:41 pm

Re: SDCard Corruption - is it really ? - Solved

Sun Nov 10, 2013 4:47 pm

DougieLawson wrote:
MoosePi wrote:KenT I have formatted the cards in a Laptop, Tablet, Camera and External Card Reader, apologies for not making that clear.

I have binned my old external SD Card Reader as well and have given up on using any other device to format the NEW Card in the future.

It seems best to stick to one card and one card reader...................
Nonsense.

The problem with reading it on a Window laptop is that Windows can't see the ext4 partitions so it ignores them and reports just the fat32 partitions it can see. Same with a camera or tablet, they will ALWAYS ignore partitions that aren't type 0x0C.

If you want to clean an SDCard for reuse use fdisk (or cfdisk or gparted) to remove ALL partitions and rewrite the partition table with a single fat32 (type 0x0C) partition that uses all the space on the whole card.
http://www.tldp.org/HOWTO/Partition/fdi ... oning.html
Once the card has a good partition table then you need to format it as a fat32 filesystem with sudo mkfs /dev/sda.

Or on Windows use the SD Formatter program to do all of that stuff automagically.

Windows will then see the SDCard as a) empty and b) full size.
Again, please read the OP's fully before posting. This has no relevance to the OP.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

gsh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1571
Joined: Sat Sep 10, 2011 11:43 am

Re: SDCard Corruption - is it really ? - Solved

Sun Nov 10, 2013 7:26 pm

It would be interesting if you could try updating with rpi-update to see if you still find your SD cards failing after some time...

We've fixed a bunch of bugs recently and they can cause problems... The significant one was last week...

https://github.com/raspberrypi/linux/issues/413

Gordon
--
Gordon Hollingworth PhD
Raspberry Pi - Director of Software Engineering

MoosePi
Posts: 112
Joined: Wed Nov 06, 2013 4:42 pm

Re: SDCard Corruption - is it really ? - Solved

Sun Nov 10, 2013 8:12 pm

gsh wrote:It would be interesting if you could try updating with rpi-update to see if you still find your SD cards failing after some time...

We've fixed a bunch of bugs recently and they can cause problems... The significant one was last week...

https://github.com/raspberrypi/linux/issues/413

Gordon
Hi gsh yesterday morning (UK) started with the latest raw image of Raspbian Wheezy which I DD to a SD Card on a Lubuntu 13.10 x86-64 machine.

The hardware I am using is RPi (000e Q4 2012 B 2.0 512MB (Mfg by Sony))

Belkin F5U234 4Port 2.1A Powered USB Hub, which is powering the Pi via the micro-USB (no back feeding) and USB Ralink RT5370 WiFi and Bluetooth Dongle
The spare port is used for either connecting my Canon PowerSave Camera A470 Digital Camera or charging my Mobile Phone.

My Keysonic Wireless Keyboard Sender is plugged directly into the Pi....

Booted and configured, rebooted then ran apt-get update and apt-get dist-upgrade, rebooted than ran rpi-update.

Noticed another update today so ran all above again and now:

uname -a

Linux raspberrypi 3.10.18+ #587 Sun Nov 10 15:30:45 GMT 2013 armv6l GNU/Linux

/opt/vc/bin/vcgencmd version

Nov 10 2013 16:19:26
Copyright (c) 2012 Broadcom
version 96ec677b68916c87fac224a45994ad5a4da819d5 (tainted) (release)

Running at defaullt CPU / Memory settings.

Having been able to run Chromium Browser I will be able to use the Pi everyday to see if it will survive, if it does will try overclocking after a week or so.. !!

UPDATE 11/11/2013

uname -a

Linux raspberrypi 3.10.18+ #590 Mon Nov 11 21:26:42 GMT 2013 armv6l GNU/Linux

/opt/vc/bin/vcgencmd version

Nov 11 2013 21:42:37
Copyright (c) 2012 Broadcom
version b9af2b65bf40fad8c80783f770cb726586caa72d (clean) (release)


UPDATE 12/11/2013

uname -a

Linux raspberrypi 3.10.18+ #592 Tue Nov 12 23:18:39 GMT 2013 armv6l GNU/Linux

/opt/vc/bin/vcgencmd version

Nov 12 2013 23:43:03
Copyright (c) 2012 Broadcom
version 4aee5454c7955e7bc0bbb152ca4c0e26e75376e1 (clean) (release)


UPDATE 13/11/2013

uname -a

Linux raspberrypi 3.10.18+ #594 PREEMPT Wed Nov 13 17:59:34 GMT 2013 armv6l GNU/Linux
Pi Forum Search and Google yields answers to many questions

MoosePi
Posts: 112
Joined: Wed Nov 06, 2013 4:42 pm

Re: SDCard Corruption - is it really ? - Solved

Fri Nov 15, 2013 3:28 pm

OK have been using my new configuration for 6 days as a desktop PC, so have been installing / un-installing software, uploading and downloading files from both Cloud based Dropbox and QuickFile as well as printing to my HP Printer via HPLIP. Also transferring via USB, pictures from my camera.

Chromium 22 has on a couple of occasions shut down unexpectedly, but all other software has been OK ! Need to test video/music capabilities next !

Regularly have been updating Kernel / Firmware and have found no new issues with corruption, and finally today pushed the overclock to Turbo Mode. I noticed since Turbo Mode my USB Hub Power Brick was getting a little warmer, it is rated a 2.1A, swapped out for a 2.6A just to be on the safe side.

So have to admit my faith in the Pi has been restored, and will keep it as a everyday PC for a few weeks, to see whether it will survive the rigors of day-to-day use with the latest Firmware and Turbo Overclock !

Thanks to all the Developers and Forum Participants who have helped on the journey...........
Last edited by MoosePi on Fri Nov 15, 2013 10:31 pm, edited 1 time in total.
Pi Forum Search and Google yields answers to many questions

gsh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1571
Joined: Sat Sep 10, 2011 11:43 am

Re: SDCard Corruption - is it really ? - Solved

Fri Nov 15, 2013 5:17 pm

I'm keeping my fingers crossed!

So writing an SD card protocol analyser was actually a good use of my time after all...

Gorodn
--
Gordon Hollingworth PhD
Raspberry Pi - Director of Software Engineering

MoosePi
Posts: 112
Joined: Wed Nov 06, 2013 4:42 pm

Re: SDCard Corruption - is it really ? - Solved

Fri Nov 15, 2013 5:54 pm

gsh wrote:I'm keeping my fingers crossed!

So writing an SD card protocol analyser was actually a good use of my time after all...

Gorodn
Your time and effort is never wasted, though it is frustrating to be on the journey, the end results are what matter !
Pi Forum Search and Google yields answers to many questions

whoami
Posts: 64
Joined: Fri Nov 15, 2013 1:41 pm

Re: SDCard Corruption - is it really ? - Solved

Sat Nov 16, 2013 2:43 pm

I have listed a couple of configurations that have helped me get stable system: http://www.raspberrypi.org/phpBB3/viewt ... 66&t=61033

1. setup fsck + mount /boot in ro
2. mount /var/log in tmpfs using ramlog, and others in tmpfs
3. kernel config.txt settings for latest firmware

Return to “General discussion”