Corrupt SD Card – what to do with it?

Home Forums RetroPie Project New to RetroPie? Start Here! Corrupt SD Card – what to do with it?

RetroPie has a new website and forum. Please visit https://retropie.org.uk/ for the new site. The new forum is located at https://retropie.org.uk/forum/. This forum is left here as a read-only archive.

This topic contains 11 replies, has 5 voices, and was last updated by Profile photo of mikeveli20 mikeveli20 1 year, 3 months ago.

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #114949
    Profile photo of mikeveli20
    mikeveli20
    Participant

    The file system became corrupt on my SD Card and the pi won’t boot, even after fsck. It’s not that big a deal as I have a backup image of the card that I can use. My question has more to do with the card itself. Can it be re-used if I reformat it, or is it permanently damaged? Just wondering if I need to use a different card or not.

    #115017
    Profile photo of labelwhore
    labelwhore
    Participant

    Probably not. I’ve killed a couple 64 gb cards, sadly.

    Idk what your setup is like, but it’s important to always shut down the pi properly. For me, that means a button that triggers a shutdown command was a must. Otherwise, always use the power options from the menu in ES before you cut power to the PI. Never unplug the pi while it’s running. And although tempting, you should never use the reset pins for a reset switch, this is how I killed both the 64 GB cards that I mentioned. Use a button that triggers a proper ‘sudo reboot’ message, and only use the reset pins as a last resort.

    Just general advice, idk if you violated any of that. 😉

    http://www.th3rdwave.com/tracks/
    ^^ my other hobby

    • This reply was modified 1 year, 3 months ago by Profile photo of labelwhore labelwhore.
    #115020
    Profile photo of herbfargus
    herbfargus
    Moderator

    You can try and reformat it or write a new image to it but if it doesn’t work you may just be at a loss. Happened with one of my 64GB cards.

    #115022
    Profile photo of mikeveli20
    mikeveli20
    Participant

    In regards to my setup, I don’t have a power switch that shuts down the Pi, but I always shut it down by selecting ‘Shutdown’ in the ES menu. The Pi is plugged into a power bar as the only device, and I turn the power bar off after the Pi has finished its shutdown sequence. Then I just flip the power bar switch back on when I want to turn the Pi on again. There were a few instances however where the Pi froze where I wasn’t even able to SSH into it in order to execute a proper shutdown sequence so I was forced to flip the power switch. I’m guessing this is what caused it, but I don’t know of any other way to safely turn it off when this occurs as I don’t have a reset switch hooked up. Any other suggestions for a safe shutdown in this circumstances?

    In regards to the currently corrupted SD card, is there any software (preferably on a mac) that I can use to check the integrity of the SD card after re-formatting, kind of like what you would do on a hard drive when checking for bad sectors?

    #115024
    Profile photo of InsecureSpike
    InsecureSpike
    Participant

    how are you writing the image to the sd card?
    you’ll kinda know if you can re use it if yer Mac sees the sd card when you plug it in, if when you plug it in and it don’t see it it’s dead for good,

    and if it does see it can you not use the disk utility app to verify it?

    oh this also could do with your card make & type too!!

    • This reply was modified 1 year, 3 months ago by Profile photo of InsecureSpike InsecureSpike.
    #115027
    Profile photo of mikeveli20
    mikeveli20
    Participant

    I’m using dd in terminal to write the image and my SD card is a Samsung EVO+ 64GB. I can see the card on the mac and I wiped the partitions so it’s now empty. I found a program called f3 which supposedly checks the integrity of SD cards by writing data across the entire card and then attempting to read that data back. If those tests come back without errors I’ll probably then run it through First Aid in Disk Utility just for a sanity check.

    I’ve been doing a bit of reading regarding the Pi and preventing SD card corruption and the most popular method seems to be using a read-only file system. Not really sure how this would work with RetroPie since it needs to write save game data and possibly other stuff too. Would it be possible to set up a 3rd partition that is used for writing the save game data and set the boot and retropie partitions to read-only? Once all the roms and what not have been copied over of course.

    #115031
    Profile photo of InsecureSpike
    InsecureSpike
    Participant

    I would suggest using a great little app called ApplePi Baker

    MacOS X – ApplePi Baker – Prep SD-Cards for IMG or NOOBS

    and a sd card comparability list here:
    although not sure how upto date this is

    http://elinux.org/RPi_SD_cards

    #115032
    Profile photo of jeffdamann
    jeffdamann
    Participant

    I don’t know if thats the cause guys. I know people say it is, but I swear I have probably pulled the plug on my pi during operation literally over 100 times now, and the card is perfectly fine. Keep in mind Ive done this over a period of less than a month.

    It just makes me wonder, maybe operating it this way it will become inevitable, but Ive had 0 problems.

    #115040
    Profile photo of labelwhore
    labelwhore
    Participant

    I definitely killed both my sd cards by pulling the plug. It happens if the card is being written to when it loses power. The symptom is that the cards always say they’re write protected after that, no matter what you do.

    http://www.th3rdwave.com/tracks/
    ^^ my other hobby

    #115047
    Profile photo of jeffdamann
    jeffdamann
    Participant

    Ahh I usually pull the plug when freezing, during gameplay on a rom, or while sitting on the ES screen.

    Thanks for the info.

    #115050
    Profile photo of labelwhore
    labelwhore
    Participant

    That’s the thing, stuff could be being written to temp space on the card, or even error messages being written to runcommand.log. I didn’t think mine was writing to the card when I pulled the plug either.

    There are a bunch of tutorials on how to make a button to shutdown/reboot the pi. You only need a couple of components, usually a resistor or two (about 220 ohms will work) and a momentary on switch. Here’s one such tutorial:

    http://www.instructables.com/id/Simple-Raspberry-Pi-Shutdown-Button/

    http://www.th3rdwave.com/tracks/
    ^^ my other hobby

    • This reply was modified 1 year, 3 months ago by Profile photo of labelwhore labelwhore.
    #115066
    Profile photo of mikeveli20
    mikeveli20
    Participant

    This is why I’d like to attempt to create the boot and main RetroPie partitions as read-only to avoid any chance of anything being written to them. Then have a 3rd partition that is used for writes (configs, save games, etc.) Just not sure how to go about configuring this for RetroPie. I’ve seen some very good guides (here and here) on how to do this for the Pi in general, but nothing specific to RetroPie. I’m sure most of the concepts would carry over but there may be some things that need to be altered.

    I checked out the program that InsecureSpike linked to and while good for creating/backing up Pi images, I don’t see a way to set up the 3rd partition. The only way I’ve found is from one of the guides above, but again not sure how this works with RetroPie.

Viewing 12 posts - 1 through 12 (of 12 total)

Forums are currently read only - please visit the new RetroPie forums at https://retropie.org.uk/forums/

Skip to toolbar