Flash failed Buster Minimal

Hi,
I keep on getting a flash failed error message whenever I try to flash Buster Minimal 5.4.83 using Etcher 1.5.114. The SD card is brand new and has been checked by H2testw and passed.
Can anyone help so I can successfully flash this card?
Thanks

Below is the console output:

Done (
{
  "image": {
    "size": 633339904,
    "name": "Armbian_20.11.6_Odroidxu4_buster_current_5.4.83_minimal.img",
    "hasMBR": true,
    "partitions": [
      {
        "offset": 4194304,
        "size": 629145600,
        "type": 131,
        "index": 1
      }
    ],
    "extension": "img",
    "path": "**Full path redacted for security**\\Armbian_20.11.6_Odroidxu4_buster_current_5.4.83_minimal.img"
  },
  "drives": [
    {
      "size": 15931539456,
      "isVirtual": false,
      "enumerator": "RISD",
      "logicalBlockSize": 512,
      "raw": "\\\\.\\PhysicalDrive1",
      "error": null,
      "isReadOnly": false,
      "displayName": "D:\\",
      "blockSize": 512,
      "isSCSI": false,
      "isRemovable": true,
      "device": "\\\\.\\PhysicalDrive1",
      "busVersion": "1.0",
      "isSystem": false,
      "busType": "UNKNOWN",
      "isCard": false,
      "isUSB": false,
      "devicePath": null,
      "mountpoints": [
        {
          "path": "D:\\"
        }
      ],
      "description": "Ricoh SD Disk Device",
      "isUAS": false,
      "partitionTableType": "mbr"
    }
  ],
  "driveCount": 1,
  "uuid": "fbd328a7-dc98-48e9-bfc8-0d626f01729f",
  "status": "finished",
  "flashInstanceUuid": "fbd328a7-dc98-48e9-bfc8-0d626f01729f",
  "errors": [
    {
      "name": "Error",
      "description": "Ricoh SD Disk Device",
      "device": "\\\\.\\PhysicalDrive1"
    }
  ],
  "devices": {
    "failed": 1,
    "successful": 0
  },
  "bytesWritten": 583008256,
  "sourceMetadata": {
    "size": 633339904,
    "name": "Armbian_20.11.6_Odroidxu4_buster_current_5.4.83_minimal.img",
    "blocks": [
      {
        "blocks": [
          {
            "offset": 0,
            "length": 23068672
          }
        ]
      },
      {
        "blocks": [
          {
            "offset": 27262976,
            "length": 3145728
          }
        ]
      },
      {
        "blocks": [
          {
            "offset": 33554432,
            "length": 2097152
          }
        ]
      },
      {
        "blocks": [
          {
            "offset": 36700160,
            "length": 35651584
          }
        ]
      },
      {
        "blocks": [
          {
            "offset": 73400320,
            "length": 4194304
          }
        ]
      },
      {
        "blocks": [
          {
            "offset": 78643200,
            "length": 1048576
          }
        ]
      },
      {
        "blocks": [
          {
            "offset": 81788928,
            "length": 8388608
          }
        ]
      },
      {
        "blocks": [
          {
            "offset": 96468992,
            "length": 12582912
          }
        ]
      },
      {
        "blocks": [
          {
            "offset": 110100480,
            "length": 2097152
          }
        ]
      },
      {
        "blocks": [
          {
            "offset": 131072000,
            "length": 1048576
          }
        ]
      },
      {
        "blocks": [
          {
            "offset": 137363456,
            "length": 377487360
          }
        ]
      },
      {
        "blocks": [
          {
            "offset": 515899392,
            "length": 84934656
          }
        ]
      },
      {
        "blocks": [
          {
            "offset": 601882624,
            "length": 2097152
          }
        ]
      },
      {
        "blocks": [
          {
            "offset": 607125504,
            "length": 12582912
          }
        ]
      },
      {
        "blocks": [
          {
            "offset": 620756992,
            "length": 12582912
          }
        ]
      }
    ],
    "blockmappedSize": 583008256
  },
  "sample": 0.1,
  "applicationSessionUuid": "8c0533c4-5381-4da8-a894-63bbd03b505f",
  "flashingWorkflowUuid": "9290918f-b101-4a43-b2f1-1f437fed6e02"
}
)

