Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Etcher is corrupting SD and USB drives. #1426

Closed
ghost opened this issue May 14, 2017 · 79 comments
Closed

Etcher is corrupting SD and USB drives. #1426

ghost opened this issue May 14, 2017 · 79 comments
Milestone

Comments

@ghost
Copy link

ghost commented May 14, 2017

  • Etcher version: 1.0.0
  • Operating system and architecture: Arch Linux X86_64
  • Image flashed: Raspbian Lite
  • Do you see any meaningful error information in the DevTools? No

Etcher has corrupted two brand new SD cards and one USB drive. I formatted a new 64 gig SD drive to fat 32 using gparted then flashed Raspbian to the drive. I decided to use Raspbian Lite and wrote it without a reformat. The flash failed and now the drive cannot be modified, though the files can still be read. For giggles, I tried a second drive that was a new 8 gig drive. Again I formatted, flashed, it worked, reformatted, flashed again, it worked, did not format, flashed and it's corrupted like the first. I decided to try a cheap Lexar USB drive and the exact same thing happened if I try to flash twice without reformatting first.

I've tried the Linux and Windows fix suggested in the docs and it doesn't work. I tried flashing a different image, it doesn't work. I tried formatting on another PC and in windows, it doesn't work. None of my drives were bad before this, two were fresh out of the box, and one was a 5 month old USB drive. For me the issue happens like clockwork with SanDisk and Lexmark drives. I would love to provide logs, but after being disgusted with myself for choosing this program over Imagewriter that I shutdown and about threw my laptop into the road.

@lurch
Copy link
Contributor

lurch commented May 15, 2017

I'm so sorry to hear that you've had a bad experience with Etcher so far. I know it probably doesn't help you much, but I can assure you that for most users it works absolutely fine.

For the SD cards, it's always worth checking that the write-protect switch hasn't accidentally moved into the 'locked' position. What errors do you get when you try running the dd instructions from https://github.com/resin-io/etcher/blob/master/docs/USER-DOCUMENTATION.md#gnulinux ? Are you able to 'repair' your drives using the official SD Formatter tool on Windows?
Are you using an internal or an external SD card reader? (sometimes USB card readers are more reliable than internal readers)

In "normal operation" there shouldn't be any need to reformat the cards / USB drives before writing an image to them with Etcher, it should "just work" regardless of what was on the cards previously.

Are you sure your cards are "genuine", or is it possible that they're fakes that you've bought e.g. from eBay? If you want to be certain, you could try testing them with F3 (on Linux) or H2testw (on Windows).

@jviotti
Copy link
Contributor

jviotti commented May 21, 2017

Hi @MrTeofil,

It says that my card is 128 Mb instead of 14,6 Gb

That's normal. Images include their own partition table, so if the image has a partition of 128 MB, then the OS will detect its size as 128 MB.

I tried SD Formatter but it didn't work.

Did you try the Windows formatting instructions from the documentation? https://github.com/resin-io/etcher/blob/master/docs/USER-DOCUMENTATION.md#windows

@lurch
Copy link
Contributor

lurch commented May 22, 2017

@MrTeofil
If Windows is reporting the card size as 128 MB, then I suspect @jviotti 's diagnosis above is correct.

But if it's Etcher itself that's reporting the card size as 128 MB, then you may be suffering from this bug balena-io-modules/drivelist#142

(The reason for the different 'behaviour' between Windows and Etcher, is that Windows only reports the size of the first partition on a drive, whereas Etcher reports the whole size of the raw drive, regardless of what partitions are on it. This is because Windows writes to a drive at the filesystem-level, whereas Etcher writes to a drive at the lowest whole-disk / raw level)

@jviotti
Copy link
Contributor

jviotti commented May 29, 2017

No worries, glad it worked! :)

@jjh221
Copy link

jjh221 commented Apr 5, 2018

Etcher did the same thing to me today. Could not format. I put the SD card in my camera to format then could format with windows. Cheers

@Patchers
Copy link

Patchers commented Apr 8, 2018

Did it to me today. :( not happy about etcher

@Patchers
Copy link

Patchers commented Apr 8, 2018

I put the SD card into diskpart and my phone in order to fix it and nothing has worked

@maltebeckmann
Copy link

After flashing my microsd card with Etcher, it doesn't show up anymore and get very very hot. Although I just find it very hard to believe that software could break hardware.

@jhermsmeier
Copy link
Contributor

@Patchers @maltebeckmann can you tell us what OS you're on, which Etcher version you used and what image you flashed? We can't tell you much without any info :)

