Page 1 of 1

Windows10 Messed up Pi Memory Card

Posted: Wed Jun 06, 2018 11:38 pm
by OldPCGuy
All I did was plug the OS flash card into a card reader attached to a Win 10 machine. I was hoping to simply pull a CSV file off the card.

Well the Windows system said there was a read error on the card so I removed it and plugged it back into the Pi.

The Pi boots to the command line but will not start (startX) to the GUI. This particular card I do not have a backup/copy. Is there a simple way to fix the card? A Pi utility that can scan and fix the card?

signed,

feeling dumb!

Re: Windows10 Messed up Pi Memory Card

Posted: Wed Jun 06, 2018 11:53 pm
by bmattila55
Put the card reader back into the computer and right click onto it in windows explorer. Select properties and then under the tools tab try the device error checking.

It may or may not work but you can only hope. Next time, if you can try loading stuff all on a Linux computer as the file system the pi uses can be read using Linux computers but not Windows.

Hope this helps.

Re: Windows10 Messed up Pi Memory Card

Posted: Thu Jun 07, 2018 11:34 am
by DougieLawson
If you allow Windows to "repair/format" a Linux filesystem it will 100% destroy it. Windows doesn't recognise ext4 (NIH syndrome) so assumes the partition is not formatted.

Re: Windows10 Messed up Pi Memory Card

Posted: Thu Jun 07, 2018 12:38 pm
by ghans
Exactly. Use Ubuntu to make a Backup with Etcher, then try to fix the filesystems with e2fsck or dosfsck. After that, eject and reinsert the card. All partitions should automatically "pop up" on Ubuntus desktop, so that you can save your files via drag-n-drop.

ghans

Re: Windows10 Messed up Pi Memory Card

Posted: Thu Jun 07, 2018 7:18 pm
by alphanumeric
If you ignore the message all should be fine. You can only access the fat partition, but no harm should be done. I do it all the time. As already mentioned, if you action that message it will mess up the card.

Re: Windows10 Messed up Pi Memory Card

Posted: Thu Jun 07, 2018 9:18 pm
by OldPCGuy
alphanumeric wrote:
Thu Jun 07, 2018 7:18 pm
If you ignore the message all should be fine. You can only access the fat partition, but no harm should be done. I do it all the time. As already mentioned, if you action that message it will mess up the card.
That's what I initially though. I ignored the message, I didn't actively initiate anything from the Win10 machine and still something corrupted the card. :(

Re: Windows10 Messed up Pi Memory Card

Posted: Thu Jun 07, 2018 9:34 pm
by pws
Curious why everyone is assuming the card wasn't corrupt PRIOR to being presented to Windows?

Re: Windows10 Messed up Pi Memory Card

Posted: Thu Jun 07, 2018 9:52 pm
by DougieLawson
pws wrote:
Thu Jun 07, 2018 9:34 pm
Curious why everyone is assuming the card wasn't corrupt PRIOR to being presented to Windows?
Because the desire of Windows to reformat ext4 filesystems is a clear and present danger and it's shot enough SDcards dead for other folks already.

Re: Windows10 Messed up Pi Memory Card

Posted: Thu Jun 07, 2018 10:01 pm
by Imperf3kt
Windows would have formatted the card, as you yourself said, but as it happens, Windows did not format the card. The pi still partially boots.

But I digress, this forum is full of Linux lovers, please, continue to place the blame on Windows with no evidence.

Re: Windows10 Messed up Pi Memory Card

Posted: Thu Jun 07, 2018 10:45 pm
by OldPCGuy
pws wrote:
Thu Jun 07, 2018 9:34 pm
Curious why everyone is assuming the card wasn't corrupt PRIOR to being presented to Windows?
I'm 99% sure it wasn't. I pulled it from a headless Pi-Zero that was running earlier in the day. I'll know for sure when see the final time/date stamp on the measurement data in the file I was looking for.

Re: Windows10 Messed up Pi Memory Card

Posted: Thu Jun 07, 2018 11:35 pm
by Imperf3kt
If it was running headless, how do you know that the desktop environment was working?

Re: Windows10 Messed up Pi Memory Card

Posted: Fri Jun 08, 2018 5:48 pm
by pws
DougieLawson wrote:
Thu Jun 07, 2018 9:52 pm
pws wrote:
Thu Jun 07, 2018 9:34 pm
Curious why everyone is assuming the card wasn't corrupt PRIOR to being presented to Windows?
Because the desire of Windows to reformat ext4 filesystems is a clear and present danger and it's shot enough SDcards dead for other folks already.
Well, that's a reasonable guess, but typically, it doesn't just do it on it's own - incorrectly responding to what it asks is the prime candidate...

My only point was regarding the very common issue as a result of too hastily pulling the power or the card.

All good...

Re: Windows10 Messed up Pi Memory Card

Posted: Fri Jun 08, 2018 10:03 pm
by DougieLawson
Typically, if you ask any computer user with a pop-up box "Are you a blithering idiot?" they will always click through it. The psychology is that they're taught to click through everything as that leads to an easier life. Whether the positive answer has drastic consequences is in the lap of the gods. When the question is meaningless or badly worded the positive response will be selected quicker.

I've seen it done with mainframe systems running a business critical workload. It's always interesting during the post-mortem investigations for those types of "finger trouble" errors.

Re: Windows10 Messed up Pi Memory Card

Posted: Sat Jun 09, 2018 10:13 am
by bensimmo
There's a difference, here.

Windows said there was errors, it didn't ask to format.
It would run its simple tests and fix the fat partition.
It wouldn't touch the other partitions.

I do it all the time.

If it couldn't read it, it asks recommends it may need formatting.

There is a difference.
Windows has done absolutely nothing to the card here.

Blame your setup and Raspbian if anything.

Re: Windows10 Messed up Pi Memory Card

Posted: Sat Jun 09, 2018 4:08 pm
by OldPCGuy
Imperf3kt wrote:
Thu Jun 07, 2018 11:35 pm
If it was running headless, how do you know that the desktop environment was working?
Not 100% but fairly sure. Before deploying I test and setup through the GUI/Desktop. Headless it only boots to the cmd line and runs the script.

As for the windows episode I only cancelled the one pop-up and pulled the card. Perhaps I screwed it up by not ejecting properly???

e2fsck didn't help. lesson learned.

Re: Windows10 Messed up Pi Memory Card

Posted: Sat Jun 09, 2018 5:43 pm
by HawaiianPi
OldPCGuy wrote:
Sat Jun 09, 2018 4:08 pm
As for the windows episode I only cancelled the one pop-up and pulled the card. Perhaps I screwed it up by not ejecting properly???
Safe ejection is only needed if the card has been written to. Since you didn't write to the card, it's unlikely. Your card may have actually been corrupt.