Thanks,
Matt

Hello,
Thanks for providing the relevant console output, have your tried running Etcher as root so we can rule out any permissions issue if there is any. Apart from that, what OS is Etcher running on?

Hi,
Thanks for getting back to me.
Yes, I’ve running it several times, both as a user account and as administrator, the result is the same. I’m running Windows 7.
Thanks,
Matt

Hello @Matt_GS

Was this a verification error ?
If so, it might be that WIndows is creating folders and files on the device between the moment it is written and read again for verification, making the checksums not match.
Check if there is a System Volume Information folder on the drive after it has been flashed. In that case the device was flashed fine.

See:

Hi Zvin,
Not sure what type of error it is, how would I find out?
All I know is at the end of the process etcher reports that the flash has failed.

I don’t think it’s a problem with the System Volume Information folder being created. Below is a screen shot of the SD card (hidden files are set to be visible):
image
Thanks,
Matt

Hi Matt,

Could you attach a screenshot of Etcher after the failed flash?

Here you go!
image

Hi @zvin, @jakogut,

Is there any news on this?

Thanks,
Matt

Hey @Matt_GS, thanks for the info.

Can you please verify that the image you’d like to write (Buster Minimal) is not corrupted?

This could be a genuine issue with the image itself. Have you tried flashing another image? Do you always get the same error?

Hi @gelbal ,

I’ve tested the image before it was flashed and all the checksums came back matching, so the download hasn’t been corrupted.

I will try with another image a little later today.

Thanks,
Matt

Hey there

Thanks! Let us know how it goes

Hi @rahul-thakoor,

I’ve flashing a different image and the same result. Do you know of the reason why they keep failing?

Thanks,
Matt

Hello @Matt_GS ,

Just to confirm, you tried to flash a different image and you got the same results than with Buster Minimal 5.4.83? This might point to an SD Card issue. I see you checked it with h2testw, but do you have any other SD-card around you could try so that we can rule out HW being the problem.

Cheers,
Nico.

Hi @ntzovanis and @rahul-thakoor ,

I’ve tried with a brand new card and exactly the same result, flash failed. I also have tried using the Raspberry Pi Imager to flash the SD card and that seems to be a success.

Thanks,
Matt

Hello @Matt_GS

Looking at the logs, I don’t know what the error is.
What I can see is that the image has been written: bytesWritten is the same as blockmappedSize: 583008256.

So the error happens after the image has been written.
Maybe the file descriptor can’t be closed or maybe something else.
The logs do not have enough information to understand what is happening.

If you have time, you can help us debug this by editing the child-writer.js file in C:\Users\<your username>\AppData\Local\Programs\balena-etcher\resources\app\generated\child-writer.js

Look for a like like const onFail = (destination, error) => { (around line 32172)
and add some log right below like

log(`Something's wrong ${error} ${error.message} ${error.stack} ${error.name}`)

Save the file, run etcher again, you should see the message you added in the console.
Hopefully it will have some information.

Hey, I’m tracing back to when we asked if this was a verification error and you mentioned you weren’t sure how to determine that.

When you flash the drive the UI shows you the steps it is performing such as decompressing, flashing, then finally validating the flash. Given the screenshots you’ve shared it looks like the contents are flashed but then when Etcher tries to verify the contents flashed it fails.

Can you confirm which step the UI gets to before it fails ? Do you see the step where it says validating and then it fails or does the failure occur during the flashing stage ?

Hi. Were you able to narrow down the issue based on the previous two messages?