tinker2much
Posts: 73
Joined: Wed Jun 20, 2018 12:38 am

balenaEtcher RUNNING ON a pi4! [WORKING]

Fri Oct 25, 2019 12:07 am

(tinker2much - Edited the title 2019/11/22 to reflect @futurejone's [WORKING] solution - see the later posts)

I've been playing with my pi4 4GB, trying to make it into a possible daily driver desktop machine. (Of course, everyone has a different pattern of use, and my idea of a sufficient desktop is surely different than other peoples.) I was struck by how many of the apps that I have on my Macs are to facilitate my play with raspberry pis - qbittorrent to download rpi images, VNC Viewer to get a desktop on pis, and Etcher to burn the images. But I never had to run those applications ***ON*** a pi before.

I have already had to use several methods to get these favorite apps working on that lovely new pi4:

Anything that's available via "sudo apt install" was easy (many obscure old utilities and even qbittorrent).

I downloaded VNC Viewer from the RealVNC site and installed it. Also easy.

But what about balenaEtcher? (and to forestall the helpful posts - I know how to use dd - I just like the convenience of a graphical application). I can find Windows and Mac versions and something called an AppImage for Linux, but that too seems to be for x86 or x64. (On my ex-Chromebook, which has an x86 chip, and which is currently running the Raspberry Pi Desktop - Buster version, I've installed Wine and run WIndows versions of some other applications, but I believe that tack won't work here on a real pi, on arm.)

So, can anyone suggest any other way to get balenaEtcher running on a Raspberry Pi?
Last edited by tinker2much on Fri Nov 22, 2019 6:29 pm, edited 1 time in total.

User avatar
HawaiianPi
Posts: 4876
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: balenaEtcher RUNNING ON a pi4?

Fri Oct 25, 2019 1:36 am

I seem to recall a thread where someone either was working on building Etcher for the Pi, or had already done so (sorry, don't have a link).
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

klricks
Posts: 6622
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: balenaEtcher RUNNING ON a pi4?

Fri Oct 25, 2019 1:45 am

Here is the thread about installing etcher on the RPi: https://www.raspberrypi.org/forums/view ... 1&t=187897
Unless specified otherwise my response is based on the latest and fully updated Raspbian Buster w/ Desktop OS.

User avatar
HawaiianPi
Posts: 4876
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: balenaEtcher RUNNING ON a pi4?

Fri Oct 25, 2019 1:54 am

klricks wrote:
Fri Oct 25, 2019 1:45 am
Here is the thread about installing etcher on the RPi: ...
There was also this one, but it didn't end well (flame war and user ban). :shock: :?

My "portable" etcher port for Rpi 3b+
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

tinker2much
Posts: 73
Joined: Wed Jun 20, 2018 12:38 am

Re: balenaEtcher RUNNING ON a pi4?

Sat Oct 26, 2019 4:44 pm

I'm going to try building balenaEtcher on my pi4, following the links and clues mentioned above. One of them leads to the "Contributing" document which has some initial setup information. https://github.com/balena-io/etcher/blo ... IBUTING.md

I cloned their github project and started setting up prerequisites. I was doing OK until I got to "Installing npm dependencies" via "make electron-develop" which failed because of a missing script.

I've signed up for the balena form and posted about this issue.

I'm an ex-programmer, but I've never worked with node or Electron. This will be a good learning experience. (That's the positive view. On the negative but more colorful side, I actually feel like an explorer going off to the arctic a century or two ago, following other explorers who kept disappearing, only to be found frozen decades later...)

I will report back on my progress.

User avatar
Botspot
Posts: 205
Joined: Thu Jan 17, 2019 9:47 pm
Location: Texas

Re: balenaEtcher RUNNING ON a pi4?

Mon Oct 28, 2019 3:36 pm

HawaiianPi wrote:
Fri Oct 25, 2019 1:54 am
There was also this one, but it didn't end well (flame war and user ban). :shock: :?

My "portable" etcher port for Rpi 3b+
THIS WORKS ON MY PI4!!!!

The instructional video was not English though, and who wants to watch a video anyway, so I wrote down instructions:
  1. Download this using your browser.
    Screenshot from 2019-10-28 10-02-13.png
    Screenshot from 2019-10-28 10-02-13.png (5.16 KiB) Viewed 2953 times
    It should save "linux-armv7l-unpacked.zip" to your Downloads folder.
  2. Right-click the file, and select "Extract here".
    Screenshot from 2019-10-28 10-22-36.png
    Screenshot from 2019-10-28 10-22-36.png (15.23 KiB) Viewed 2953 times
    It should extract to /home/pi/Downloads/linux-armv7l-unpacked.
  3. Then run Etcher as root to avoid the authentication dialog box:

    Code: Select all

    sudo ~/Downloads/linux-armv7l-unpacked/balena-etcher-electron
Here's what it looks like:
2019-10-28-180119_1280x1024_scrot-min.png
2019-10-28-180119_1280x1024_scrot-min.png (221.34 KiB) Viewed 2846 times
Edit: added screenshot
Last edited by Botspot on Mon Oct 28, 2019 11:12 pm, edited 1 time in total.
My doctor told me my brain is as useful as a Raspberry Pi. Is that a compliment?

Heater
Posts: 13913
Joined: Tue Jul 17, 2012 3:02 pm

Re: balenaEtcher RUNNING ON a pi4?

Mon Oct 28, 2019 3:59 pm

Do you have instructions for doing that from original Balena sources?

I'm not happy downloading and running random unkown executables from random unlown places. Especially if they are then to be used to install operating systems.

Call me paranoid but it's a security issue.
Memory in C++ is a leaky abstraction .

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 24162
Joined: Sat Jul 30, 2011 7:41 pm

Re: balenaEtcher RUNNING ON a pi4?

Mon Oct 28, 2019 5:31 pm

HawaiianPi wrote:
Fri Oct 25, 2019 1:54 am
klricks wrote:
Fri Oct 25, 2019 1:45 am
Here is the thread about installing etcher on the RPi: ...
There was also this one, but it didn't end well (flame war and user ban). :shock: :?

My "portable" etcher port for Rpi 3b+
I'd forgotten that thread. He did really go off on one now that I remember! Shame that some people fall straight in to insults as soon as any sort of criticism is forthcoming.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I think it’s wrong that only one company makes the game Monopoly.” – Steven Wright

tinker2much
Posts: 73
Joined: Wed Jun 20, 2018 12:38 am

Re: balenaEtcher RUNNING ON a pi4?

Mon Oct 28, 2019 8:35 pm

I've made some halting progress with some help from the balenaEtcher forum. Still working on prerequisites and getting the right versions of things.

Here's a link to that thread https://forums.balena.io/t/trying-to-bu ... pi-4/40213, if anyone cares to watch my ignorant stumbling steps.

As I said, I'm a node/electron/gui novice, even though I coded professionally and have written a lot of utilities and systems full of brute data mashing code.

This discussion might be more suited to the github project, and if the balena forum suggests I move it to there I will. I've gotten myself an account on github just in case.

tinker2much
Posts: 73
Joined: Wed Jun 20, 2018 12:38 am

Re: balenaEtcher RUNNING ON a pi4?

Mon Oct 28, 2019 8:40 pm

If I succeed, I will carefully document the process so others can create a working Etcher from the official source.

Although, it would be even better if I could persuade the Etcher folks to do regular builds for the pi and offer the result on their site. After all, they actually know what they're doing ;-)

User avatar
Botspot
Posts: 205
Joined: Thu Jan 17, 2019 9:47 pm
Location: Texas

Re: balenaEtcher RUNNING ON a pi4?

Mon Oct 28, 2019 10:49 pm

Heater wrote:
Mon Oct 28, 2019 3:59 pm
Especially if they are then to be used to install operating systems.
Yes, the filename is misleading. But it's just a electron build, similar to Scratch 3.

I'm not 100% sure it's safe, (after all, it's not my code), but it worked fine for me.
Heater wrote: I'm not happy downloading and running random unkown executables from random unlown places.
But we do know what place it came from. It came from that thread that ended in a flame war. Sorry I could have made that more clear. I'll add a screenshot soon.
Heater wrote: Call me paranoid but it's a security issue.
Totally understand. But rest assured it worked for me.
tinker2much wrote: If I succeed, I will carefully document the process so others can create a working Etcher from the official source.
@tinke4r2much, I'm scratching my head as to why you seem to be reinventing the wheel.
My doctor told me my brain is as useful as a Raspberry Pi. Is that a compliment?

pilab
Posts: 7
Joined: Mon Oct 28, 2019 10:59 pm

Re: balenaEtcher RUNNING ON a pi4?

Mon Oct 28, 2019 11:01 pm

I have it working a long time ago on my rpi3...and it does work on rpi4

https://www.youtube.com/watch?v=tG_UQjNrWJ4&t=115s

Heater
Posts: 13913
Joined: Tue Jul 17, 2012 3:02 pm

Re: balenaEtcher RUNNING ON a pi4?

Mon Oct 28, 2019 11:02 pm

Botspot
But we do know what place it came from. It came from that thread that ended in a flame war. Sorry I could have made that more clear.
We know nothing. A name on a forum that could be any one. A link to a file Google Drive that could be anything.
Totally understand. But rest assured it worked for me.
Well, if that Etcher were hacked up in such a way as to install back doors into the OS it is running from or more cunningly the OS image that it is writing then I'm sure it would appear to work just fine so that it can get on with it's job of compromising your systems.
I'm scratching my head as to why you seem to be reinventing the wheel.
The wheel is not invented unless we know how to do it. A ready made executable does not do that.

Also it solves all the security concerns I mention above.
Memory in C++ is a leaky abstraction .

pilab
Posts: 7
Joined: Mon Oct 28, 2019 10:59 pm

Re: balenaEtcher RUNNING ON a pi4?

Mon Oct 28, 2019 11:06 pm

I have it working a long time ago on my rpi3...and it does work on rpi4

https://www.youtube.com/watch?v=tG_UQjNrWJ4&t=115s

pilab
Posts: 7
Joined: Mon Oct 28, 2019 10:59 pm

Re: balenaEtcher RUNNING ON a pi4?

Mon Oct 28, 2019 11:17 pm

I forget how I did it, but i did it twice, this is a late 2018 build. the other one was more recent and I believe than 64bit. but etcher didnt add the new features I like, so I Will not update my build until we get backup features from balena devs.

The instructions are on the balena repo, its just following them.
I could´t achieve a .deb because the electron builder (I think it was that) crash on the process... so it will remain as a portable program.

ohh, Ive read the old posts... yeah, thats was me (I am salvalie)
Ive dindt went for an odroid, but Ive got a rockpi4, and I love it.
anyway, rpi4 has a good value/price ratio, and a really good mesa driver. So, I am on the rpi side again.

about my random upload.. guys, I did it for all us. As you believe in balena etchers... believe on rpi community... because thats was why I get wild mad about this forum. And again, I am on this forum again just for asking support on the kernel for some topic I am interested right now, Ive posted here because I read the title and I have a recent video about it. but I will not post anything of my channel here again, never, not even one word. It happened not only on that post...the same happened on wine on arm. so, I dont care anymore about it.

there is an app that I am really interested on compile, onlyoffice. its a more fidelity open source ms office alternative, but right now I Couldnt achieve it. I hope someone could do that.

Heater
Posts: 13913
Joined: Tue Jul 17, 2012 3:02 pm

Re: balenaEtcher RUNNING ON a pi4?

Tue Oct 29, 2019 8:49 am

pilab, salvalie, whoever you are.
...about my random upload.. guys, I did it for all us. As you believe in balena etchers... believe on rpi community... because thats was why I get wild mad about this forum
Trust me, we are very grateful for every little contribution that comes by here. Be it hints, tips, advice, code, new programs whatever. There is power in the community.

This is nothing to do with believing in Etcher of believing in the RPi community.

This is about security. Avoiding viruses, trojans, net work intrusion, spyware, ransomware, malware. It's about keeping the bad guys out.

It has long been the case that downloading unknown executables from unknown sources of no verifiable provenance or accountability is a sure way to find yourself subject to any and all of the above.

That is not to say that I/we don't trust you or suggest that you have ill intent. On the other hand we have no reason that we should do so.

This is 2019, malware and bad actors are rampant, everyone should know be taking care by now.

Please, do not get mad. Try to understand the concerns.

https://www.bbc.com/news/technology-48743043
https://www.zdnet.com/article/linux-mal ... ocurrency/
https://www.tobsan.se/update/2017/11/06/rpi-trojan.html
Memory in C++ is a leaky abstraction .

jcyr
Posts: 501
Joined: Sun Apr 23, 2017 1:31 pm
Location: Atlanta

Re: balenaEtcher RUNNING ON a pi4?

Tue Oct 29, 2019 1:52 pm

A public Github repository with full source code and build instructions will go a long way towards establishing trust.

I've been itching to use a GUI based app for SD card imaging directly on the Pi. I even purchase a USB<->SD adapter for it. But currently it's all command line based. Why bother with a desktop if all you're going to do with it is run commands from a terminal window???
It's um...uh...well it's kinda like...and it's got a bit of...

pilab
Posts: 7
Joined: Mon Oct 28, 2019 10:59 pm

Re: balenaEtcher RUNNING ON a pi4?

Tue Oct 29, 2019 2:16 pm

Indeed, source code its always more secure by default than simply binaries. But we trust on people than claim than that souce code its clean,because we dont read source code of every app we use.

It would be great if someone do a how to compile this app... i forget how I did it because it took me 2 weeks to figured out... and that was on late 2018... I compile one project per day, so that its out of my mind ...a long time ago.
Id like etcher because dd its a bit annoying for burning kmages, but there always be dd has a simple terminal alternative.

The all thing of npm and electron was a terrible experience, while I achieve a 64 bit etcher on manjaro arm 2 months ago I forget how to build the package...well, not a proper package, but the portable folder at least.

Heater
Posts: 13913
Joined: Tue Jul 17, 2012 3:02 pm

Re: balenaEtcher RUNNING ON a pi4?

Tue Oct 29, 2019 3:45 pm

Of course nobody reads the source code of everything they run.

In fact we all run code that we essentially know nothing about all the time. Be it the Raspbian OS or whatever. In my case I'm just now using node.js, the Rust compiler, then NATS messaging system, the Cockroach database and a lot more. Most of which is supplied as binary executables.

I have to put my trust into the suppliers of that software. They are large, well known, ongoing projects maintained by companies and organizations that have a reputation to keep up. I trust they are keeping an eye on their security and what gets into their products.

That is very different from simply snagging some unknown code, from a random google drive or whatever link. Offered by someone you don;t know from Adam.

It's all about provenance and accountability as I said above.

In the case of VS Code it would be great if someone put up a github repo with instructions for fetching the upstream code and getting it to run on the Pi. Perhaps with any little patches to configs or sources that are required..
Memory in C++ is a leaky abstraction .

pilab
Posts: 7
Joined: Mon Oct 28, 2019 10:59 pm

Re: balenaEtcher RUNNING ON a pi4?

Tue Oct 29, 2019 5:01 pm

Yeah, I follow this instructions. https://github.com/balena-io/etcher/blo ... IBUTING.md , then i dont remeber how to pack it, but someone more used to npm and electro should know it. It would be better than a portable program, because my build weights more than 200 mbs, and thats a bit too much for just a burning program. And it take 5 to 10 secs to load everything on ram, because of sd card read speeds. There are no hacks needed for building etcher, but maybe something had to be done for pack it. I remeber something that was x86 only at that time on electro...but, dont remeber it exactly


I find my issue when trying to pack my build https://github.com/electron/electron/issues/15984

tinker2much
Posts: 73
Joined: Wed Jun 20, 2018 12:38 am

Re: balenaEtcher RUNNING ON a pi4?

Tue Oct 29, 2019 11:52 pm

I've encountered errors but I'm still pursuing this.

It seems like some part of the build is misidentifying the architecture to build for.

I 'm getting help from the balena forum, and this particular issue is being referred to higher authorities:
"I’ll link this thread to a member of the device support team who may have more insight about how architectures report in the rpi4..."

pilab
Posts: 7
Joined: Mon Oct 28, 2019 10:59 pm

Re: balenaEtcher RUNNING ON a pi4?

Wed Oct 30, 2019 2:11 am

Could you compile npm with proper rpi4 flags? Maybe thats causing trouble... all raspbian repo has retrocompatibility with armv6 (rpi1)

Did you achieve to start the program with npm start?

Heater
Posts: 13913
Joined: Tue Jul 17, 2012 3:02 pm

Re: balenaEtcher RUNNING ON a pi4?

Wed Oct 30, 2019 9:42 am

I see no reason why one would need to be compiling node or npm for the Pi.

Just install it using the node version manager, NVM, a simple script you can get from here: https://github.com/nvm-sh/nvm

Which will in turn install the latest version of node:

$ nvm install node
Memory in C++ is a leaky abstraction .

jj_0
Posts: 108
Joined: Wed Jul 11, 2012 7:07 am

Re: balenaEtcher RUNNING ON a pi4?

Wed Oct 30, 2019 12:36 pm

An alternative for a disk image writer with GUI would be to install gnome-disks:

Code: Select all

sudo apt install gnome-disk-utility
Or via Add / Remove Software and search for 'gnome-disk-utility':
Image

You can then write an image to a device by using the 'Restore Disk Image' menu option:
Image

I tested it writing an 8GB image to an SD-card and it worked fine. You do need some patience though, it did seem to hang (or at least it didn't update status) after the first 7.3MB but then proceeded OK.

The 'Disk Image Writer' menu option when right-clicking on a .img file in the File Manager doesn't seem to work though.

But if you change the following line in /usr/share/applications/gnome-disk-image-mounter.desktop:

Code: Select all

Exec=gnome-disks --restore-disk-image %U
to

Code: Select all

Exec=gnome-disks --restore-disk-image %f
it also works.

tinker2much
Posts: 73
Joined: Wed Jun 20, 2018 12:38 am

Re: balenaEtcher RUNNING ON a pi4?

Sat Nov 02, 2019 11:12 pm

I continue to get suggestions from the balena forum, and (with frequent interruptions from non-computer life) I continue to try to follow them.

There is such a familiar feel to this - you know that one simple suggestion might make the whole darn thing work, and you keep hoping that the current one is THE ONE. But you never know how many "that wasn't it"s you have to go through first.

It's a good thing that I'm basically an optimist.

Return to “Off topic discussion”