question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error couldn't clean the drive...

See original GitHub issue
  • **Etcher version:**1.2.1
  • Operating system and architecture: Windows 10 Home v. 1703, built-in SD card reader (Samsung 32 GB micro SD card in adapter)
  • Image #flashed: Retropie 4.3
  • Do you see any meaningful error information in the DevTools? Yes, although I’m not sure what it means.

I am trying to install the retropie onto my SD card, however Etcher keeps hanging on “starting” for a few seconds then erroring out (see below). So far I have tried to reinstall Etcher a couple times, tried to run Etcher as both administrator (I get the error) and not as the administrator (just hangs on “starting”). I tried cleaning the SD card with diskpart, however I keep getting this error. I can manually copy files onto the SD card from within windows, so the SD card isn’t locked out.

Any advice that can be offered would be greatly appreciated.

Thank you.

Windows Error Message:

image

Etcher DevTools

image

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:27 (11 by maintainers)

github_iconTop GitHub Comments

56reactions
MakiseKurisucommented, Sep 15, 2018

Here is a workaround (for me at least) for “cannot zero sectors on disk” with error code 5@0101000F. All is done through diskpart so Etcher can incorporate this with your own diskpart script:

list disk #find out which disk you want to wipe
clean #throw out error, just a confirmation step but I always do this before applying workaround
convert gpt #disk in question is in MBR. I only burnt MBR image so I don't have a case where disk is in GPT
clean #this time you should be able to wipe the disk

No reboot or unplug reqiured. By doing this Etcher will be able to clean the disk again and complete the burning process.

1reaction
HennieLouwcommented, May 17, 2018

Hi All, Small thing, but I also get the "couldn’t clean the drive’ error.

Then I created a new local account with a username that has no spaces in it. Works like a charm.

I suspect that the ‘diskpart’ operation isn’t escaping spaces in the path. I’m not able to test it now, but perhaps a small tweak to the line https://github.com/resin-io/etcher/blob/93b772f1976d5f7989d900d6fdcf9f9c84759694/lib/cli/diskpart.js#L72

childProcess.exec(diskpart /s "${filename}", (execError, stdout, stderr) =>’

Would solve the problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Couldn't clean the drive, Command Failed: diskpart /s --- WIn 8.1
I found a solution that worked for me. I had same problem. Same error message. SD micro card was plugged in to a...
Read more >
Error: Couldn't clean the drive, Command failed: diskpart /s
I opened the console to see what was happening and looked at the flash results object. It had one error (see title), then...
Read more >
Fix Diskpart Clean Not Working on Disk/USB/SD Card [5+ Fixes]
How to Fix Diskpart Clean Not Working Error · Fix 1. Reconnect the Target Device to PC · Fix 2. Check if Drive...
Read more >
Windows 10 installation on clean drive fails with error "We
on a new machine that I built. Currently installation is failing when I try to select where the installation location.
Read more >
Couldn't clean the drive, command failed - Raspberry Pi Forums
I will second the exact same problem, I was trying to see if I could manage a 64 GB SDXC card using the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found