SolvedDietPi Upgrade v6.25.3 -> v.6.30.0 fails: /DietPi/dietpi/func/dietpi-ramdisk: No such file or directory
✔️Accepted Answer
Found it, please do not do any of the mentioned steps, the error can and should be ignored.
[ OK ] DietPi-Update | Incremental patching to v6.30.0 completed
[ SUB2 ] DietPi-Update > Completed
[ INFO ] DietPi-Update | Current version : v6.30.0
[ INFO ] DietPi-Update | Latest version : v6.30.0
[ OK ] DietPi-Survey | Setting in /boot/dietpi.txt adjusted: SURVEY_OPTED_IN=1
[ OK ] DietPi-Survey | Sending survey data
[ OK ] DietPi-Patch | Everything done! Terminating the obsolete DietPi-Update parent instance...
DietPi-Update
─────────────────────────────────────────────────────
Mode: Completed
[ INFO ] DietPi-Update | Current version : v6.24.3
[ INFO ] DietPi-Update | Latest version : v6.30.0
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
[ OK ] DietPi-Survey | Sending survey data
[FAILED] DietPi-Update | /DietPi/dietpi/func/dietpi-ramdisk 1
As can be seen from the first lines, the update has finished completely successfully. What fails is the termination of the obsolete parent process. This is due to a "bug" that has been fixed meanwhile: 1e52d13#diff-c613a85da508fb885b67c34f9661e243L469-R471
Details
We piped the output of the update into tee
to write it to log file and keep console output. However as fast as a process output is piped, it looses it's ability to control the shell, while the target process becomes the main attached process. Since the incremental patches, which are also responsible for killing the obsolete parent update process, runs in this pipe, it cannot terminate anymore. v6.26 fixes this by using redirect into subshell where tee runs inside, so the incremental patch process stay the main attached process while the pipe target (tee) is a child process only.
Solution
So this error must be ignored, choosing exit will continue normally with DietPi-Software and there is no issue left with the failing parent update process. This is a v6.25 only issue, and there is technically no chance to solve it from within the patch file. So only solution IMO is to update the images, which I anyway wanted to do. Will now concentrate on getting the testing images stable and updating the stable images as well.
Details:
Steps to reproduce:
running dietpi-update
Expected behaviour:
upgrade to v.6.30.0
Actual behaviour:
upgrade breaks with error "/DietPi/dietpi/func/dietpi-ramdisk: No such file or directory". I seems this happens during upgrade to 6.26.x already but i am not sure
Extra details:
Additional logs: