Corrupted SD card

General GBZ-related chat goes here. Share ideas, tips and tricks, or ask questions that don't fit into the hardware/software help forums.
jhillman
Posts: 10
Joined: Sat Oct 08, 2016 1:23 pm
Has thanked: 4 times

Corrupted SD card

Post by jhillman » Sat Oct 15, 2016 3:22 pm

I've been trying to get my USB hub working without any luck (no USB device is recognized when the hub is wired to the Pi). Without a way to safely shut the Pi down, I think I have corrupted the data on the SD card at least a few times. I have been reflashing RetroPie with Apple Pi Baker, but that has stopped working. Now, even with a completely clean copy of RetroPie, it will not boot. Is it possible that the physical card has been damaged by something I have done? I have another 32GB card (the one that was booting successfully before is an 8GB card), but it has never booted (I just get the rainbow square when the Pi turns on).

This is the error with the possibly damaged 8GB card:
IMG_20161015_151025.jpg
Pi error message
IMG_20161015_151025.jpg (3.48 MiB) Viewed 9663 times
Any ideas?

Additionally, I am completely stumped about what to do with the USB hub. I am using the same one wermy uses in the guide, and he makes it look so easy. I cut the port off the end, desoldered two of the other ports, and wired it directly to the Pi to test it. When it is wired to the Pi, no USB device is recognized whether it is plugged into the hub or the micro USB port on the Pi itself. I thought that I had possibly damaged the hub when removing the ports, so I bought another one, tested it and verified that it worked, and wired it to the Pi without removing any ports. Same problem. Did I miss a step with setting this up correctly? I have checked and double-checked my wiring and it appears to match what wermy has in the guide. I can't really do anything at all without being able to get the Pi to boot, so the other problem will need to be solved first, I guess.

Any help with either of these issues would be much appreciated.

Thanks!

halleyscomet
Posts: 7
Joined: Sun Sep 18, 2016 4:01 am
Been thanked: 1 time

Re: Corrupted SD card

Post by halleyscomet » Sat Oct 15, 2016 10:18 pm

examine the sd card in your home OS as is.

How much file space is available?

Raspbian and the like are gnu/linux, and they use different file systems than windows or osx. Sometimes windows and osx try to format the card, but can't tell there is a HUGE linux partition on it, and then format around the edges.

If you have access to a linux distro (ubuntu live usb for example) try formatting it in gparted.

Zero
Posts: 157
Joined: Fri Sep 02, 2016 6:32 pm
Location: Bristol, UK
Has thanked: 11 times
Been thanked: 35 times

Re: Corrupted SD card

Post by Zero » Sun Oct 16, 2016 3:30 am

Make a fresh install as it does sound corrupt and add your USB hub using an otg cable (or one you made yourself).

http://tech.firstpost.com/news-analysis ... 29503.html

Keeping regular image backups when changing key settings is a good idea too. Dead easy with Win32 disk imager.

https://thepihut.com/blogs/raspberry-pi ... is-sd-card

If you don't have much storage space you can zip or rar them into much smaller sizes.

jhillman
Posts: 10
Joined: Sat Oct 08, 2016 1:23 pm
Has thanked: 4 times

Re: Corrupted SD card

Post by jhillman » Sun Oct 16, 2016 10:42 am

When plugged into my laptop, the card was showing that it only had something like 50MB available, so I completely erased it using MacOS Disk Utility. When I reflashed RetroPie, it appeared to be doing better at first but there were a lot of "Failed" messages. It didn't successfully boot. I started over and wiped it clean again and now it is back to the same error shown in my original post. I may need to try to do this on another machine; I may try to get Ubuntu booting from USB or something.

I don't understand the comment from Zero about adding my USB hub using a OTG cable. I have an OTG cable that I have been using to test USB devices that I plug into the Pi, but is there something else I am supposed to do? I am following wermy's guide as closely as I can, and he doesn't use an OTG cable.

Update:
I formatted the card using GParted on Ubuntu, and even then with a completely clean install of RetroPie, I get the same Kernel panic error shown in my original post. I'm stumped. It looks like I may need a new SD card or possibly a new Pi Zero.

Zero
Posts: 157
Joined: Fri Sep 02, 2016 6:32 pm
Location: Bristol, UK
Has thanked: 11 times
Been thanked: 35 times

Re: Corrupted SD card

Post by Zero » Sun Oct 16, 2016 12:46 pm

Well try with a normal usb cable then. If it's not working with either then there's something physically wrong with your hub. Is it powered via the pi or an external source?

As for only 50mb or so showing up on your card, that's because when you flash an image it creates two partitions and the second is usually one not supported by Windows or iOS without installing extra drivers, so only the boot partition shows up.

If you used this to format the card:
https://www.sdcard.org/downloads/formatter_4/

And this to write the image:
http://www.tweaking4all.com/hardware/ra ... -pi-baker/