@maltebeckmann
Copy link

Thanks for getting back to me! Running Etcher Version 1.3.1 on OS 10.13.4. I flashed 2018-03-13-raspbian-stretch-lite onto the microSD. I did it 2-3 times over the course of an afternoon because the boot partition wasn't showing up that would allow me to set up the Raspi without an external screen. Now the card doesn't show up anymore and gets incredibly hot. I am going to buy another one tomorrow to test this.

@maltebeckmann
Copy link

So I just successfully flashed two new cards. Seems my SD card was really broken. Apologies for accusing Etcher.

@adiluxx
Copy link

adiluxx commented May 3, 2018

hi, I'm having a similar issue, I've tried flashing Chromium OS on 2 different thumb drives (1 brand new, 1 used) both have same results when I try to clean using diskpart. I had to reflash these drives because i figured i had the wrong architecture because these flashed drives couldn't boot, but was recognized by BIOS.
also, My windows 7 x64 system keeps saying the drive is 'write protected'. I did follow a thread to add in a registry edit to disable Media Write Protection
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies
Look for a key named WriteProtect.

and i tried using diskpart to clear the readOnly status on the drive,
attributes disk clear readonly

but the two methods did not work.

DISKPART> list disk

Disk ### Status Size Free Dyn Gpt


Disk 0 Online 1863 GB 0 B *
Disk 1 Online 558 GB 0 B
Disk 2 Online 14 GB 14 GB

DISKPART> select disk 2

Disk 2 is now the selected disk.

DISKPART> clean

DiskPart has encountered an error: Incorrect function.
See the System Event Log for more information.

DISKPART>

@cj2tech
Copy link

cj2tech commented Jun 12, 2018

I know it’s closed but I’ve had problem with windows 10 corrupting SD cards. I fix them with at formatted and doing a full format instead of a quick on.

@ewpratten
Copy link

I have the same problem. etcher has messed up 12 of my drives and 2 sd cards

@jhermsmeier
Copy link
Contributor

jhermsmeier commented Jul 2, 2018

@adiluxx the "DiskPart has encountered an error: Incorrect function." hints at an issue with Windows; you can try the rescan command in diskpart to refresh the state of attached storage before running other commands – if that doesn't help, there might be something wrong with the OS (i.e. corrupted components, failed chkdsk)

@franknfurther
Copy link

franknfurther commented Jul 6, 2018

I have today destroyed two sd cards using Etcher, and I used in on two different computers so I know its not caused by the hardware. I know its 'free' software, and while I am very grateful to anyone making tools like Etcher, this needs some more serious testing before being released to the world. This also applies to the Raspberry Pi foundation, whom I trusted and who recommends Etcher.

@jhermsmeier
Copy link
Contributor

jhermsmeier commented Jul 6, 2018

@franknfurther Etcher doesn't destroy any hardware, it "just" copies the disk image to whatever device you choose – if your operating system doesn't recognize any file systems on the flashed device (or fails to format it), it's still not broken. While we've occasionally seen cases where the hardware does give up; it was due to counterfeit, faulty, old hardware or malfunctioning SD-card readers / USB hubs etc.

this needs some more serious testing before being released to the world

Believe it or not, we do actually test what we make, and use it every day on countless devices – and so do a couple hundred thousand other people on this planet. Doesn't mean it's bug-free though.

@franknfurther
Copy link

franknfurther commented Jul 7, 2018 via email

@lurch
Copy link
Contributor

lurch commented Jul 7, 2018

AFAIK Etcher and Win32DiskImager essentially do more or less the same thing (they just use different technologies internally, and Etcher obviously has a much nicer UI) - so I suspect any cards that got "broken" by Etcher would also get "broken" by Win32DiskImager, and any cards that "work" with Win32DiskImager would also "work" with Etcher.
Although I'm sure @jhermsmeier would be very interested to hear if you had a reproducible test case...

@franknfurther
Copy link

I agree, two corrupted sd cards in one day do not make a large enough sample to blame Etcher. I am out of SD cards now but will definitely use Etcher again next time and let you know if it doesn't work. Hardware is about 1-3 years old, we are talking Intel and Lenovo PCs so that should be ok. But I might need some advise regarding which SD card brands are ok and which ones are not.

