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.