Out of memory while flashing ssd via balena etcher?

Hello all,
I would like to install Home Assistant OS on an Intel NUC. In Ubuntu (live system on USB) I want to flash the image from github with balena etcher to the internal SSD of the NUC. When doing this every time the process is killed and etcher exits with an “out of memory” error. See below an excerpt from dmesg.
The NUC has 4 GB RAM. The image is shown as having about 6 GB. Could it be that Balena Etcher wants to load the entire image into memory? I also created a SWAP partition on an external HDD, which was also used. But still Etcher crashed.
A few weeks ago I successfully flashed. However, the NUC still had 8 GB at that time. A memory chip broke and seems to have broken my Home Assistant.
If 4 GB is sufficient to run Home Assistant, can the installation require 8 GB??? Or maybe there is more broken in the NUC than just the one memory block? Does anyone have any ideas on how I can fix this problem? If it really should be the memory, thousands of users should have the same problem. But I can’t find any clue on the net.

  • Are there alternative programs to flash the SSD?
  • Can I use a buffer or set something in Etcher?
  • How else can I get Home Assistant installed?

I thank you in advance for any hint!


Excerpt from DMESG:
“[ 748.536276] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,global_oom,task_memcg=/user.slice/user-999.slice/[email protected]/app.slice/dbus.service,task=balena-etcher.b,pid=16575,uid=999
[ 748.536345] Out of memory: Killed process 16575 (balena-etcher.b) total-vm:42399904kB, anon-rss:23508kB, file-rss:0kB, shmem-rss:2168kB, UID:999 pgtables:632kB oom_score_adj:300
[ 761.016737] rfkill: input handler enabled
[ 762.583173] Alternate GPT is invalid, using primary GPT.
[ 762.583198] sda: sda1 sda2 sda3 sda4 sda5 sda6 sda7 sda8
[ 769.531584] rfkill: input handler disabled
[ 778.893744] rfkill: input handler enabled
[ 781.255774] audit: type=1326 audit(1681760669.623:75): auid=999 uid=999 gid=999 ses=5 subj=snap.snapd-desktop-integration.snapd-desktop-integration pid=17872 comm=“snapd-desktop-i” exe=”/snap/snapd-desktop-integration/49/usr/bin/snapd-desktop-integration" sig=0 arch=c000003e syscall=314 compat=0 ip=0x7f5d04bcc73d code=0x50000
[ 783.528750] rfkill: input handler disabled"

This guide might be helpful?

I had this problem on a different PC (a Fujitsu Esprimo Q920). It came with 8G Ram but it seems that wasn’t enough?
After many failures I switched to Linux Mint (with persistent storage) which I flash on to a 32Gig drive. I randomly selected 6 Gigs of persistent storage using Rufus as described in this video. I did this to make sure the downloads were not going into some LiveCD ram drive but to hard storage.

The other advantage of this is that Linux Mint can directly work with Balena Etcher without having to install all the dependencies on Ubuntu Live CD. Just download the linux 64 image and make it executable using (select properties directly on the file)

Finally I had to do the procedure to disable all CSM configurations in the BIOS (basically did all of these:

Disable Legacy Boot Mode and Enable UEFI (neosmart.net)

and in Mint I had to remove all boot options using both:

sudo efibootmgr


sudo efibootmgr --delete-bootnum --bootnum 0

with each of the existing options before finally doing the recommended command:

sudo efibootmgr --create --disk /dev/<drivename> --part 1 --label "HAOS" \
   --loader '\EFI\BOOT\bootx64.efi'

which in my case was sda

sudo efibootmgr --create --disk /dev/sda --part 1 --label "HAOS" \
   --loader '\EFI\BOOT\bootx64.efi'

It finally worked! Took me a whole dayof tinkering and many many tries.

Hope this helps someone.

After banging my head against the wall for hours with the etcher crashing, I realized I could use a second thumb drive and fully install Ubuntu there from the “live” one. Then boot from that one and run the etcher. That made the trick.