RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Damaged MicroSD FS - want to pull just arcade data off

    Scheduled Pinned Locked Moved Help and Support
    troubleshootingrestoredirectorynames
    9 Posts 4 Posters 746 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • TangoT
      Tango
      last edited by

      I have a damaged MicroSD card with a RetroPie system on it. I'm not sure how damaged it is yet. I do know that, on my iMac, I can read /boot on the card. I'm setting up a Debian VM so I can see what other partitions I can read.

      Assuming the partitions are either readable or restorable, what directories do I need to copy to read all the RetroPie arcade data (like controller devices, settings, screenshots, and so on) onto another medium so I can restore them to a new RetroPie install? (The ROMs are on a separate USB drive.)

      simpleethatS 1 Reply Last reply Reply Quote 0
      • simpleethatS
        simpleethat @Tango
        last edited by simpleethat

        @Tango I know you'll definitely want the configs and BIOS folders. I can't remember the full paths right now and won't be able to gather that info for you for a day or so but they shouldn't be that hard to find. You're gamelist.xml files and the boxart/videos etc should be in the folders with the ROMs or in the configs folder.

        Also, if you're running the ROMs from a USB you can also run those folders from the USB as well.

        And... just out of curiosity is that physically damaged or a corrupted card?

        TangoT 1 Reply Last reply Reply Quote 0
        • TangoT
          Tango @simpleethat
          last edited by

          @simpleethat I didn't want to go into all the details, but I got whomped with two bad events. The first is that I've just changed the backup on my LAN to a new RAID. (So cool - I have an extra drive for it and if one fails, I hot swap it and send the old one in and they send me a replacement for free!) I've updated my desktop system and servers and my wife's desktop, but was so busy with the new setup on the arcade system I thought I had changed the rsync command on it, but had not! (Embarrassing - since I am quite serious about backups!)

          The other is that we had a planned power outage. Our house is new (3 years old) and I got a standby generator installed. The electrician was given strict instructions on which rooms were to be included on the panel that the generator was connected to. He tested it and even told me I did what he said - but he did not! This is our first outage (believe it or not!) and that's when I found out he did NOT provide generator power to my study or the room with the arcade machine.

          So the arcade machine would have had a clean "power off" from the power company and the same when power came back on. It shouldn't have gone off at all for it!

          That makes me think something got damaged when power went out or came back on.

          1 Reply Last reply Reply Quote 0
          • mituM
            mitu Global Moderator
            last edited by

            On macOS, you can install ext4fuse (easy if you have brew installed) and read the ext4 partition from the sdcard without a VM.
            You basically need to backup the /opt/retropie/configs folder, this is where configurations and user data (screenshots, Retroarch presets/overrides/remaps) are stored. You can copy them back on a new installation by copying to the corresponding folder in \\retropie\configs.

            You should try to also get the BIOS folder from /home/pi/RetroPie, if your BIOS folder is not networked.

            TangoT 1 Reply Last reply Reply Quote 0
            • TangoT
              Tango @mitu
              last edited by

              @mitu Okay, it's installed, but macOS is still not recognizing the other partition(s) on the card - and I've tried it with the one I know works (MCB) and the one I'm not sure of (MCA).

              I'll take that up with the Homebrew forum.

              Thanks.

              mituM 1 Reply Last reply Reply Quote 0
              • mituM
                mitu Global Moderator @Tango
                last edited by mitu

                @Tango If it's not recognizing the partition, then the filesystem may be damaged cannot be read correctly.

                You can try using something like gparted to recover the partition, unfortunately gparted is only available on Linux. There are a few live CD/USB distros (like SystemRescue) which include gparted and you can try one to scan and recover the Linux ext4 partition.

                TangoT 1 Reply Last reply Reply Quote 0
                • TangoT
                  Tango @mitu
                  last edited by

                  @mitu I got it working - needed osxfuse as well and it didn't automount, which I expected. So I can read the partition on my Mac now. I'm backing up the whole thing, since I'm sure there are other config files I forgot I modified in the /home/* tree and so I don't have to go back and set up things like Samba and SSH in /etc.

                  I have a system I bought a month or so ago that will soon be in my shop as a CNC controller, when it gets set up. There's been no hurry to get it working, but I will probably go on and set up Debian on that system tonight or tomorrow so I can use parted or gparted to see what I can do. Since I can read the partition and files on my Mac, I suspect the partition is not badly damaged.

                  On that note, even if it were, it seems odd to me that the boot partition is easily readable and my Pi just wouldn't boot. There wasn't even a flickering LED to show it was even trying to read the MicroSD card.

                  I may just wipe and reinstall, then use diff to find what config files I changed and copy those files over to the new, clean, supposedly working partitions.

                  1 Reply Last reply Reply Quote 0
                  • LolonoisL
                    Lolonois
                    last edited by

                    @Tango you may also consider Testdisk. It did help me even in case of a damaged partition table.

                    IIRC it is also on the Systemrescue CD @mitu mentioned before.

                    Personally I would ditch this SD card and do not reuse it, it may have got damaged by a previous physical torque or by undervoltage (the "infamous" yellow lightning bolt).

                    HTH

                    1 Reply Last reply Reply Quote 0
                    • TangoT
                      Tango
                      last edited by

                      Everything seems okay now. I had a Linux system I needed to set up. (Others were in use and I couldn't easily use them for this.) I got it up, added GPartEd (which, interestingly, did not include GPart as a dependency) and read the card from there. GPartEd could not find anything wrong with the partitions on the card, but after I used it to read and very, the card worked when I put it in the Pi!

                      I didn't write anything to this device, in Mac or Linux, so my guess is that GPart or GPartEd did something while just reading. Maybe it had trouble with a few bytes or when it wrote a date, it updated something else. I don't know, but just reading it and having GPart look at it was enough that the card started working when I tested it.

                      It's worth noting that when I booted it with my Pi, the system did have issues with partitions and scanned them, but found no errors.

                      I'll be taking it down and testing it in the arcade setup this evening.

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post

                      Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

                      Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.