sdetweil / MagicMirror_scripts

Magic Mirror installation and setup scripts
341 stars 61 forks source link

Enhancement: Abort Install and Update-Scripts if mixed (32bit vs. 64bit) systems are detected #72

Closed Tom-Hirschberger closed 8 months ago

Tom-Hirschberger commented 9 months ago

Hi Sam,

had/have a lot of problems to update to the current version of MagicMirror (2.25.0) with my production system. I tried different ways with or without your scripts but nothing worked. But after some investigation i found the reason.

I switched to 64bit Bullseye very early and did not realize that the early versions boot a 64bit kernel but use a 32bit userland. Here are some outputs of my system:

If i do the same commands on a system i flashed today the output of file differs:

With version 2.23.0 of MagicMirror and node 16.x things worked but the new electron versions of 2.24.0 and 2.25.0 do not run on the 32bit userland. If i override the arch settings of npm during installation i can install the 32bit version of electron and the mirror starts. But i can not get my GPIO module to get compiled with electron-rebuild.

I do not think there is a way to get the mixed system running with the current electron version completely.

My suggestion would be to integrate a check to the install and upgrade script if the system uses 32bit userland although the arch is aarch64 and abort the installation in this case.

One additional thing i noticed is that if i use your scripts my nodejs installation gets purged even it is the correct version already. Maybe you can add a version check for node before removing it.

I do not know if i have time to create a pull request for the scripts in the next days but i will try so. If i don't i wanted to write down my results at least.

sdetweil commented 8 months ago

can u run the upgrade like this and post the somefile.txt

bash -c -x  "$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/upgrade-script.sh)" force 2>>somefile.txt
Tom-Hirschberger commented 8 months ago

I will need to setup a Test environment for this as fixing the production mirror did cost me a couple of hours.

sdetweil commented 8 months ago

understand.. I have tested all the combos pi 0 w (armv6l) install and upgrade, buster, bullseye and bookworm, both 32 and 64 bit images pi 0 2w same (this is armv7l) pi 3 64 bit is 64bit, 32 bit is hybrid, 64 bit kernel, 32 bit runtime.. set arch to armhf... with 18 or 20, npm is installed with node(using n) pi 4 both bullseye and bookworm, 32 and 64 bit

sdetweil commented 8 months ago

I found a bug in upgrade on the hybrid platform, fixed today

sdetweil commented 8 months ago

I am closing this.. if it still happens, reopen

Tom-Hirschberger commented 8 months ago

Hi Sam, thanks for the support. I will try to test in the upcoming week. If I encounter any problems I will call again.

Thanks again