Error writing .img file

I’m using balenaEtcher-Portable-1.5.81.exe. I’m trying to flash a .img file to a Diamond Systems flash disk connected through a Diamond Systems FlashDisk Programmer board, and the board is connected to a Rosewill RCW-618 ATA adapter to a USB port on my Windows 10 computer. The image was created with the dd command on a Linux system. I can use that same Linux system to write back to the same setup with another dd command reversing the if and of parameters, so I know all adapters and the disk itself are good. I get an error stating: “The writer process ended unexpectedly.” Below is the output from the console:
Thu Jun 17 2021 07:33:29 GMT-0500 (Central Daylight Time) Write failed ({“image”:“F:\Polar\20150402_polar_base.img”,“drives”:[{“size”:4096253952,“isVirtual”:false,“enumerator”:“USBSTOR”,“logicalBlockSize”:512,“raw”:"\\.\PhysicalDrive3",“error”:null,“isReadOnly”:false,“displayName”:"\\.\PhysicalDrive3",“blockSize”:512,“isSCSI”:false,“isRemovable”:true,“device”:"\\.\PhysicalDrive3",“busVersion”:“2.0”,“isSystem”:false,“busType”:“USB”,“isCard”:false,“isUSB”:true,“devicePath”:null,“mountpoints”:,“description”:“4GB ATA Flash Disk USB Device”,“isUAS”:false}],“driveCount”:1,“uuid”:“a846cd45-ea4c-4e15-91c0-547247932146”,“status”:“failed”,“flashInstanceUuid”:“a846cd45-ea4c-4e15-91c0-547247932146”,“unmountOnSuccess”:true,“validateWriteOnSuccess”:true,“trim”:false,“applicationSessionUuid”:“a69fd179-61bd-4237-a60c-f0330f2f1564”,“flashingWorkflowUuid”:“5847d4b5-f00e-4cfa-8ca9-49a891cf16a5”,“error”:{“description”:“Please try again, and contact the Etcher team if the problem persists”,“report”:false,“code”:“ECHILDDIED”},“sample”:0.1})

Hi, could you try with version 1.5.116 and see how that goes instead? You can get it at Release v1.5.116 · balena-io/etcher · GitHub

Hello @skassan, are you getting the exact same output on the console?
Please share the new error log as well.

The previous one you shared is unfortunately not descriptive enough. I’m not sure what could be the error. I pinged Lorenzo who maintains Etcher to see if he has troubleshooting ideas here.

For now, can you please comment if you are able to flash another image fine with the same Etcher version on your Windows computer?

Here is the full output from the console with the latest version. I get the same results for any file that I try to flash. As noted earlier, I can successfully copy these files to the same hardware setup from a Linux laptop using the dd command. So I’m confident the files are good, as is the hardware. I note in the console output that it says “Decompress first: true”. These image files are not compressed. They’re just raw output from a previous dd command. Do I need to compress them first? If so, which format (gzip, bzip, WinZip)?

index.css:1 Failed to load resource: net::ERR_FILE_NOT_FOUND

electron/js2c/renderer_init.js:13 (electron) The remote module is deprecated. Use https://github.com/electron/remote instead.

log @ electron/js2c/renderer_init.js:13

gui.js:90419 _____ _ _

| ___| | | |

| |__ | |_ ___| |__ ___ _ __

| __|| __/ __| '_ \ / _ \ '__|