...and you're still getting corrupt data, your card is ready for the trash bin. Buy a proper branded replacement card from a reputable dealer.

jhillman
Posts: 10
Joined: Sat Oct 08, 2016 1:23 pm
Has thanked: 4 times

Re: Corrupted SD card

Post by jhillman » Sun Oct 16, 2016 7:56 pm

Looks like the card is toast. I did an "Overwrite Format" of my card, which took quite a while, and then, using Apple Pie Baker, I prepped the card for NOOBS and then flashed the RetroPie image to the card. Same error.

I don't have the hub wired to the pi anymore, but when I did, I was powering it with the pi from PP1 and PP5. I had the green and white wires wired to PP22 and PP23, respectively. I have a USB NES controller that I would then plug into either the hub directly or into the pi itself using the OTG adapter. Either way, the emulation station calibration screen wouldn't respond when I pressed buttons on the controller. Before I wired up the USB hub (before the problems with my SD card started), the controller worked just fine through the OTG adapter plugged into the pi.

New cards are scheduled to arrive on Friday. When I get them, if I have the same problems with the hub, is there a way to safely shut the pi down without being able to connect a keyboard? I'd like to avoid this situation again, if I can.

Zero
Posts: 157
Joined: Fri Sep 02, 2016 6:32 pm
Location: Bristol, UK
Has thanked: 11 times
Been thanked: 35 times

Re: Corrupted SD card

Post by Zero » Mon Oct 17, 2016 3:33 am

I suggest you get the pi running nice and stable first before worrying about the hub, so when you get your new card, flash it using the official sd card association format utility then write the img file using Pie Baker. Then you can move on from there knowing that's not causing any issues.

As for shutting down safely, well, if you don't have a keyboard attached then you'd need a usb wifi dongle and to ssh in, then you can use the command:
sudo shutdown now

After it's finished the shutdown sequence it's then safe to turn off.

But as there's the usb issues they need to get sorted beforehand. :lol:

I suggest you remove all the stuff you've done to the pi previously, and triple check all solder connections, making sure nothing is bridged, no extra solder, a clean board. Then connect an hdmi screen and usb keyboard. If the keyboard doesn't work at all, then try a non otg cable. If it works fine, you can move on to the hub issue. Connect your hub to your Mac. Check every port of the hub using something like a usb flash stick in each port. If it detects it in each port, then there's nothing wrong with the hub and you can connect it to your pi. If it doesn't work in the pi now, then you are using the wrong usb cable to connect it. Read the link I posted above about otg cables.

jhillman
Posts: 10
Joined: Sat Oct 08, 2016 1:23 pm
Has thanked: 4 times

Re: Corrupted SD card

Post by jhillman » Mon Oct 17, 2016 8:49 pm

It looks like the issues with the SD card were a red herring all along. I received a new Pi Zero in the mail today, so out of curiosity I put my "bad" card in it, connected it to a monitor and power and it booted right up. Zero's advice in his last post was to remove all solder joints from the Pi and make sure it is clean when I test new cards. All this time, I had my SD card cartridge reader wired up, and I had alternated between putting the card in the cartridge and directly in the Pi. If I remove the cartridge and put the card directly in the Pi, it works just fine. I'm not sure what this means. I don't see any problems with my solder joints on the Pi or on the pins on the cartridge slot, and I doubt the problem is with the cartridge itself since I am using PRS-TECH's pcb with the built-in slot and filtering.

Whether the SD card is in it or not, if the cartridge is connected to the Pi, it won't boot. Any advice on how to troubleshoot this? When I get a minute (I'm out of time tonight), I'll check continuity on the wiring with my multimeter. Not sure what to do next.

Zero
Posts: 157
Joined: Fri Sep 02, 2016 6:32 pm
Location: Bristol, UK
Has thanked: 11 times
Been thanked: 35 times

Re: Corrupted SD card

Post by Zero » Tue Oct 18, 2016 2:46 am

Could only go by the info you gave and you left out a lot. Not sure why you didn't mention before that you had modified the sd card slot, when you've been saying your card was corrupted. :roll: Oh well I tried.

jhillman
Posts: 10
Joined: Sat Oct 08, 2016 1:23 pm
Has thanked: 4 times

Re: Corrupted SD card

Post by jhillman » Tue Oct 18, 2016 7:32 am

Thanks for your time, Zero. My lack of experience is really showing now. I guess I assumed that because I said I was following wermy's guide to the letter that it would be known that I had wired into the SD card slot. It is clear to me now that concluding that something was wrong with the card was a ridiculous leap to make when there were so many other variables in the equation. I'm sorry I wasted your time.

That said, I'm still stuck, though in a different way. I'll spend some more time seeing if I can find a problem with my wiring, but if I don't make any progress I'll start a new thread since this one has been resolved.

Thanks again.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest