Flashing hard drive get stuck at 31% (balena fetcher)

As far as I remember I raised an issue in Git Hub or in the documentation site.

2 Likes

Thanks a lot @Damos, I had exactly the same problems (etcher freeze, HA Cloud services ko…) this post saved my day ! :slight_smile:

1 Like

Be aware there is a ‘fake’ balena etcher out there…

Is the fake etcher any better? Does it come without ads and trackers? Any link?

The discussion linked recommended that you don’t use etcher.

Here is another tool that was linked to.

https://bztsrc.gitlab.io/usbimager/

1 Like

For your info, I was warning for the fake

And to answer your question: No…the original is Better;Without ads (except for their own) and without trackers (not sure, but according @orange-assistant there are issues).

Any Link? → balenaEtcher - Flash OS images to SD cards & USB drives (this is the original, DO NOT USE THE FAKE, as it has all that you mentioned)

But as @pcwii said, you can use usb imager as well :stuck_out_tongue:

I read a little bit in the balena github repo and actually it looks like “some” fake etcher sites were just distributing old unmodified etcher binaries WITHOUT ANY ADS (but with all the tracking as this is part of etcher for a long period already).

I will avoid etcher for now thanks to all that information (it also has unfixed security issues according to devs on github).

USBimager looks great! They have a table on gitlab and (also) compare it with etcher - looks like it wins in all categories!

3 Likes

What a lifesaver it was to find this thread. I had exactly the same issues two days ago, with my NUC, a fresh Ubundu live and Etcher. I have all the symptoms, I had the Ubuntu freeze, the dns container halting and have been tryting to get it to work for two days now. Thanks! I will try again with high hopes.

Update: 1 day later and success using sudo .\usbimager -a to be able to flash my SSD.

3 Likes

I think it’s time update the HA docs to don’t suggest etcher (with it’s known vulnerabilities and trackers/ads) anymore as it looks like it is the root cause of many HA related problems (not limited to writing/flashing but also DNS manipulations?).

A quick look shows that for raspberry based installs the pi imager (and not etcher) is already suggested so it should be no problem to replace the docs which still promote etcher with usbimager I guess?

4 Likes

I already raised that issue in GitHub: Flshing with Etcher results in faulty DNS behavior. · Issue #28706 · home-assistant/home-assistant.io (github.com).

1 Like

This is a balena etcher issue and have nothing to do with the image by itslef. I would recommend using the dd pre-installed tool in the live ubuntu image.

  1. Download haos_generic-x86-64-11-1.img.xz
  2. Unpack the image and you will get instead haos_generic-x86-64-11-1.img
    unxz haos_generic-x86-64-11-1.img.xz
  3. Flash the image to your device
    sudo dd of=/dev/{YOUR_DEVICE} if=./haos_generic-x86-64-11-1.img bs=64k oflag=dsync status=progress
1 Like

Sadly you can’t verify the written image with dd.

But USBImager does that and isn’t bloated (ads, tracking, …) and broken (security issues, broken writes’ …) like etcher.

2 Likes

I had this same issue today, it was a right pain.

Lenovo M75n IoT with M.2 SSD, installing HAOS.

Used a live Linux bootable USB (Ubuntu Desktop). Managed to install Balena Etcher easily enough, and download the image, but Balena Etcher failed to even start writing to the SSD.

Moved over to a Linux Mint bootable USB, and installed Balena Etcher, and it installed to 32% before the whole machine locked up. I left it for an hour or so, but it didn’t recover. However, when I rebooted, HA appeared to boot absolutely fine. Spent the next couple of hours playing around, before realising I had networking issues with anything external (logs showed issues with the weather integration, and I couldn’t migrate to MariaDB because the mirrors weren’t accessible). Everything pointed to DNS issues, but even manually setting the DNS server didn’t help. So, whilst I had assumed the image restore completed and maybe the graphics had just locked up, it definitely had not completed.

Tried various other methods, including an external USB caddy, but it wasn’t compatible. Also tried other disk imaging software, but none of them would detect the in-built SSD, they only worked for USB devices, and I didn’t have a suitable enclosure.

In the end, this guide did the trick. Used Ubuntu Desktop live again (as I had before), but installed Balena Etcher a different way, using an older version as per this guide. It threw a number of errors when installing Balena Etcher, but it did install and ran fine. It failed when using the URL, but downloading the image and selecting the file worked perfectly, got to 100% and successfully verified the write.

1 Like

Thank you very much, I was stuck on Balena at 32% and was trying for hours after testing your step by step tutorial. Works like magic! thank you again!

3 Likes

For those of you, who get stuck like described above (aka myself). I had mixed results with usbimager. One day, I was able to flash but yesterday I wasn’t. Due to a tip within the thread, I decompressed the xz file to the img file and used balena etcher afterwards which worked like a charm.

The same image? Maybe the older images were still within the (size) limit but the newest one outgrown the (only) mentioned limitation in the docs when writing xz compressed images? :thinking:

Limitations

With xz compression dictionaries bigger than 1 Gigabytes not supported (the default xz dictionary size is 64 Mb).

So to summarise

  1. Tried balena with URL - no go
  2. Tried balena with xz file - blocked at 28%
  3. Decompressed xz file and tried USBImager - no go —> with your comment I know understand why
  4. Used the img file (6G) with balena - success

Flashing the xz compressed image with usbimager or uncompressed (the later should always work!)?

Well I obviously didn’t think the size would matter :wink:
but it looks like it did.

That’s weird because if the image was uncompressed (.img) their shouldn’t be any limitation in size when flashing!

The reason why neither balena etcher (ads, trackers and 0-day vulnerabilities included) or usbimager can flash “too big” xz-compressed images on the fly is the same (limitation in xz!).