Hello DietPi Users,
yesterday I’ve tried to update my RB PI 3 platform, with Home Assistant, from V.8.0.1 to the new V.8.4.1.
With the command ‘dietpi-update’ the procedure start correctly, but the process fail
and freeze at the end of installation on ‘auto purge ifupdown’ command (?).
After this the system hang and also after reboot the HA don’t start anymore…
Someone have suggestions ?
there is no DietPi release 8.4.1 existing (yet). Do you mean 8.3.1?
And WTF, you really see auto purge ifupdown??
ifupdown is one of the core components and should never, never be removed from your system as it will break your entire installation. Usually you will loose network access. Are you still able to access the system after the reboot via SSH? What have you done before? Did you removed some software component? Did you remember what could have triggered the removal?
This is not done by our patch file at least . So yeah would be good to see where this happened/what did it. If you have direct keyboard access, you can download that package on a different system, put it onto a USB pen drive, attach and install it from there without internet access.
Which RPi image was it? ARMv6, ARMv7 (32-bit) or 8 (64-bit)? Can be derived as well via:
echo $G_HW_ARCH $G_RASPBIAN
@MichaIng and @Joulinar, thanks for your answers !
I think I have not used, during last update, the ‘dietpi-update’ command…
I know that ‘ifupdown’ is a needful library and I don’t uderstand the reason
of requested purge during update…
I remember some time ago that I migrated from buster to bullseye,
but following a procedure found on the net…
The issue may depend on the source of the OS update ?
Can be this the reason of update fail ?
There is a way to recover and correct this situation, without having to reinstall everything?
Thanks for your help.
Anyway, here the login message:
the echo give me this answer :
echo $G_HW_ARCH $G_RASPBIAN
I see you still have network connection. At least there is an IP address associated and you are able to see the MOTD. Could you run following pls. Don’t confirm anything, we just like to see what will be done.
apt update && apt upgrade
If possible copy the output directly from SSH terminal and avoid doing screen prints.
As well you are on development branch. Might be good to go back to master.
the capture that I’ve attached is before the update command,
if I run ‘dietpi-update’, no error, but at the end ‘autopurge’ hang the system,
I always made a system image before launching any update,
and yesterday I recover my HA home system by restoring the SD image.
Anyway, I can make the screenshot of log of suggested command,
but only this evening, Italian time…
Thanks again !!!
If I understood your system has been restored, means it should be in the same status as it was before the dietpi-update. And try to copy the output directly from SSH terminal if possible. Doing screen prints is not always helpful.
Ah so if the autopurge (without argument) is purging ifupdown, then you should be able to solve it by marking it as manually installed, and to assure there are no dependency conflicts responsible, upgrade the package:
apt install ifupdown
one step forward: follow your sequence the system update correctly :
Only the ‘apt upgrade’, after apply the 8.4.1 patch, do not upgrade nothing…
Furthermore, HomeAssistant does not start again after reboot.
I’m checking what it can be…
After Home Assistant start up workaround
I discover an import error for the ‘libffi.so.6’ library
during HA startup.
If I try to install the lib again, with the command ‘sudo apt-get install libffi-dev’,
the system answer that is already installed with last version available (3.3-6)
Also tonight I back again to the old HA image… (with 8.0.1)
Thanks, for any other suggestions…
if possible, try to avoid screen prints, there is totally no need for. All can be copied from SSH terminal.
Anyway, you could have tried to share the HA error message.
OK, this enclosed is the log of error, when try to start home assistant on pyenv…
Can be Python 3.9.9, after the 8.4.1 patch ?
Error_HA_start.txt (2.12 KB)
A couple of questions
- Did you have rebooted your system in between?
- Are you running Debian Buster or Bullseye?
- Could you check what libraries you have existing
ls -la /usr/lib/arm-linux-gnueabihf/libffi.so.*
I found an older issue similar to the missing libffi.so.6 library https://github.com/MichaIng/DietPi/issues/4872#issuecomment-947356532
- Yes, I’ve rebooted many times
- Run Debian Bullseye
- ls -la /usr/lib/arm-linux-gnueabihf/libffi.so.*
lrwxrwxrwx 1 root root 15 20 feb 2021 /usr/lib/arm-linux-gnueabihf/libffi.so.7 → libffi.so.7.1.0
-rw-r–r-- 1 root root 30400 20 feb 2021 /usr/lib/arm-linux-gnueabihf/libffi.so.7.1.0
Umhh, no library .6 is present…
I check your github link.
Thanks for all your support and help !
follow your link I did the following command :
ln-s /usr/lib/arm-linux-gnueabihf/libffi.so.7 /usr/lib/arm-linux-gnueabihf/libffi.so.6
and seems to resolve the error and HA start again !
After 20 minutes of startup activity HA is back online,
now I’m checking that everything works as before…
Anyway, this is a big result !
Thanks again !
hmm the point is, that your HA install was looking for a Debian Buster library. But of course this one was not existing as your system is on Bullseye. And we just did cheating while creating the symbolic link.
You could try to remove the link and restart HA. Does it failing again?
Home Assistant needs to be reinstalled after a Buster => Bullseye upgrade so that Python modules are used or compiled against Bullseye library versions.
apt upgrade after dietpi-update indeed does nothing since the second implies the first. It was meant the other way round so that you have more control over the APT package upgrades.
I’ve tried to update in this way:
apt install ifupdown (just to sign the packet for manual install and block the purge)
dietpi-update 1 (to install the new patch 8.4.1-dev, as suggested here before)
reboot (to load the fresh system updated)
sudo dietpi-software reinstall 157 (to reinstall HA)
This last command start correctly, but give me one error related to
‘systemd-timesyncd.service’ not found !?
Anyway has not been one blocking error…
After this, the reinstall procedure work correctly until the end,
wait 20 minutes for build all dependencies and home assistant start again,
now without problems…
Now it seems everything works again !
One more question:
How I can back and downgrade to regular DietPi distribution V.8.3 ?
according our blog post https://dietpi.com/blog/?p=811 (2.2.4 SOFTWARE MIGRATIONS), following would need to be reinstalled after Buster to Bullseye upgrade
apt install fdisk systemd-timesyncd
To go back to DietPi master branch
G_CONFIG_INJECT 'DEV_GITBRANCH=' 'DEV_GITBRANCH=master' /boot/dietpi.txt
I’ve used the suggested link to upgrade my image to BullsEye,
probably I forget the systemd-timesyncd install step…
OK, perfect, I try to go back to regular distribution,
I don’t remember the reason of this choice…