@adiluxx
Copy link

adiluxx commented Jul 8, 2018 via email

@lurch
Copy link
Contributor

lurch commented Jul 9, 2018

system tells me that the drive is busy and can't clean the drive.

See also #1793 and #1991

@amquei
Copy link

amquei commented Dec 7, 2018

I think thal I solved the problem using GPARTED and creating a new partition table (msdos) on the my pendrive several times and then I formatted the pendrive using the software called DISKS - gnome-disk-utility 3.18.3.1 on Ubuntu.

@lurch
Copy link
Contributor

lurch commented Dec 27, 2018

Interesting to see that authors of other disk-writing software also get just as many unsubstantiated complaints about the software "breaking" their drives pbatard/rufus#313
🙄

@kureci
Copy link

kureci commented Dec 27, 2018

@lurch interesting choice of words there.. "unsubstantiated" complaints? I bet you think complainers here are conspiring to complain about all such software. Dude, if you're a contributor and not willing to see what could be causing this, at least don't just talk nonsense. What "substantial" evidence do you need to believe that this software has corrupted so many sd cards? Send me your address and I'll post my two 32gb U-class high quality microSD cards that have been corrupted by Etcher. If you manage to fix them then they're yours to keep.

@thundron
Copy link
Contributor

@kureci What do you mean by "corrupted"? What's the issue you're having with them? Do you have any logs? Did you try solutions provided for different OSes here as well as reading through the whole document to verify you're not in one of those cases?

I hope you can now easily see why @lurch referred to these as "unsubstantiated complaints" and I'd advise you to read this issue as well (the last 3 comments in particular) that might enlighten many aspects of users that got corrupted sd cards "by Etcher".

@kureci
Copy link

kureci commented Dec 28, 2018

@thundron if you go back in comments you can see that I've tried a few things, tried to put relevant bits of information regarding what the output is.. etc.

I won't be using Etcher again, and not because it has issues (even if minor), but because its developers seem to be denouncing any kind of claim that Etcher is causing SD card corruption. Everywhere I read comments from its promoters, the first thing they do is deny Etcher having anything to do with it, rather than listen and perhaps think of any possibility. Because clearly Etcher isn't just a UI on top of simple commands like dd on Unix, because I have used the dd command on the same machine numerous times in the past, with no significant issues.

Almost everyone who replies to these complains says "Oh Etcher is being used by thousands of people, if a few people are having issues with it then it's not Etcher" - seriously? OK, you can say it works 99% of the times, but at least be accepting enough to just consider the 1%

Anyway I'm not expecting to really have any useful output from this issue or the conversation. If I do get any spare time I suppose I could check the source and see if I can spot anything, otherwise I'll just not touch it again.

@kureci
Copy link

kureci commented Dec 28, 2018

Oh and, I've read a few comments from promoters/developers claiming that software cannot possibly "break" hardware - they probably think of the word break as some sort of smashing the cards into pieces or something.. goes to show how open-minded they are to accepting that software could be "damaging" the hardware not in a physical way, but in a way that makes other software impossible to write to it. Hardware isn't damaged as per se, but these SD cards aren't to be opened up and their circuits manipulated by hand to check that all parts are in place and that Etcher hasn't moved any parts!

@thundron
Copy link
Contributor

thundron commented Dec 28, 2018

It's also not too hard to understand that byte-to-byte flashing, which relies on the OS, cannot in any way "break", "damage", "corrupt" or do any harm in general to the flashed target, unless:

  • the OS does something wrong
  • the reader is faulty
  • the target is faulty
  • the source possibly does something when it runs in the flashed target (I dunno, a virus, a meteorite written in an image, ...)

Which isn't even that rare, if you read the last 3 comments of the issue I linked just to give you an example:

For example, a bunch of the negative reviews from around 2014 for this 8GB Kingston MicroSD card received the following response:

[...] We apologize for the issue experienced with the microSDHC cards. We stand by all our products and can replace those cards under their lifetime warranty. If they were used in Android 4.0 or later devices, the issue may be related to a problem that was discovered last year that caused the cards to become corrupt and then undetectable in any device. This issue was resolved August 2013 but it is possible you may have received cards that were manufacturer prior to that time. [...]

