Etcher fails to flash

I’m trying to burn a HASSOS image on a microSD card using a 64bit Win10 system.
Running Etcher as adminstrator, but when the package has been decompressed it simply says “Flash failed”.
I’ve tried multiple adapters and multiple microSD cars, but it just doesn’t want to flash.

The console comes up with this:

Tue Jan 19 2021 11:12:36 GMT+0100 (Midden-Europese standaardtijd) Flash error (
  "image": {
    "size": 2147483648,
    "compressedSize": 238334864,
    "hasMBR": true,
    "path": "C:\\Users\\Yvo\\Desktop\\hassos_rpi4-5.10.img.xz",
    "partitions": [
        "offset": 1048576,
        "size": 33554432,
        "type": 12,
        "index": 1
        "offset": 512,
        "size": 1048064,
        "type": 238,
        "index": 2
    "isCompressed": true,
    "name": "hassos_rpi4-5.10.img",
    "isSizeEstimated": false,
    "extension": "xz"
  "drives": [
      "size": 7948206080,
      "isVirtual": false,
      "enumerator": "USBSTOR",
      "logicalBlockSize": 512,
      "raw": "\\\\.\\PhysicalDrive4",
      "error": null,
      "isReadOnly": false,
      "displayName": "J:\\",
      "blockSize": 512,
      "isSCSI": false,
      "isRemovable": true,
      "device": "\\\\.\\PhysicalDrive4",
      "busVersion": "2.0",
      "isSystem": false,
      "busType": "USB",
      "isCard": false,
      "isUSB": true,
      "devicePath": null,
      "mountpoints": [
          "path": "J:\\"
      "description": "Generic SD/MMC USB Device",
      "isUAS": false,
      "partitionTableType": "mbr"
  "driveCount": 1,
  "uuid": "6a8b2a8e-4350-4b49-9551-a80ae29bd294",
  "flashInstanceUuid": "6a8b2a8e-4350-4b49-9551-a80ae29bd294",
  "error": {
    "name": "Error",
    "message": "Couldn't clean the drive, Command failed: diskpart s n (code 2147755009)",
    "stack": "Error: Couldn't clean the drive, Command failed: diskpart s n (code 2147755009)\n    at Object.clean (C:\\Users\\Yvo\\AppData\\Local\\Programs\\balena-etcher\\resources\\app\\generated\\child-writer.js:8251:35)\n    at async BlockDevice._open (C:\\Users\\Yvo\\AppData\\Local\\Programs\\balena-etcher\\resources\\app\\generated\\child-writer.js:9065:25)\n    at async (C:\\Users\\Yvo\\AppData\\Local\\Programs\\balena-etcher\\resources\\app\\generated\\child-writer.js:10659:25)\n    at async n    at async Promise.all (index 0)\n    at async MultiDestination._open (C:\\Users\\Yvo\\AppData\\Local\\Programs\\balena-etcher\\resources\\app\\generated\\child-writer.js:10294:21)\n    at async (C:\\Users\\Yvo\\AppData\\Local\\Programs\\balena-etcher\\resources\\app\\generated\\child-writer.js:10659:25)\n    at async Promise.all (index 1)\n    at async pipeSourceToDestinations (C:\\Users\\Yvo\\AppData\\Local\\Programs\\balena-etcher\\resources\\app\\generated\\child-writer.js:8484:17)\n    at async decompressThenFlash (C:\\Users\\Yvo\\AppData\\Local\\Programs\\balena-etcher\\resources\\app\\generated\\child-writer.js:8420:28)"
  "sample": 0.1,
  "applicationSessionUuid": "173e1edd-f50e-4896-9a55-4e28ba36e806",
  "flashingWorkflowUuid": "ec6e3a6e-489d-45b4-8800-0aa389856a59"

Does anybody have any idea what’s going wrong?

Hello @YvoT

On Windows, before flashing a drive, etcher erases its partition table so windows doesn’t prevent Etcher from writing to the first sectors of the drive.
In order to do so, etcher uses the diskpart Windows utility.

Here diskpart exits with the status code 2147755009 = 0x80042401 = VDS_E_INITIALIZED_FAILED according to .

VDS or the provider failed to initialize.

I have not seen this one before and I’m not sure what it means.

Maybe Etcher should just ignore all diskpart errors and try flashing anyway.
If you have some time, could you please try the following:

  • open the C:\Users\Yvo\AppData\Local\Programs\balena-etcher\resources\app\generated\child-writer.js with a text editor;
  • look for a line containing throw new Error(`Couldn't clean the drive, ${error.message} (code ${error.code})`); (around line 18375 depending on the Etcher version you have installed);
  • comment this line out by prefixing it with two slashes: //;
  • run etcher again and see if it can flash the drive.

If this works, I’ll update etcher to ignore this diskpart error.

I was having the same issue - your suggestion worked for me!

Tue May 11 2021 02:21:49 GMT+0530 (India Standard Time) Done ({“image”:{“size”:4291854336,“name”:“kali-linux-2021.1-installer-amd64.iso”,“hasMBR”:true,“partitions”:[{“offset”:10874880,“size”:442368,“type”:239,“index”:1}],“extension”:“iso”,“path”:“D:\kali-linux-2021.1-installer-amd64.iso”},“drives”:[{“size”:67108864000,“isVirtual”:false,“enumerator”:“USBSTOR”,“logicalBlockSize”:512,“raw”:"\\.\PhysicalDrive2",“error”:null,“isReadOnly”:false,“displayName”:“O:\”,“blockSize”:512,“isSCSI”:false,“isRemovable”:true,“device”:"\\.\PhysicalDrive2",“busVersion”:“2.0”,“isSystem”:false,“busType”:“USB”,“isCard”:false,“isUSB”:true,“devicePath”:null,“mountpoints”:[{“path”:“O:\”}],“description”:“USB2.0 Flash Disk USB Device”,“isUAS”:false,“partitionTableType”:“mbr”}],“driveCount”:1,“uuid”:“f729db59-28e3-4489-ae41-5084e163c4fe”,“status”:“finished”,“flashInstanceUuid”:“f729db59-28e3-4489-ae41-5084e163c4fe”,“errors”:[{“name”:“Error”,“description”:“USB2.0 Flash Disk USB Device”,“code”:“EPERM”,“syscall”:“write”,“errno”:-4048,“device”:"\\.\PhysicalDrive2"}],“devices”:{“failed”:1,“successful”:0},“bytesWritten”:0,“sourceMetadata”:{“size”:4291854336,“name”:“kali-linux-2021.1-installer-amd64.iso”,“blocks”:[{“blocks”:[{“offset”:0,“length”:4291854336}]}],“blockmappedSize”:4291854336},“sample”:0.1,“applicationSessionUuid”:“0fbc989a-7c45-4001-8e70-0dc6cafdb1ea”,“flashingWorkflowUuid”:“bdb9acaa-7c3e-4fef-bb9c-3043bcf0a79e”})
this was the error in the console
please help

I see you are flashing kali-linux-2021.1-installer-amd64.iso but I can’t see the error. Are you sure you copied the entire error from the console, it seems to be missing the error object that contains the error. Please check the output the thread creater posted on the top to get a reference. If you did it right, please do make sure if the error you are seeing is relevant to this thread. If not, be sure to open a new thread with your etcher version and we be happy to help you out. Thanks!