| |___| || (__| | | | __/ |

\____/ \__\___|_| |_|\___|_|

Interested in joining the Etcher team?

Drop us a line at [join+etcher@balena.io](mailto:join+etcher@balena.io)

Version = 1.5.120, Type = portable

gui.js:58418 Thu Jun 24 2021 05:57:10 GMT-0500 (Central Daylight Time) Application start ({"packageType":"portable","version":"1.5.120","sample":0.1,"applicationSessionUuid":"1261be94-b9e9-4f69-b7c0-e18e3d63d385","flashingWorkflowUuid":"992f4383-9935-46db-80fa-f20df41a3a50"})

gui.js:51120 Thu Jun 24 2021 05:57:27 GMT-0500 (Central Daylight Time) Open image selector ({"sample":0.1,"applicationSessionUuid":"1261be94-b9e9-4f69-b7c0-e18e3d63d385","flashingWorkflowUuid":"992f4383-9935-46db-80fa-f20df41a3a50"})

gui.js:51120 Thu Jun 24 2021 05:57:32 GMT-0500 (Central Daylight Time) Select image ({"image":{"size":256901120,"name":"20150402_polar_base.img","hasMBR":true,"partitions":[{"offset":1048576,"size":255852544,"type":131,"index":1}],"extension":"img","path":"F:\\Polar\\20150402_polar_base.img","logo":false,"blockMap":false},"sample":0.1,"applicationSessionUuid":"1261be94-b9e9-4f69-b7c0-e18e3d63d385","flashingWorkflowUuid":"992f4383-9935-46db-80fa-f20df41a3a50"})

gui.js:51120 Thu Jun 24 2021 05:57:43 GMT-0500 (Central Daylight Time) Flash ({"image":{"size":256901120,"name":"20150402_polar_base.img","hasMBR":true,"partitions":[{"offset":1048576,"size":255852544,"type":131,"index":1}],"extension":"img","path":"F:\\Polar\\20150402_polar_base.img"},"drives":[{"size":4096253952,"isVirtual":false,"enumerator":"USBSTOR","logicalBlockSize":512,"raw":"[\\\\.\\PhysicalDrive3](file://./PhysicalDrive3)","error":null,"isReadOnly":false,"displayName":"[\\\\.\\PhysicalDrive3](file://./PhysicalDrive3)","blockSize":512,"isSCSI":false,"isRemovable":true,"device":"[\\\\.\\PhysicalDrive3](file://./PhysicalDrive3)","busVersion":"2.0","isSystem":false,"busType":"USB","isCard":false,"isUSB":true,"devicePath":null,"mountpoints":[],"description":"4GB ATA Flash Disk USB Device","isUAS":false,"partitionTableType":"mbr"}],"driveCount":1,"uuid":"2c76393e-cc4e-4ea2-8afb-54e3222418c5","status":"started","flashInstanceUuid":"2c76393e-cc4e-4ea2-8afb-54e3222418c5","sample":0.1,"applicationSessionUuid":"1261be94-b9e9-4f69-b7c0-e18e3d63d385","flashingWorkflowUuid":"992f4383-9935-46db-80fa-f20df41a3a50"})

gui.js:51120 Elevating command: C:\Users\skassan\AppData\Local\Temp\1sOijhzOvKYNJctmEuRIopHyhd3\balenaEtcher.exe C:\Users\skassan\AppData\Local\Temp\1sOijhzOvKYNJctmEuRIopHyhd3\resources\app\generated\child-writer.js

gui.js:38464 0 devices, 0% at 0.00 MB/s (total 0.00 MB/s) with 0 failed devices

gui.js:51120 Thu Jun 24 2021 05:57:44 GMT-0500 (Central Daylight Time) SafeWebview loaded ({"event":{"id":1,"url":"https://assets.balena.io/etcher-featured/index.html?borderRight=false&darkBackground=true&etcher-version=1.5.120&api-version=2&optOutAnalytics=false","method":"GET","timestamp":1624532264931.605,"resourceType":"mainFrame","ip":"172.67.149.103","fromCache":false,"statusLine":"HTTP/1.1 200","statusCode":200,"responseHeaders":{"access-control-allow-origin":["*"],"age":["0"],"alt-svc":["h3-27=\":443\"; ma=86400, h3-28=\":443\"; ma=86400, h3-29=\":443\"; ma=86400, h3=\":443\"; ma=86400"],"cache-control":["max-age=600"],"cf-cache-status":["DYNAMIC"],"cf-ray":["66456fdede5b30f8-ATL"],"cf-request-id":["0adf443f44000030f84abf3000000001"],"content-encoding":["br"],"content-type":["text/html; charset=utf-8"],"date":["Thu, 24 Jun 2021 10:57:44 GMT"],"expect-ct":["max-age=604800, report-uri=\"[https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\](https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct/)""],"expires":["Wed, 23 Jun 2021 22:19:09 GMT"],"last-modified":["Wed, 23 Jun 2021 22:07:49 GMT"],"nel":["{\"report_to\":\"cf-nel\",\"max_age\":604800}"],"report-to":["{\"endpoints\":[{\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report\\/v2?s=9e8s7wil3Jzx9ioPTxHbUA41QLt9AziEjtPHcAG%2Bgfx9ZzAidW0RyaCpna5oX548a4Fy5ucStNX5vYFm8VPBc30NfwQa4yKzUPrgfkNgQbaH8gQvgEj%2BQiJFArDnXg%3D%3D\"}],\"group\":\"cf-nel\",\"max_age\":604800}"],"server":["cloudflare"],"vary":["Accept-Encoding"],"via":["1.1 varnish"],"x-cache":["HIT"],"x-cache-hits":["1"],"x-fastly-request-id":["ccbd1adea45204a269067d6ce014253601377493"],"x-github-request-id":["3A5A:7830:39E5D7:71BCFE:60D3B112"],"x-origin-cache":["HIT"],"x-proxy-cache":["HIT"],"x-served-by":["cache-pdk17848-PDK"],"x-timer":["S1624532265.783875,VS0,VE72"]},"referrer":"","error":"net::OK"},"sample":0.1,"applicationSessionUuid":"1261be94-b9e9-4f69-b7c0-e18e3d63d385","flashingWorkflowUuid":"992f4383-9935-46db-80fa-f20df41a3a50"})

gui.js:51120 Successfully connected to IPC server: etcher-server-17724, socket root C:\Users\skassan\AppData\Local\Temp\

gui.js:51120 Image: F:\Polar\20150402_polar_base.img

gui.js:51120 Devices: [\\.\PhysicalDrive3](file://./PhysicalDrive3)

gui.js:51120 Auto blockmapping: true

gui.js:51120 Decompress first: true

gui.js:51120 Thu Jun 24 2021 05:57:56 GMT-0500 (Central Daylight Time) Flash error ({"image":{"size":256901120,"name":"20150402_polar_base.img","hasMBR":true,"partitions":[{"offset":1048576,"size":255852544,"type":131,"index":1}],"extension":"img","path":"F:\\Polar\\20150402_polar_base.img"},"drives":[{"size":4096253952,"isVirtual":false,"enumerator":"USBSTOR","logicalBlockSize":512,"raw":"[\\\\.\\PhysicalDrive3](file://./PhysicalDrive3)","error":null,"isReadOnly":false,"displayName":"[\\\\.\\PhysicalDrive3](file://./PhysicalDrive3)","blockSize":512,"isSCSI":false,"isRemovable":true,"device":"[\\\\.\\PhysicalDrive3](file://./PhysicalDrive3)","busVersion":"2.0","isSystem":false,"busType":"USB","isCard":false,"isUSB":true,"devicePath":null,"mountpoints":[],"description":"4GB ATA Flash Disk USB Device","isUAS":false,"partitionTableType":"mbr"}],"driveCount":1,"uuid":"2c76393e-cc4e-4ea2-8afb-54e3222418c5","flashInstanceUuid":"2c76393e-cc4e-4ea2-8afb-54e3222418c5","error":{"name":"Error","message":"Couldn't clean the drive, Command failed: diskpart s n (code 2147942405)","stack":"Error: Couldn't clean the drive, Command failed: diskpart s n (code 2147942405)\n at Object.clean (C:\\Users\\skassan\\AppData\\Local\\Temp\\1sOijhzOvKYNJctmEuRIopHyhd3\\resources\\app\\generated\\child-writer.js:2060:31)\n at async BlockDevice._open (C:\\Users\\skassan\\AppData\\Local\\Temp\\1sOijhzOvKYNJctmEuRIopHyhd3\\resources\\app\\generated\\child-writer.js:514:21)\n at async BlockDevice.open (C:\\Users\\skassan\\AppData\\Local\\Temp\\1sOijhzOvKYNJctmEuRIopHyhd3\\resources\\app\\generated\\child-writer.js:3912:21)\n at async n at async Promise.all (index 0)\n at async MultiDestination._open (C:\\Users\\skassan\\AppData\\Local\\Temp\\1sOijhzOvKYNJctmEuRIopHyhd3\\resources\\app\\generated\\child-writer.js:20630:17)\n at async MultiDestination.open (C:\\Users\\skassan\\AppData\\Local\\Temp\\1sOijhzOvKYNJctmEuRIopHyhd3\\resources\\app\\generated\\child-writer.js:3912:21)\n at async Promise.all (index 1)\n at async pipeSourceToDestinations (C:\\Users\\skassan\\AppData\\Local\\Temp\\1sOijhzOvKYNJctmEuRIopHyhd3\\resources\\app\\generated\\child-writer.js:30512:13)\n at async decompressThenFlash (C:\\Users\\skassan\\AppData\\Local\\Temp\\1sOijhzOvKYNJctmEuRIopHyhd3\\resources\\app\\generated\\child-writer.js:30448:24)"},"sample":0.1,"applicationSessionUuid":"1261be94-b9e9-4f69-b7c0-e18e3d63d385","flashingWorkflowUuid":"992f4383-9935-46db-80fa-f20df41a3a50"})

gui.js:51120 Finish: 0

gui.js:51120 Terminating IPC server

gui.js:51120 Flash results {results: {…}, cancelled: false, skip: false}

gui.js:51120 Thu Jun 24 2021 05:57:57 GMT-0500 (Central Daylight Time) Done ({"image":{"size":256901120,"name":"20150402_polar_base.img","hasMBR":true,"partitions":[{"offset":1048576,"size":255852544,"type":131,"index":1}],"extension":"img","path":"F:\\Polar\\20150402_polar_base.img"},"drives":[{"size":4096253952,"isVirtual":false,"enumerator":"USBSTOR","logicalBlockSize":512,"raw":"[\\\\.\\PhysicalDrive3](file://./PhysicalDrive3)","error":null,"isReadOnly":false,"displayName":"[\\\\.\\PhysicalDrive3](file://./PhysicalDrive3)","blockSize":512,"isSCSI":false,"isRemovable":true,"device":"[\\\\.\\PhysicalDrive3](file://./PhysicalDrive3)","busVersion":"2.0","isSystem":false,"busType":"USB","isCard":false,"isUSB":true,"devicePath":null,"mountpoints":[],"description":"4GB ATA Flash Disk USB Device","isUAS":false,"partitionTableType":"mbr"}],"driveCount":1,"uuid":"2c76393e-cc4e-4ea2-8afb-54e3222418c5","status":"finished","flashInstanceUuid":"2c76393e-cc4e-4ea2-8afb-54e3222418c5","errors":[{"name":"Error","description":"4GB ATA Flash Disk USB Device","device":"[\\\\.\\PhysicalDrive3](file://.//PhysicalDrive3)"}],"devices":{"failed":1,"successful":0},"bytesWritten":0,"sourceMetadata":{"size":256901120,"name":"20150402_polar_base.img","blocks":[{"blocks":[{"offset":0,"length":2097152}]},{"blocks":[{"offset":5242880,"length":1048576}]},{"blocks":[{"offset":9437184,"length":1048576}]},{"blocks":[{"offset":11534336,"length":7340032}]},{"blocks":[{"offset":20971520,"length":2097152}]},{"blocks":[{"offset":26214400,"length":1048576}]},{"blocks":[{"offset":32505856,"length":4194304}]},{"blocks":[{"offset":40894464,"length":1048576}]},{"blocks":[{"offset":42991616,"length":14680064}]},{"blocks":[{"offset":59768832,"length":1048576}]},{"blocks":[{"offset":68157440,"length":11534336}]},{"blocks":[{"offset":80740352,"length":1048576}]},{"blocks":[{"offset":82837504,"length":1048576}]},{"blocks":[{"offset":84934656,"length":3145728}]},{"blocks":[{"offset":89128960,"length":1048576}]},{"blocks":[{"offset":93323264,"length":1048576}]},{"blocks":[{"offset":95420416,"length":5242880}]},{"blocks":[{"offset":101711872,"length":13631488}]},{"blocks":[{"offset":118489088,"length":5242880}]},{"blocks":[{"offset":124780544,"length":1048576}]},{"blocks":[{"offset":126877696,"length":1048576}]},{"blocks":[{"offset":135266304,"length":1048576}]},{"blocks":[{"offset":143654912,"length":1048576}]},{"blocks":[{"offset":146800640,"length":2097152}]},{"blocks":[{"offset":152043520,"length":7340032}]},{"blocks":[{"offset":160432128,"length":1048576}]},{"blocks":[{"offset":168820736,"length":1048576}]},{"blocks":[{"offset":170917888,"length":15728640}]},{"blocks":[{"offset":193986560,"length":1048576}]},{"blocks":[{"offset":202375168,"length":1048576}]},{"blocks":[{"offset":210763776,"length":1048576}]},{"blocks":[{"offset":217055232,"length":1048576}]},{"blocks":[{"offset":219152384,"length":1048576}]},{"blocks":[{"offset":227540992,"length":1048576}]},{"blocks":[{"offset":235929600,"length":1048576}]},{"blocks":[{"offset":244318208,"length":1048576}]},{"blocks":[{"offset":252706816,"length":1048576}]}],"blockmappedSize":119537664},"sample":0.1,"applicationSessionUuid":"1261be94-b9e9-4f69-b7c0-e18e3d63d385","flashingWorkflowUuid":"992f4383-9935-46db-80fa-f20df41a3a50"})

gui.js:51120 Thu Jun 24 2021 05:57:57 GMT-0500 (Central Daylight Time) SafeWebview loaded ({"event":{"id":25,"url":"https://www.balena.io/etcher/success-banner/?borderTop=false&darkBackground=true&etcher-version=1.5.120&api-version=2&optOutAnalytics=false","method":"GET","timestamp":1624532277790.4092,"resourceType":"mainFrame","ip":"68.183.29.183","fromCache":false,"statusLine":"HTTP/1.1 200","statusCode":200,"responseHeaders":{"age":["631016"],"cache-control":["public, max-age=0, must-revalidate"],"content-encoding":["br"],"content-length":["6088"],"content-type":["text/html; charset=UTF-8"],"date":["Thu, 17 Jun 2021 03:41:01 GMT"],"etag":["\"7f252ae1860b6dd84c58c4e06b3c6e3c-ssl-df\""],"link":["</webpack-runtime-ce0e6738e6853ac14584.js>; rel=preload; as=script, </styles-c4fa86dfd4ad05097eee.js>; rel=preload; as=script, </framework-42f2600cafd3c0e08aac.js>; rel=preload; as=script, </50c25a04-efe577ee14c9c53bed03.js>; rel=preload; as=script, </73ad3401-e112b47ad7a992b91ac8.js>; rel=preload; as=script, </532a2f07-16f3498dd087ee7288d4.js>; rel=preload; as=script, </app-2470a04451a2471559a3.js>; rel=preload; as=script, </c943faba-f859f80ceb7f4f7eab31.js>; rel=preload; as=script, </af13d906-36fdbc23fc7dd2f2b2e7.js>; rel=preload; as=script, </ec1189df-4ae9e03f4545d4f1d61b.js>; rel=preload; as=script, </a9a7754c-29508ff4045f1f93a5f6.js>; rel=preload; as=script, </commons-8fcc2f56d20b76e33299.js>; rel=preload; as=script, </edad6859a763f5239c0343c48608d154b87713d6-282649cf8ac0a71046b8.js>; rel=preload; as=script, </component---src-pages-etcher-success-banner-js-c81df2b0c3894e1f37af.js>; rel=preload; as=script, </page-data/app-data.json>; rel=preload; as=fetch; crossorigin, </page-data/etcher/success-banner/page-data.json>; rel=preload; as=fetch; crossorigin"],"referrer-policy":["strict-origin-when-cross-origin"],"server":["Netlify"],"strict-transport-security":["max-age=31536000"],"vary":["Accept-Encoding"],"x-content-type-options":["nosniff"],"x-frame-options":["DENY"],"x-nf-request-id":["2ebcca44-d161-4ac3-bb9e-8c76bc28d6f7"],"x-xss-protection":["1; mode=block"]},"referrer":"","error":"net::OK"},"sample":0.1,"applicationSessionUuid":"1261be94-b9e9-4f69-b7c0-e18e3d63d385","flashingWorkflowUuid":"992f4383-9935-46db-80fa-f20df41a3a50"})

@skassan, just pinging… were you able to use dispart to clean up the drive? As Lorenzo suggested, it seems that something else might be going on with that drive.

I don’t see a post from Lorenzo. I’m unable to run diskpart since I’m not an admin on my computer. I can try another computer tomorrow when I’m in the office. But as I mentioned, the disk is known good. I can dd to it on a Linux laptop.

Here’s the output from fdisk on a similar disk. The filesystem is ext2. I can get the same info for this specific disk tomorrow.

Disk /dev/sda: 256 MB, 256901120 bytes
16 heads, 32 sectors/track, 980 cylinders
Units = cylinders of 512 * 512 = 262144 bytes

   Device Boot      Start         End      Blocks  Id System
/dev/sda1   *           5         980      249856  83 Linux

Hi,

It seems that Lorenzo’s message never became public in the forums.
Thanks for letting us know, we will investigate what might be the cause in our forums integration.

For reference, Lorenzo’s message the we refer to was reading:

Hi, it seems that there’s an issue when cleaning the drive, could you please try to clean it using Diskpart alone (which is the tool we use on Windows to clean drives) and let us know how it goes?

Looking forward to hear back from you on what diskpart reports for that drive.

Kind regards,
Thodoris

The diskpart clean ran successfully. However, Etcher still fails with the same error. I even tried a ‘clean full’ and got the same results.

I’ve even formatted the disk using the Disk Manager (FAT32), and still get an error. Windows Explorer is able to mount the disk, add a folder, etc.

Mystery solved. It’s a permission problem. I put the Etcher software on a USB stick and moved over to the computer when I have admin access. It worked fine over there. I was signed on as a regular user, and it asked if I wanted to allow the program to change the system. I said yes, and gave it my admin credentials, and all went well. It’s strange that it doesn’t even ask for permission on my normal computer. But at least I understand the problem. Thanks for all of your help.