And all of the reasoning above is exactly why, at some point, we're almost forced to just say "Etcher cannot corrupt sdcards": because the external factors are so many and because flashing byte-to-byte does absolutely no harm and we cannot fix external issues. If the user doesn't have a clue about them, we can only suggest to look into this or that (and as you see in this issue for example, we always do), but other than that, it's phisically out of our range.

I saw you were looking into your Asus Tinkerboard but didn't mention anything else, so I hope you'll get back to it and tell us if you had any luck with it or even recovering the sdcard with another OS (I'd usually suggest Linux, but again there are other ways to do it which you can find in the User documentation)

@ShiftLeftLogical
Copy link

ShiftLeftLogical commented Dec 29, 2018

I keep getting comments in my inbox and largely ignored them regarding this issue as I stopped using this tool as all I can say for certain:

  1. I have never had an issue with Win32DiskImager which I believe was the recommended way to flash from windows for raspbian, in times past.
  2. Etcher has worked fine for a 4 of 6 cards.
  3. Etcher failed two cards in a row (5/6 and 6/6) using the same card reader, different host machine (USB HW), and the cards were completely different brands. The odds are small but I the more probabilistic answer is that I got two bad SD cards, if I had more to waste I would have formatted via dd or Win32DiskImager, verified, then reformatted with Etcher. Because I do not want to risk a third card I am not going to sling mud in one direction but what I do wish is that there was some logging past what I could find in the windows logs that could help in diagnosing the issue, I don't use windows often so maybe I missed where the logs pertaining to disk imaging is located but from what I found, the OS logs contained minimal information at best. I understand the frustration on both sides but as a developer for both private and open source software I guess I would provide diagnostics, even if just gathering existing logs such that I could better understand the true occurrence of the problem (opt. in reporting) and compare that to the statistical likelihood of a bad SD card per vendor, some card writers vid:pid tending to have HW/driver issues, etc. ... it would quash any doubts I had about my software and at least allow for me to point to the gathered statistics as reasonable evidence that it truly is just the odds of getting a bad card or problematic writers.

I guess why I care is because I want to side with the contributors but having this happen to me and the odds being so small that it was two new cards in a row along with the fact that the tool is promoted over the older methods right on the raspbian website the general response seems dismissive, maybe understandably so but can a dev at least answer this:

  1. Is there any more diagnostic information that could be coalesced?
  2. Has an opt in feature to check the relevant HW and OS version for reporting purposes been proposed or implemented and I just did not read closely enough? Would this be considered?

Edit: I did not consider the case of an extension cable and USB 3.0, I am not certain I used 3.0 in the case that Etcher did work but I am certain I used 3.0 ports in the case where it did not. This says nothing definitive but should be noted.

@lurch
Copy link
Contributor

lurch commented Dec 29, 2018

Is there any more diagnostic information that could be coalesced?

Yes, see https://raw.githubusercontent.com/balena-io/etcher/master/.github/ISSUE_TEMPLATE.md for how to access Etcher's logs.

some card writers vid:pid tending to have HW/driver issues

With the cards that have hacked firmware to report fake capacity, I guess they'd have no problem reporting a fake vid:pid too?

EDIT: Could you clarify what you mean by "Etcher failed two cards" ?

@techsolveprac
Copy link

Your flash drive can be recovered, read here --> https://www.techsolveprac.com/repair-flash-drive/

@kipoph
Copy link

kipoph commented Sep 26, 2019

I had this problem with a very stubborn corrupted USB flash drive I tried every solution in windows and nothing worked (literally spent a few hours trying online solutions).
Finally found a fix!
Put it in a Linux virtual machine reformated and stuck some stuff on it and even windows can read it now!

@techsolveprac
Copy link

@kipoph Check this: - > #1426 (comment)

@hjaspe
Copy link

hjaspe commented Oct 10, 2019

This recipe save my pendriver:
1.- Use Linux, fdisk /dev/xxx and drop all partitions
2.- Execute dd if=/dev/zero of=/dev/XXX count=1 bs=4096, where XXX is your especific device
3.- Format with Windows or Linux

@stephenpfaff
Copy link

stephenpfaff commented Dec 2, 2019

Ran into this issue with using etcher to burn a linux image to SD card on OSX using Etcher. The issue wasn't that the SD card became corrupt rather OSX claimed it was corrupt because it knows the physical disk size exceeds the visible total combined partitions. Opening terminal and running diskutil list will output the SD card partition map where you will see the missing disk space under a linux partition type which does not appear visible to OSX or Windows disk utilities.

To fix the issue you want to clear off that linux partition which can also be done within OSX terminal using diskutil...

  • diskutil list (note/copy the linux partition name on your drive)
  • sudo diskutil eraseVolume free none /dev/name (replace name with one copied on prior step i.e. /dev/disk3s1)
  • repeat step 2 for any other partitions
  • ????
  • Full SD disk should be recovered and available for use now.

@gabrielsaviank
Copy link

I created a bootable Ubuntu USB on Etcher and corrupted my USB stick, I can't format it, I tried on my mac and on linux and couldn't format it.
The error I get on mac is " The operation couldn't be completed. Permission denied"

@thundron
Copy link
Contributor

@gabrielsaviank have you tried re-running the tools you used with sudo? That's more likely the reason you saw the message

@mikemonagle
Copy link

mikemonagle commented Feb 9, 2021

After successfully flashing a micro SD card with Etcher, my entire card reader is no longer recognized by the OS (Windows 7). How is this even possible? This is a card reader/write that's part of the computer. Used to show up as four empty drives when there were no cards in it. Now it doesn't show up at all.

@kureci
Copy link

kureci commented Feb 9, 2021

Ran into this issue with using etcher to burn a linux image to SD card on OSX using Etcher. The issue wasn't that the SD card became corrupt rather OSX claimed it was corrupt because it knows the physical disk size exceeds the visible total combined partitions. Opening terminal and running diskutil list will output the SD card partition map where you will see the missing disk space under a linux partition type which does not appear visible to OSX or Windows disk utilities.

To fix the issue you want to clear off that linux partition which can also be done within OSX terminal using diskutil...

  • diskutil list (note/copy the linux partition name on your drive)
  • sudo diskutil eraseVolume free none /dev/name (replace name with one copied on prior step i.e. /dev/disk3s1)
  • repeat step 2 for any other partitions
  • ????
  • Full SD disk should be recovered and available for use now.

Can you clarify what "???" is in step 4 please?

@ovictorjo
Copy link

Etcher is corrupting SD and USB drives. Why?

@kureci
Copy link

kureci commented Feb 9, 2021

Etcher is corrupting SD and USB drives. Why?

Contributors will tell you it's all your fault, Etcher has nothing to do with it. BS!
I havent used Etcher since my last corruption. Just use your terminal commands and you should be good. I'm surprised Etcher is even suggested as a tool by the Linux websites.

@mikemonagle
Copy link

Etcher is corrupting SD and USB drives. Why?

Contributors will tell you it's all your fault, Etcher has nothing to do with it. BS!
I havent used Etcher since my last corruption. Just use your terminal commands and you should be good. I'm surprised Etcher is even suggested as a tool by the Linux websites.

In my case it was recommended by this book, "Make: Jumpstarting the Raspberry Pi Zero W". My first and last time using Etcher.

@gabrielsaviank
Copy link

To fix mine I did the following:
I tried to format on Linux and Mac using loads of ways and none worked. Then I tried to format on windows (I can't remember the format that I used) and later I formatted on my mac again using exFAT (if I remember correctly) and worked like a charm.
Plus: I formatted using the tools, both on mac and windows.
Not the definitive guide, but could work for people who are having issues on UNIX systems.

@k2xl
Copy link

k2xl commented Feb 25, 2021

So I believe this may of just happened to me too.

Tried to flash Hassio using Balena Etcher... And at the end it said checksums didn't match. Then I noticed I couldn't get any file changes to the sdcard to stay permanent. Went and bought a new sd card and the exact same thing happened. Seems like it gets into write protected mode somehow

@kureci
Copy link

kureci commented Feb 25, 2021

So I believe this may of just happened to me too.

Tried to flash Hassio using Balena Etcher... And at the end it said checksums didn't match. Then I noticed I couldn't get any file changes to the sdcard to stay permanent. Went and bought a new sd card and the exact same thing happened. Seems like it gets into write protected mode somehow

@k2xl no, it had nothing to do with Etcher. Maybe the temperature at your location, or your cat meowing at the wrong moment, whatever it may have been, it was NOT Etcher.. the contributors will tell you.

Sorry mate, your SD cards are most likely gone forever.

@balena-io balena-io locked as too heated and limited conversation to collaborators Mar 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests