Cancel update, if error prompts, then run:
sync
sleep 5
dietpi-update 1 # Do NOT reboot, when asked, reboot later
systemctl restart dietpi-ramdisk
sync
sleep 5
reboot
from v6.19.7 to v6.20.6
Log file contents:
chmod: cannot access '/etc/profile.d/dietpi-*.sh': No such file or directory
@tenrek
Thanks for the report.
Does it work when simply rerunning dietpi-update 1
?
Otherwise: > /etc/profile.d/dietpi-unsupported_terminal.sh
But the second solution is actually not good. This error means that for some strange reason, even that new DietPi code is laid out on the RAMdisk, even forced to sync
(if disk async hold it back), still somehow the old DietPi-Update code is loaded.
If dietpi-update 1
results in the same issue, can you paste output of:
grep 'chmod -R +x' /DietPi/dietpi/dietpi-update
So we can check that really the old code is still on disk. If this is the case, run sync
, wait for some seconds and recheck the grep
command above.
@MichaIng
Thanks for helping me :)
dietpi-update 1
resolved my problem :)
@tenrek
Okay that is good. Thanks for reporting back.
I reopened, since we should fix this as well shortly.
Currently running bash -x /DietPi/dietpi/dietpi-update 1
to follow the exact update path from v6.17.20 to v6.20.6...
Damn... the -x
only applies to parent script, but not to subshells (patch_file + nested update)...
But aside that, unable to replicate on VM, no chmod: cannot access '/etc/profile.d/dietpi-*.sh'
error, everything runs through as expected ๐ค.
[ INFO ] DietPi-Update | Patching 6.17.20 to 6.18
+ unset Clean_Process_Animation
+ unset Status_Ok
+ unset Status_Failed
+ unset Print_Output_String
+ /DietPi/dietpi/patch_file 17
[ OK ] DietPi-Patchfile | DietPi has applied a new G_DIETPI_INSTALL_STAGE system to the device.
[ OK ] DietPi-Patchfile | Re-running DietPi-Update, to apply this new system
[ SUB2 ] DietPi-Update > Checking for DietPi updates
[ INFO ] DietPi-Update | Checking mirror: https://raw.githubusercontent.com/Fourdee/DietPi/master/dietpi/server_version-6
[ OK ] DietPi-Update | Using update server: https://raw.githubusercontent.com/Fourdee/DietPi/master/dietpi/server_version-6
[ OK ] DietPi-Update | Update available
[ INFO ] DietPi-Update | Current version : v6.17.20
[ INFO ] DietPi-Update | Latest version : v6.20.6
[ OK ] DietPi-Update | DietPi-Userdata validation: /mnt/dietpi_userdata
[ OK ] DietPi-Update | Free space check: path=/ | available=6155 MB | required=100 MB
[ OK ] DietPi-Update | Update is being applied, please wait...
[ SUB3 ] DietPi-Services > stop
[ OK ] DietPi-Update | wget https://raw.githubusercontent.com/Fourdee/DietPi/master/dietpi/pre-patch_file -O pre-patch_file
DietPi-Pre-patch
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
[ INFO ] Applying critical pre-patches
DietPi-Pre-patch
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
[ INFO ] Completed pre-patches with exit code: 0
[ OK ] DietPi-Update | APT update, please wait...
Ign:1 https://cdn-aws.deb.debian.org/debian stretch InRelease
Hit:2 https://cdn-aws.deb.debian.org/debian stretch-updates InRelease
Hit:3 https://cdn-aws.deb.debian.org/debian-security stretch/updates InRelease
Hit:4 https://cdn-aws.deb.debian.org/debian stretch-backports InRelease
Hit:5 https://cdn-aws.deb.debian.org/debian stretch Release
Reading package lists...
[ OK ] DietPi-Update | G_AGUP
[ OK ] DietPi-Update | APT upgrade, please wait...
Reading package lists...
Building dependency tree...
Reading state information...
Calculating upgrade...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
[ OK ] DietPi-Update | G_AGUG
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 119 0 119 0 0 296 0 --:--:-- --:--:-- --:--:-- 297
100 2493k 100 2493k 0 0 1191k 0 0:00:02 0:00:02 --:--:-- 1872k
[ OK ] DietPi-Update | Unpack update archive
[ OK ] DietPi-Update | Copy DietPi core files to RAMdisk
[ OK ] DietPi-Update | Copy DietPi rootfs files in place
[ OK ] DietPi-Update | Set execute permissions for DietPi scripts
[ OK ] DietPi-Set_software | Connection test: https://raw.githubusercontent.com/Fourdee/DietPi/master/dietpi.txt
[ OK ] DietPi-Set_software | Patching dietpi.txt
[ OK ] DietPi-Set_software | Downloading current dietpi.txt
[ OK ] DietPi-Set_software | dietpi.txt verification completed
[ OK ] verify_dietpi.txt | Completed
[ SUB2 ] DietPi-Update > Running incremental patching
...
Next run:
Run now to update DietPi (from v6.17.20 to v6.20.6).
sed -i 's|/DietPi/dietpi/patch_file|bash -x /DietPi/dietpi/patch_file|g' /DietPi/dietpi/dietpi-update
[ INFO ] DietPi-Update | Patching 6.17.20 to 6.18
+ INPUT=17
+ /DietPi/dietpi/func/dietpi-obtain_hw_model
+ . /DietPi/dietpi/func/dietpi-globals
++ [[ -z xterm ]]
++ [[ xterm == \u\n\k\n\o\w\n ]]
++ G_PROGRAM_NAME=
++ G_DEBUG=0
++ [[ -z '' ]]
++ G_USER_INPUTS=0
++ [[ -t 0 ]]
++ G_USER_INPUTS=1
++ G_DIETPI_INSTALL_STAGE=-2
++ [[ -f /DietPi/dietpi/.install_stage ]]
++ G_DIETPI_INSTALL_STAGE=1
++ G_GITBRANCH=master
++ G_GITOWNER=Fourdee
++ G_DIETPI_VERSION_CORE=6
++ G_DIETPI_VERSION_SUB=20
++ G_DIETPI_VERSION_RC=0
++ [[ -f /DietPi/dietpi/.version ]]
+++ sed -n 1p /DietPi/dietpi/.version
++ [[ #!/bin/bash == \#\!\/\b\i\n\/\b\a\s\h ]]
++ . /DietPi/dietpi/.version
+++ G_DIETPI_VERSION_CORE=6
+++ G_DIETPI_VERSION_SUB=17
+++ G_DIETPI_VERSION_RC=20
+++ G_GITBRANCH=master
+++ G_GITOWNER=Fourdee
++ G_FP_DIETPI_USERDATA=/mnt/dietpi_userdata
++ G_DIETPI_SERVICES_DISABLE=0
++ G_HW_MODEL=0
++ G_HW_MODEL_DESCRIPTION=NULL
++ G_HW_ARCH=0
+++ uname -m
++ G_HW_ARCH_DESCRIPTION=x86_64
++ G_HW_CPUID=0
+++ nproc --all
++ G_HW_CPU_CORES=4
++ G_DISTRO=0
++ G_DISTRO_NAME=NULL
++ [[ -f /DietPi/dietpi/.hw_model ]]
+++ sed -n 1p /DietPi/dietpi/.hw_model
++ G_HW_MODEL=20
+++ sed -n 2p /DietPi/dietpi/.hw_model
++ G_HW_MODEL_DESCRIPTION='Virtual Machine (x86_64)'
+++ sed -n 6p /DietPi/dietpi/.hw_model
++ G_HW_ARCH=10
+++ sed -n 9p /DietPi/dietpi/.hw_model
++ G_HW_CPUID=0
+++ sed -n 3p /DietPi/dietpi/.hw_model
++ G_DISTRO=4
++ (( 4 == 3 ))
++ (( 4 == 4 ))
++ G_DISTRO_NAME=stretch
++ G_INIT_ALLOW_CONCURRENT=0
++ G_INIT_WAIT_CONCURRENT=5
++ G_CHECK_ROOT_USER_VERIFIED=1
++ G_CHECK_ROOTFS_RW_VERIFIED=1
++ alias 'sudo=sudo '
++ alias dietpi-process_tool=/DietPi/dietpi/dietpi-process_tool
++ alias dietpi-letsencrypt=/DietPi/dietpi/dietpi-letsencrypt
++ alias dietpi-autostart=/DietPi/dietpi/dietpi-autostart
++ alias dietpi-cron=/DietPi/dietpi/dietpi-cron
++ alias dietpi-launcher=/DietPi/dietpi/dietpi-launcher
++ alias dietpi-cleaner=/DietPi/dietpi/dietpi-cleaner
++ alias dietpi-morsecode=/DietPi/dietpi/dietpi-morsecode
++ alias dietpi-sync=/DietPi/dietpi/dietpi-sync
++ alias dietpi-backup=/DietPi/dietpi/dietpi-backup
++ alias dietpi-bugreport=/DietPi/dietpi/dietpi-bugreport
++ alias dietpi-services=/DietPi/dietpi/dietpi-services
++ alias dietpi-config=/DietPi/dietpi/dietpi-config
++ alias dietpi-software=/DietPi/dietpi/dietpi-software
++ alias dietpi-update=/DietPi/dietpi/dietpi-update
++ alias dietpi-drive_manager=/DietPi/dietpi/dietpi-drive_manager
++ alias dietpi-logclear=/DietPi/dietpi/func/dietpi-logclear
++ alias dietpi-survey=/DietPi/dietpi/dietpi-survey
++ alias dietpi-explorer=/DietPi/dietpi/dietpi-explorer
++ alias cpu=/DietPi/dietpi/dietpi-cpuinfo
++ alias '1337=echo Indeed, you are =\)'
++ [[ -d /var/lib/dietpi/dietpi-software/installed/dietpi-nordvpn ]]
++ [[ -f /opt/retropie/supplementary/emulationstation/emulationstation ]]
++ [[ -f /usr/local/games/opentyrian/run ]]
++ [[ -f /DietPi/dietpi/misc/dietpi-justboom ]]
++ alias dietpi-justboom=/DietPi/dietpi/misc/dietpi-justboom
++ [[ -f /mnt/dietpi_userdata/dxx-rebirth/run.sh ]]
++ [[ -f /usr/share/applications/kodi.desktop ]]
++ [[ -f /etc/systemd/system/dietpi-cloudshell.service ]]
++ [[ -f /var/www/owncloud/occ ]]
++ [[ -f /var/www/nextcloud/occ ]]
++ G_WHIP_DEFAULT_ITEM=
++ G_WHIP_SIZE_X_MAX=0
++ G_WHIP_BUTTON_OK_TEXT=
++ G_WHIP_BUTTON_CANCEL_TEXT=
++ G_WHIP_MENU_ARRAY=('NULL' 'NULL')
++ G_WHIP_CHECKLIST_ARRAY=('NULL' 'NULL' 'off')
++ G_WHIP_RETURNED_VALUE=
++ G_ERROR_HANDLER_EXITCODE=0
++ G_ERROR_HANDLER_EXITCODE_RETURN=0
++ G_ERROR_HANDLER_COMMAND=
++ G_ERROR_HANDLER_NO_FAIL=0
++ G_ERROR_HANDLER_INFO_ONLY=0
++ G_ERROR_HANDLER_ONERROR_EXIT=1
++ G_ERROR_HANDLER_ONERROR_FPLOGFILE=
++ G_ERROR_HANDLER_RETRY=0
++ G_FP_LOG_APT=/var/tmp/dietpi/logs/dietpi-software_apt.log
++ G_PROMPT_BACKUP_DISABLED=0
++ G_THREADING_ENABLED=1
++ G_THREAD_COUNT=-1
++ [[ -z '' ]]
++ G_THREAD_COMMAND=()
++ (( 0 == 1 ))
++ :
+ G_PROGRAM_NAME=DietPi-Patchfile
+ export G_PROMPT_BACKUP_DISABLED=1
+ G_PROMPT_BACKUP_DISABLED=1
+ G_INIT
+ (( ! 0 ))
+ local timer=0
+ [[ -d /tmp/DietPi-Patchfile ]]
+ disable_error=1
+ G_CHECK_VALIDINT 0
+ local return_value=1
+ local input=0
+ local min=
+ local max=
+ local disable_error=1
+ [[ 0 =~ ^-?[0-9]+$ ]]
+ [[ '' =~ ^-?[0-9]+$ ]]
+ return_value=0
+ unset disable_error
+ return 0
+ export HIERARCHY=1
+ HIERARCHY=1
+ (( 0 == 1 ))
+ export LANG=en_GB.UTF-8
+ LANG=en_GB.UTF-8
+ export LC_ALL=en_GB.UTF-8
+ LC_ALL=en_GB.UTF-8
+ trap G_EXIT EXIT
+ [[ -n DietPi-Patchfile ]]
+ mkdir -p /tmp/DietPi-Patchfile
+ cd /tmp/DietPi-Patchfile
+ (( 0 == 1 ))
+ export G_DIETPI_VERSION_SUB=17
+ G_DIETPI_VERSION_SUB=17
+ (( 17 < 17 ))
+ [[ -f /DietPi/dietpi/.update_stage ]]
+ rm -f /DietPi/dietpi/.update_stage /boot/dietpi/.update_stage
+ sync
+ echo ''
+ G_DIETPI-NOTIFY 0 'DietPi has applied a new G_DIETPI_INSTALL_STAGE system to the device.'
+ ainput_string=("$@")
+ local ainput_string
+ local output_string=
+ local 'bracket_l=\e[0m\e[90m[\e[0m'
+ local 'bracket_r=\e[0m\e[90m]\e[0m'
+ (( 0 == -1 ))
+ (( 0 == -2 ))
+ (( 0 == 0 ))
+ Status_Ok
+ Clean_Process_Animation
+ [[ -t 0 ]]
+ [[ -w /tmp/dietpi-process.pid ]]
+ output_string+='\r\e[K'
+ output_string+='\e[0m\e[90m[\e[0m\e[32m OK \e[0m\e[90m]\e[0m '
+ ainput_string+=('\n')
+ Print_Output_String 1
+ (( 1 == 1 ))
+ [[ -n DietPi-Patchfile ]]
+ output_string+='\e[90mDietPi-Patchfile | \e[0m'
+ local i=0
+ (( i=1 ))
+ (( i<3 ))
+ output_string+='DietPi has applied a new G_DIETPI_INSTALL_STAGE system to the device.'
+ (( i++ ))
+ (( i<3 ))
+ output_string+='\n'
+ (( i++ ))
+ (( i<3 ))
+ echo -ne '\r\e[K\e[0m\e[90m[\e[0m\e[32m OK \e[0m\e[90m]\e[0m \e[90mDietPi-Patchfile | \e[0mDietPi has applied a new G_DIETPI_INSTALL_STAGE system to the device.\n\e[0m'
[ OK ] DietPi-Patchfile | DietPi has applied a new G_DIETPI_INSTALL_STAGE system to the device.
+ unset Clean_Process_Animation
+ unset Status_Ok
+ unset Status_Failed
+ unset Print_Output_String
+ (( 1 == 1 ))
+ echo 2
+ Restart_DietPi_Update
+ G_VERSIONDB_SAVE
+ cat
+ cd /tmp
+ rm -R /tmp/DietPi-Update /tmp/DietPi-Patchfile
+ G_DIETPI-NOTIFY 0 'Re-running DietPi-Update, to apply this new system'
+ ainput_string=("$@")
+ local ainput_string
+ local output_string=
+ local 'bracket_l=\e[0m\e[90m[\e[0m'
+ local 'bracket_r=\e[0m\e[90m]\e[0m'
+ (( 0 == -1 ))
+ (( 0 == -2 ))
+ (( 0 == 0 ))
+ Status_Ok
+ Clean_Process_Animation
+ [[ -t 0 ]]
+ [[ -w /tmp/dietpi-process.pid ]]
+ output_string+='\r\e[K'
+ output_string+='\e[0m\e[90m[\e[0m\e[32m OK \e[0m\e[90m]\e[0m '
+ ainput_string+=('\n')
+ Print_Output_String 1
+ (( 1 == 1 ))
+ [[ -n DietPi-Patchfile ]]
+ output_string+='\e[90mDietPi-Patchfile | \e[0m'
+ local i=0
+ (( i=1 ))
+ (( i<3 ))
+ output_string+='Re-running DietPi-Update, to apply this new system'
+ (( i++ ))
+ (( i<3 ))
+ output_string+='\n'
+ (( i++ ))
+ (( i<3 ))
+ echo -ne '\r\e[K\e[0m\e[90m[\e[0m\e[32m OK \e[0m\e[90m]\e[0m \e[90mDietPi-Patchfile | \e[0mRe-running DietPi-Update, to apply this new system\n\e[0m'
[ OK ] DietPi-Patchfile | Re-running DietPi-Update, to apply this new system
+ unset Clean_Process_Animation
+ unset Status_Ok
+ unset Status_Failed
+ unset Print_Output_String
+ /DietPi/dietpi/dietpi-update 1
[ SUB2 ] DietPi-Update > Checking for DietPi updates
[ INFO ] DietPi-Update | Checking mirror: https://raw.githubusercontent.com/Fourdee/DietPi/master/dietpi/server_version-6
[ OK ] DietPi-Update | Using update server: https://raw.githubusercontent.com/Fourdee/DietPi/master/dietpi/server_version-6
[ OK ] DietPi-Update | Update available
[ INFO ] DietPi-Update | Current version : v6.17.20
[ INFO ] DietPi-Update | Latest version : v6.20.6
[ OK ] DietPi-Update | DietPi-Userdata validation: /mnt/dietpi_userdata
[ OK ] DietPi-Update | Free space check: path=/ | available=6155 MB | required=100 MB
[ OK ] DietPi-Update | Update is being applied, please wait...
[ SUB3 ] DietPi-Services > stop
[ OK ] DietPi-Update | wget https://raw.githubusercontent.com/Fourdee/DietPi/master/dietpi/pre-patch_file -O pre-patch_file
DietPi-Pre-patch
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
[ INFO ] Applying critical pre-patches
DietPi-Pre-patch
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
[ INFO ] Completed pre-patches with exit code: 0
[ OK ] DietPi-Update | APT update, please wait...
Ign:1 https://cdn-aws.deb.debian.org/debian stretch InRelease
Hit:2 https://cdn-aws.deb.debian.org/debian stretch-updates InRelease
Hit:3 https://cdn-aws.deb.debian.org/debian-security stretch/updates InRelease
Hit:4 https://cdn-aws.deb.debian.org/debian stretch-backports InRelease
Hit:5 https://cdn-aws.deb.debian.org/debian stretch Release
Reading package lists...
[ OK ] DietPi-Update | G_AGUP
[ OK ] DietPi-Update | APT upgrade, please wait...
Reading package lists...
Building dependency tree...
Reading state information...
Calculating upgrade...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
[ OK ] DietPi-Update | G_AGUG
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 119 0 119 0 0 376 0 --:--:-- --:--:-- --:--:-- 376
100 2493k 100 2493k 0 0 1240k 0 0:00:02 0:00:02 --:--:-- 2737k
[ OK ] DietPi-Update | Unpack update archive
[ OK ] DietPi-Update | Copy DietPi core files to RAMdisk
[ OK ] DietPi-Update | Copy DietPi rootfs files in place
[ OK ] DietPi-Update | Set execute permissions for DietPi scripts
[ OK ] DietPi-Set_software | Connection test: https://raw.githubusercontent.com/Fourdee/DietPi/master/dietpi.txt
[ OK ] DietPi-Set_software | Patching dietpi.txt
[ OK ] DietPi-Set_software | Downloading current dietpi.txt
[ OK ] DietPi-Set_software | dietpi.txt verification completed
[ OK ] verify_dietpi.txt | Completed
[ SUB2 ] DietPi-Update > Running incremental patching
[ INFO ] DietPi-Update | Current version : v6.17.20
[ INFO ] DietPi-Update | Latest version : v6.20.6
[ INFO ] DietPi-Update | Patching 6.17.20 to 6.18
[ OK ] DietPi-Software | Initialized database
[ OK ] DietPi-Software | Reading database
[ SUB4 ] DietPi-Software > Automated reinstall
[ INFO ] DietPi-Software | 106: Lidarr is not currently installed
[ INFO ] DietPi-Software | The program must be installed, before reinstall can be used
[ OK ] DietPi-Software | No changes applied for: Lidarr
[ INFO ] DietPi-Software | 121: Roon Bridge is not currently installed
[ INFO ] DietPi-Software | The program must be installed, before reinstall can be used
[ OK ] DietPi-Software | No changes applied for: Roon Bridge
[ INFO ] DietPi-Software | 123: Mosquitto is not currently installed
[ INFO ] DietPi-Software | The program must be installed, before reinstall can be used
[ OK ] DietPi-Software | No changes applied for: Mosquitto
[ INFO ] DietPi-Software | 129: O!MPD is not currently installed
[ INFO ] DietPi-Software | The program must be installed, before reinstall can be used
[ OK ] DietPi-Software | No changes applied for: O!MPD
[ INFO ] DietPi-Software | 144: Sonarr is not currently installed
[ INFO ] DietPi-Software | The program must be installed, before reinstall can be used
[ OK ] DietPi-Software | No changes applied for: Sonarr
[ INFO ] DietPi-Software | 145: Radarr is not currently installed
[ INFO ] DietPi-Software | The program must be installed, before reinstall can be used
[ OK ] DietPi-Software | No changes applied for: Radarr
[ INFO ] DietPi-Software | 147: Jackett is not currently installed
[ INFO ] DietPi-Software | The program must be installed, before reinstall can be used
[ OK ] DietPi-Software | No changes applied for: Jackett
[ INFO ] DietPi-Software | 148: myMPD is not currently installed
[ INFO ] DietPi-Software | The program must be installed, before reinstall can be used
[ OK ] DietPi-Software | No changes applied for: myMPD
[ INFO ] DietPi-Update | Patching 6.18.6 to 6.19
[ OK ] DietPi-Software | Initialized database
[ OK ] DietPi-Software | Reading database
[ SUB4 ] DietPi-Software > Automated reinstall
[ INFO ] DietPi-Software | 6: Xserver is not currently installed
[ INFO ] DietPi-Software | The program must be installed, before reinstall can be used
[ OK ] DietPi-Software | No changes applied for: Xserver
[ INFO ] DietPi-Software | 48: Pydio is not currently installed
[ INFO ] DietPi-Software | The program must be installed, before reinstall can be used
[ OK ] DietPi-Software | No changes applied for: Pydio
[ INFO ] DietPi-Software | 113: Chromium is not currently installed
[ INFO ] DietPi-Software | The program must be installed, before reinstall can be used
[ OK ] DietPi-Software | No changes applied for: Chromium
[ INFO ] DietPi-Software | 160: Allo_update is not currently installed
[ INFO ] DietPi-Software | The program must be installed, before reinstall can be used
[ OK ] DietPi-Software | No changes applied for: Allo_update
[ INFO ] DietPi-Software | 163: Gmediarender is not currently installed
[ INFO ] DietPi-Software | The program must be installed, before reinstall can be used
[ OK ] DietPi-Software | No changes applied for: Gmediarender
[ INFO ] DietPi-Update | Patching 6.19.6 to 6.20
[ OK ] DietPi-Software | Initialized database
[ OK ] DietPi-Software | Reading database
[ SUB4 ] DietPi-Software > Automated reinstall
[ INFO ] DietPi-Software | 37: Shairport Sync is not currently installed
[ INFO ] DietPi-Software | The program must be installed, before reinstall can be used
[ OK ] DietPi-Software | No changes applied for: Shairport Sync
[ INFO ] DietPi-Software | 45: Deluge is not currently installed
[ INFO ] DietPi-Software | The program must be installed, before reinstall can be used
[ OK ] DietPi-Software | No changes applied for: Deluge
[ INFO ] DietPi-Software | 65: NetData is not currently installed
[ INFO ] DietPi-Software | The program must be installed, before reinstall can be used
[ OK ] DietPi-Software | No changes applied for: NetData
[ INFO ] DietPi-Software | 77: Grafana is not currently installed
[ INFO ] DietPi-Software | The program must be installed, before reinstall can be used
[ OK ] DietPi-Software | No changes applied for: Grafana
[ INFO ] DietPi-Software | 108: AmiBerry is not currently installed
[ INFO ] DietPi-Software | The program must be installed, before reinstall can be used
[ OK ] DietPi-Software | No changes applied for: AmiBerry
[ INFO ] DietPi-Software | 124: NAA daemon is not currently installed
[ INFO ] DietPi-Software | The program must be installed, before reinstall can be used
[ OK ] DietPi-Software | No changes applied for: NAA daemon
[ INFO ] DietPi-Software | 128: MPD is not currently installed
[ INFO ] DietPi-Software | The program must be installed, before reinstall can be used
[ OK ] DietPi-Software | No changes applied for: MPD
[ INFO ] DietPi-Software | 131: Blynk Server is not currently installed
[ INFO ] DietPi-Software | The program must be installed, before reinstall can be used
[ OK ] DietPi-Software | No changes applied for: Blynk Server
Created symlink /etc/systemd/system/poweroff.target.wants/dietpi-kill_ssh.service โ /etc/systemd/system/dietpi-kill_ssh.service.
Created symlink /etc/systemd/system/halt.target.wants/dietpi-kill_ssh.service โ /etc/systemd/system/dietpi-kill_ssh.service.
Created symlink /etc/systemd/system/reboot.target.wants/dietpi-kill_ssh.service โ /etc/systemd/system/dietpi-kill_ssh.service.
[ OK ] DietPi-Patchfile | Desired setting in /DietPi/dietpi/.installed was already set: aSOFTWARE_INSTALL_STATE[116]=0
[ OK ] DietPi-Patchfile | APT installation for: procps, please wait...
[ OK ] DietPi-Patchfile | G_AGI: procps
[ OK ] DietPi-Update | Patching to v6.20.6 completed
[ INFO ] DietPi-Survey | Lines required for Whiptail box and its contents (y=38, z=2), exceeds screen dimensions (y=20).
[ SUB2 ] DietPi-Update > Completed
[ INFO ] DietPi-Update | Current version : v6.20.6
[ INFO ] DietPi-Update | Latest version : v6.20.6
[ SUB3 ] DietPi-Services > restart
[ OK ] DietPi-Services | restart : cron
[ SUB4 ] DietPi-Process_tool > Apply
[ OK ] DietPi-Process_tool | Completed
+ kill 1444
+ exit
+ G_EXIT
+ cd /tmp
+ (( 0 == 1 ))
+ (( ! 0 ))
+ [[ -d /tmp/DietPi-Patchfile ]]
+ declare -F G_EXIT_CUSTOM
Terminated
Everything exactly as intended:
.update_stage
and .install_stage == 1
, thus restarts update[ INFO ] DietPi-Update | Patching 6.19.6 to 6.20
After this, /etc/profile.d/dietpi-unsupported_terminal.sh
is removedEverything as it should be:
root@DietPi:~# cat /DietPi/dietpi/.update_stage /DietPi/dietpi/.install_stage
cat: /DietPi/dietpi/.update_stage: No such file or directory
2
Normally cat /var/tmp/dietpi/logs/dietpi-update.log
could give some hint, the problem is that it's overwritten by last nested update run, so we can't see how/why this occurred, do we?
@tenrek @rjjrdadev @Akito13
Sorry to bother you guys. I really try to find out the reason that leads to the chmod
error, but as can be seen above, all my tests work exactly as intended, so I am currently lost.
Some questions:
dietpi-update
first?/etc/profile.d/dietpi-unsupported_terminal.sh
is removed AFTER reinstalls, so no chance the error shows up, before you are asked for the backup, in case of one of the software above installed.cat /tmp/dietpi-update/dietpi-update.log
when the error prompt is active, e.g. from a second SSH session? Of course only e.g. if you reverted to v6.19.7 and did not yet finish the update via workaround.Sorry to bother you guys.
It's the opposite of a bother, to help a dedicated developer solve a problem in his work.
Does anyone of you have/had one of these software titles installed, and were you asked to create a backup before reinstalling them? Or did this even happen twice?
I didn't install any of those manually. I can't guarantee for any automatic install, but I doubt these are remotely dependencies at all, for anything I have installed.
And for completeness, could you paste the output of cat /tmp/dietpi-update/dietpi-update.log when the error prompt is active, e.g. from a second SSH session? Of course only e.g. if you reverted to v6.19.7 and did not yet finish the update via workaround.
I can try to re-run the reversion, as well as the following upgrade in a simulated environment and post the results.
@Akito13
I can try to re-run the reversion, as well as the following upgrade in a simulated environment and post the results.
That would be perfect, although I know you already invested much time with this update trouble, so would be totally acceptable it you simply want to enjoy a running system now.
Okay lets move all conversation here, especially since the issue header matches the error message, so other users might find this faster.
From the other topic:
So maybe upgrading from a "too low" version might be the issue.
I ran the tests from v6.17.20
on VM, so this is even older ๐ค. First I was thinking as well that on too old images the update stage system might be conflicting, but we have this for ages untouched, at least down to v6.-1
which is the oldest possible image that allows to update further.
@MichaIng I restored a complete system backup into a docker container, but the update worked flawlessly. The only thing that came to my mind when thinking about what warnings and errors I got on the original system is that DietPi thought I have the full LLSP stack, but it somehow failed to install/upgrade and detect the PHP-7 packages, as far as I recall. In the docker experiment, this part worked flawlessly as opposed to the original scenario.
@Akito13
Do you have the update logs from the docker container, just to see if really every step was as desired? Every detail is helpful to find any quirk ๐.
The installed software should have no influence on the update process, besides if there is something wrong with an APT repo or package, but that would cause a different error. Aside from that, especially since you didn't face reinstalls, there is no interference that I can think of.
On my own Raspberry Pi btw I also have full LAMP stack with Nextcloud installed and update went through as planned.
But thanks for thinking about this. Any thought can help currently. Bad thing is that I am out of home until Saturday night now and will have no internet access. So investigations from my side have to pause, although I am really unhappy with the current state, where we still have reports of unhappy users running into this error: https://dietpi.com/phpbb/viewtopic.php?f=11&t=5485
Aside roughly 2000 (obviously successful) updates (a little less than three times the v6.20 number based on opted-out vs opted-in users): https://dietpi.com/survey/
So this is indeed a rare issue, but painful and with risk when handling wrong, for those affected. But for me the worst is, that I still have not even a little clue about the cause... Somehow scary when we don't know how/which code runs.... Hits my ego as well, that we might have overseen an important/silly/simple error in the code...
Related or not? RAMdisk issue with v6.20.6 is actually excluded!:
What users report here still looks like a RAMdisk issue, even that with v6.20.6 stopping RAMdisk is assured to be done before every unmount, even with x-systemd.automount
still active on boot.mount. The state is as v6.19.7 which worked well.
async
can't be it. sync
is even triggered within dietpi-software before reboot
. And the reboot itself as well triggers a sync
. If this would be that unreliable, it would be better to disable async
completely. But it's a by default enabled Debian/Linux feature, actually impossible it's that unreliable... ๐ค
Do you have the update logs from the docker container, just to see if really every step was as desired? Every detail is helpful to find any quirk ๐.
I was waiting for the crash so I can go for the /tmp/dietpi-update/dietpi-update.log
, but it never happened so now I guess I am logless, because I didn't find any afterwards. It would be probably helpful, if there was a DEBUG flag or something attachable to dietpi-update
, so the logs aren't deleted and possibly even extended, if reasonable.
But thanks for thinking about this. Any thought can help currently. Bad thing is that I am out of home until Saturday night now and will have no internet access. So investigations from my side have to pause, although I am really unhappy with the current state, where we still have reports of unhappy users running into this error: https://dietpi.com/phpbb/viewtopic.php?f=11&t=5485
You explained a good workaround, that should help, so it shouldn't be that bad. While you're unavailable, I am sure I won't be the only one trying to understand what is wrong.
Aside roughly 2000 (obviously successful) updates (a little less than three times the v6.20 number based on opted-out vs opted-in users): https://dietpi.com/survey/
So this is indeed a rare issue, but painful and with risk when handling wrong, for those affected. But for me the worst is, that I still have not even a little clue about the cause... Somehow scary when we don't know how/which code runs.... Hits my ego as well, that we might have overseen an important/silly/simple error in the code...
Well, same here, since the first update on a different Pi went as expected, but the second time it on anther Pi, it did not. So it's definitely not an easy to catch issue.
async can't be it. sync is even triggered within dietpi-software before reboot. And the reboot itself as well triggers a sync. If this would be that unreliable, it would be better to disable async completely. But it's a by default enabled Debian/Linux feature, actually impossible it's that unreliable...
If it is physically possible to be in 2 locations at once, then it is certainly possible that it has some unfixed bug. I mean dirty cow existed for how long? So, one should never exclude something entirely just because of low probability. Though, we should definitely try to find a higher level bug/issue, first.
@MichaIng I have some news.
I performed an update from v6.19.7 to v6.20.6 on a Raspberry Pi 3B, that has more or less the same content like the Raspberry Pi 0W I was talking about. The update was processed without any errors. When it prompted to reboot the system, I confirmed the restart. After the restart, I could see the Raspi being connected to my router but was constantly getting No router to host
ssh error, when trying to connect. Using the local IP or ssh instead of mosh, didn't change anything.
I then turned off the power supply and turned it on again, basically doing a hard reboot. I could ssh into the Pi to discover something very interesting:
I was welcomed with this screen after _updating_ from v6.19.7 to v6.20.6 .
Now I ran dietpi-update
once again, encountering the initial error from the OP. I ssh'ed and copied the dietpi-update.log
file to my computer. nano
said, that the file has to be converted from Mac format, probably because of the line length excess. These are the contents of the log file:
[0m[90m[[0m[33m .... [0m[90m][0m [90mDietPi-Update | [0mwget https://raw.githubusercontent.com/Fourdee/DietPi/master/dietpi/pre-patch_file -O pre-patch_file[0m[1A
[0m[90m[[0m[1;33m. [0m[90m][0m
[0m[90m[[0m[0;33m.[1;33m. [0m[90m][0m [J
[K[0m[90m[[0m[32m OK [0m[90m][0m [90mDietPi-Update | [0mwget https://raw.githubusercontent.com/Fourdee/DietPi/master/dietpi/pre-patch_file -O pre-patch_file
[0m
[1mDietPi-Pre-patch[0m
[90mโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ[0m
[ [1mINFO[0m ] Applying critical pre-patches
[1mDietPi-Pre-patch[0m
[90mโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ[0m
[ [1mINFO[0m ] Completed pre-patches with exit code: [33m0[0m
[K[0m[90m[[0m[32m OK [0m[90m][0m [90mDietPi-Update | [0mAPT update, please wait...
[0m[90mHit:1 http://raspbian.raspberrypi.org/raspbian stretch InRelease
Hit:2 https://archive.raspberrypi.org/debian stretch InRelease
Reading package lists...
[0m
[K[0m[90m[[0m[32m OK [0m[90m][0m [90mDietPi-Update | [0mG_AGUP
[0m
[K[0m[90m[[0m[32m OK [0m[90m][0m [90mDietPi-Update | [0mAPT upgrade, please wait...
[0m[90mReading package lists...
Building dependency tree...
Reading state information...
Calculating upgrade...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
[0m
[K[0m[90m[[0m[32m OK [0m[90m][0m [90mDietPi-Update | [0mG_AGUG
[0m % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 119 0 119 0 0 320 0 --:--:-- --:--:-- --:--:-- 321
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
30 2493k 30 759k 0 0 436k 0 0:00:05 0:00:01 0:00:04 793k
100 2493k 100 2493k 0 0 1188k 0 0:00:02 0:00:02 --:--:-- 1897k
[0m[90m[[0m[33m .... [0m[90m][0m [90mDietPi-Update | [0mUnpack update archive[0m
[0m[90m[[0m[1;33m. [0m[90m][0m
[0m[90m[[0m[0;33m.[1;33m. [0m[90m][0m
[0m[90m[[0m [0;33m.[1;33m. [0m[90m][0m
[0m[90m[[0m [0;33m.[1;33m. [0m[90m][0m [J
[K[0m[90m[[0m[32m OK [0m[90m][0m [90mDietPi-Update | [0mUnpack update archive
[0m
[0m[90m[[0m[33m .... [0m[90m][0m [90mDietPi-Update | [0mCopy DietPi core files to RAMdisk[0m
[0m[90m[[0m[1;33m. [0m[90m][0m [J
[K[0m[90m[[0m[32m OK [0m[90m][0m [90mDietPi-Update | [0mCopy DietPi core files to RAMdisk
[0m
[0m[90m[[0m[33m .... [0m[90m][0m [90mDietPi-Update | [0mCopy rootfs files in place[0m
[0m[90m[[0m[1;33m. [0m[90m][0m
[0m[90m[[0m[0;33m.[1;33m. [0m[90m][0m
[0m[90m[[0m [0;33m.[1;33m. [0m[90m][0m
[0m[90m[[0m [0;33m.[1;33m. [0m[90m][0m
[0m[90m[[0m [0;33m.[1;33m. [0m[90m][0m
[0m[90m[[0m [0;33m.[1;33m.[0m[90m][0m [J
[K[0m[90m[[0m[32m OK [0m[90m][0m [90mDietPi-Update | [0mCopy rootfs files in place
[0m
[0m[90m[[0m[33m .... [0m[90m][0m [90mDietPi-Update | [0mSet execute permissions for DietPi scripts[0m
[0m[90m[[0m[1;33m. [0m[90m][0m [J
[K[0m[90m[[0m[31mFAILED[0m[90m][0m [90mDietPi-Update | [0mchmod -R +x /DietPi /var/lib/dietpi/services /etc/cron.daily/dietpi /etc/cron.hourly/dietpi /etc/profile.d/dietpi-*.sh /etc/bashrc.d/dietpi-bash_completion.sh /etc/bashrc.d/dietpi-login.sh /etc/bashrc.d/dietpi-posix-set-locale.sh /etc/bashrc.d/dietpi-ps1_kill_animation.sh /etc/bashrc.d/dietpi-unsupported_terminal.sh
[0m[?1049h[1;30r[4l[?25l(B[m[37m[40m[1;30r[H[2J[1;1H[1m[37m[44m [2;1H [3;1H [4;1H [5;1H [6;1H [7;1H [8;1H [9;1H [10;1H [11;1H [12;1H [13;1H [14;1H [15;1H [16;1H [17;1H [18;1H [19;1H [20;1H [21;1H [22;1H [23;1H [24;1H [25;1H [26;1H [27;1H [28;1H [29;1H [30;1H [30;119H [4h [4l[1;1H[4;16H(B[m[30m[47mโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค [31mDietPi Error Handler:[30m โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ[5;16Hโ DietPi-Update: chmod -R +x /DietPi /var/lib/dietpi/services /etc/cron.daily/dietpi [1m[37m[40m [6;16H(B[m[30m[47mโ /etc/cron.hourly/dietpi /etc/profile.d/dietpi-*.sh [1m[37m[40m [7;16H(B[m[30m[47mโ /etc/bashrc.d/dietpi-bash_completion.sh /etc/bashrc.d/dietpi-login.sh [1m[37m[40m [8;16H(B[m[30m[47mโ /etc/bashrc.d/dietpi-posix-set-locale.sh /etc/bashrc.d/dietpi-ps1_kill_animation.sh [1m[37m[40m [9;16H(B[m[30m[47mโ /etc/bashrc.d/dietpi-unsupported_terminal.sh [1m[37m[40m [10;16H(B[m[30m[47mโ - Exit code: 1 [1m[37m[40m [11;16H(B[m[30m[47mโ - DietPi version: v6.19.5 (Fourdee/master) | HW_MODEL:3 | HW_ARCH:2 | DISTRO:4 [1m[37m[40m [12;16H(B[m[30m[47mโ - Image creator: DietPi Core Team [1m[37m[40m [13;16H(B[m[30m[47mโ - Pre-image: Raspbian Lite [1m[37m[40m [14;16H(B[m[30m[47mโ [1m[37m[40m [15;16H(B[m[30m[47mโ Log file contents: [1m[37m[40m [16;16H(B[m[30m[47mโ chmod: cannot access '/etc/profile.d/dietpi-*.sh': No such file or directory [1m[37m[40m [17;16H(B[m[30m[47mโ [1m[37m[40m [18;16H(B[m[30m[47mโ [1m[37m[40m [19;16H(B[m[30m[47mโ [1m[37m[40m [20;16H(B[m[30m[47mโ [1m[37m[40m [21;16H(B[m[30m[47mโ [37m[44mRetry : Re-run the last command that failed [30m[47m [1m[37m[40m [22;16H(B[m[30m[47mโ DietPi-Config : Edit network, APT/NTP mirror settings etc [1m[37m[40m [23;16H(B[m[30m[47mโ [1m[37m[40m [24;16H(B[m[30m[47mโ [1m[37m[40m [25;16H(B[m[30m[47mโ <Ok> <Exit> [1m[37m[40m [26;16H(B[m[30m[47mโ โ[1m[37m[40m [27;16H(B[m[30m[47mโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ[1m[37m[40m [28;17H [5;18H
Workaround in OP worked for me, thank you.
I also ran into the OP's symptoms when I tried dietpi-update for the second time after my first update from v6.17.12 resulted in the error
/DietPi/dietpi/login: line 150: ((: > 0 : syntax error: operand expected (error token is "> 0 ")
after reboot.
The workaround in OP worked for me too!
@Fourdee
I was reading the x-systemd.automount
issue again: https://github.com/Fourdee/DietPi/pull/2357#issuecomment-449177715
Actually already there I recognized that (re)adding After=boot.mount
alone did not resolve the issue with RAMdisk stopping too early since boot.automount
is the active one.
But actually when checking systemd unit order/dependencies, automounts are started even before the actual mounts, so stopped afterwards. And all are bound Before=local-fs.target
:
2019-02-04 00:59:40 root@micha:~# systemctl show -p Requires,Wants,WantedBy,Requisite,Before,After mnt-sda.automount
Requires=-.mount
Requisite=
Wants=
WantedBy=local-fs.target
Before=local-fs.target umount.target mnt-sda.mount
After=-.mount
2019-02-04 01:00:00 root@micha:~# systemctl show -p Requires,Wants,WantedBy,Requisite,Before,After mnt-sda.mount
Requires=-.mount system.slice
Requisite=
Wants=
WantedBy=
Before=local-fs.target umount.target mnt-sda-.swapfile.swap
After=-.mount dev-disk-by\x2duuid-192978f5\x2d3451\x2d45ce\x2db00b\x2de5e96738ddeb.device systemd-journald.socket dev-sda.device system.slice mnt-sda.automount local-fs-pre.target
๐ด Ah yep on Stretch indeed this is different (now):
root@VM-Stretch:~# systemctl show -p Requires,Wants,WantedBy,Before,After mnt-sdb.mount
Requires=system.slice -.mount
Wants=
WantedBy=
Before=umount.target
After=mnt-sdb.automount system.slice local-fs-pre.target -.mount dev-disk-by\x5cx2duuid-1AFB\x5cx2d90C2.device
root@VM-Stretch:~# systemctl show -p Requires,Wants,WantedBy,Before,After mnt-sdb.automount
Requires=-.mount
Wants=
WantedBy=local-fs.target
Before=umount.target local-fs.target mnt-sdb.mount
After=-.mount
automount
is pulled in on boot (WantedBy=local-fs.target
), the mount itself is not pulled by anything, only triggered by first access.boot.mount
for this reason on pre-v6.19 images is not part of the boot order, Before/After=boot.mount
is completely without any effect (on boot and shutdown order). Only boot.automount
would have.Actually these automounts do not make any sense if we anyway set auto
option, or the other way round, automount implies noauto
and overrides auto
, so removes the mounts from boot order, as can be seen above. I think we should remove x-systemd.automount
completely from all dietpi-drive_manager
mounts. I anyway have no idea why this should be a benefit. If the drive is mounted anyway on first touch, having it mounted before or on trigger makes no difference. Energy savings/spin up/down is triggered by I/O, not mount, since mount is a UNIX system thing only, AFAIK.
Automounts complicate and double the systemd generator effort and makes things more complicated, obviously, especially when rules change, being different on Stretch and Buster now etc.
If required/requested we could add an optional noauto,x-systemd.automount
choice to drive manager later, for non boot/root/userdata/swap drives only.
@Fourdee
I am still not able to explain all user reports, but worth to try?
Also we should remove .update_stage
and check/adjust .install_stage
separately, e.g. [[ -f /DietPi/dietpi/.installed ]] && echo 2 > /DietPi/dietpi/.install_stage
independently from .update_stage
existence, just to be failsafe and perhaps fix some systems where the update failed or was not 100% finished.
And before restarting update or reboot, do systemctl restart dietpi-ramdisk
as well.
Perhaps do this as v6.21 release this time, so users, where v6.20 was successful, don't need to redo reinstalls, which can take long (e.g. Homeassistant) or require config file recovery (MPD)?
Thought match this error(s) as well: https://github.com/Fourdee/DietPi/issues/2495
@Akito13
Another question:
chmod: cannot access '/etc/profile.d/dietpi-*.sh
error appeared after a reboot the first time, or directly after starting the update the first time (without reboot in between)?@Akito13
Another question:* Do you remember, if the `chmod: cannot access '/etc/profile.d/dietpi-*.sh` error appeared after a reboot the first time, or directly after starting the update the first time (without reboot in between)?
I didn't use the test-pi that encountered the error since then, to use it for further testing. I ssh'ed into it now seeing this:
[FAILED] DietPi-Software | Root privileges required. Please run the command with "G_SUDO", or, "sudo -i".
mv: failed to access '/var/tmp/dietpi/logs/dietpi-firstrun-setup.log': Permission denied
Which means, that the error occured before rebooting.
Resolved with v6.21 update, this issue will no longer occur. thanks @MichaIng ๐
Thank you, everyone, good job.
I can not upgrade to version from version 6.21.1 to version 6.22.3 version
@toporchelo
Please paste the full output of:
apt -y upgrade
My certainly necessary 2 cents:
DietPi update worked for me, even from an older version.
@Akito13
Jep, only users which tried to update to v6.20 one time (and failed) could run into original issue from first post.
toporchelo has a different issue related to the APT package upgrades, but the important last output lines are missing.
Well, seems like I didn't read the error message correctly, at first. But now I did.
@toporchelo Do you have apache2 installed or maybe another web server running on Port 80? If there is, then nginx-full will always fail, as it can't allocate Port 80 for itself.
@Akito13
Since it is not install but only an APT upgrade, nginx was already installed before. Lets wait for the full error output before guessing ๐.