dietpi-upgrade 7.3.2 breaks trying to get latest

Hi,

I’m sorry, I guess this will turn out to be but I just cannot figure out what the message is telling me.

Sorry, I copied the log to my desktop box and there is some codepage issue:

[0m
[J
 [38;5;154mDietPi-Update[0m
[90m─────────────────────────────────────────────────────
 Phase:[0m Applying pre-patches

[0m[0m
[J[90m[[0m      [90m][0m [90mDietPi-Update |[0m Downloading pre-patches[0m[2G[1;33m.     [0m[C[0m
[J[90m[[0m[32m  OK  [90m][0m [90mDietPi-Update |[0m Downloading pre-patches
[0m[0m
[J[90m[[0m      [90m][0m [90mDietPi-Update |[0m Applying execute permission[0m[2G[1;33m.     [0m[C[0m
[J[90m[[0m[32m  OK  [90m][0m [90mDietPi-Update |[0m Applying execute permission
[0m/boot/dietpi/dietpi-update: line 221: ./pre-patches: Permission denied
[0m
[J[90m[[0m[31mFAILED[90m][0m [90mDietPi-Update |[0m An error occured during pre-patching. Please check the above log or /var/tmp/dietpi/logs/dietpi-update.log for errors, and rerun "dietpi-update" after the cause has been solved.
[0m

I can’t find what directory the pre-patches file should be saved in, so I can’t look at the permissions. But it feels like the curl failed and the file was not fetched at all.

Thanks for any help.

Did you used use root to execute the update? If not, do so.

Thanks, yes, of course.

I have updated this box many times. In fact, I had two at the same level. The first one upgraded without issues. I did a halt -p, swapped cards, and brought up the 2nd image and it failed repeatedly. I have no idea what’s going on.

It is a permission issue, usually happen if not using use root

./pre-patches: Permission denied

I realize that but I

su -

before doing the update.

Where is the downloaded file supposed to exist? I can check the directory permissions. But, I suspect the problem is that the file download failed.

Try to login as user root directly

I don’t have any way to do that (headless, pubkey, root logins disabled for security) and it cannot be necessary. And it has not ever been a problem to su - on this box or any Linux box I’ve used. I’m clearly running as root.

Where is the pre-patches file supposed to be downloaded?

it is a temporary directory created during run only

/tmp/DietPi-Update

If you are hit by the error, you should be prompt by an error handle screen. There you should have an option to Open subshell

Thanks, I’ll check /tmp

I don’t think the file exists. I may have to put some debug stuff in the dietpi-upgrade script if there isn’t any built in.

When this fails, the script ends and it drops back to the shell. There isn’t any error screen.

Ok, I have /tmp mounted noexec on this image :smiley:

I’ll get back to you, thanks for your patience.

The file is not present, btw, only the usual .something-unix dirs and systemd-private-blah-blah

Looks like I shot myself in the ass (again). I have a general practice of mounting /tmp noexec and I guess on the other image I didn’t do that.

I am not sure why/how it ever worked on this image, from what I can remember I always ran this one that way. In the case any script doesn’t run on one of the UNIX or Linux boxes I have there is usually a shell variable I can set for TMPDIR to redirect to /var/tmp or some other place of my choosing. I didn’t check yet to see if dietpi-update respects TMPDIR but if not it might be a useful addition.

What’s odd is that the patchfile is not present on /tmp

If it were, it would have helped me figure out what’s going on…

Thanks again and sorry for wasting your time.