Unable to update dietpi on Nanopi M1 plus

Creating a bug report/issue

I have searched the existing open and closed issues

Required Information

  • DietPi version | 9.5
  • Distro version | bookworm
  • Kernel version | Linux MCAudioServer 6.6.54-current-sunxi #1 SMP Fri Oct 4 14:30:05 UTC 2024 armv7l GNU/Linux
  • Architecture | armhf
  • SBC model | NanoPi M1 Plus (armv7l)
  • Power supply used | 5V 3A
  • SD card used | SanDisk Industrial

Additional Information (if applicable)

  • Software title | (EG: Nextcloud)
  • Was the software title installed freshly or updated/migrated?
  • Can this issue be replicated on a fresh installation of DietPi?
    ← If you sent a β€œdietpi-bugreport”, please paste the ID here β†’
  • Bug report ID | echo $G_HW_UUID

Steps to reproduce

Running dietpi-update doesn’t proceed. Error is thrown

Expected behaviour

  • …

Actual behaviour

  • …

Extra details

 DietPi-Update
─────────────────────────────────────────────────────
 Phase: Checking for available DietPi update

[  OK  ] DietPi-Update | Checking IPv4 network connectivity
[  OK  ] DietPi-Update | Checking DNS resolver
[ INFO ] DietPi-TimeSync | Manual mode detected, skipping time sync
/.update/versionUpdate | Getting latest version from: https://raw.githubusercontent.com/MichaIng
curl: (3) URL using bad/illegal format or missing URL
[FAILED] DietPi-Update | Unable to get latest version.
[ INFO ] DietPi-Update | Please check the target Git repository and your network connection, then rerun dietpi-update.
[ INFO ] DietPi-Update | If this error persists, please report at: https://github.com/MichaIng/DietPi/issues
[ INFO ] DietPi-Update | APT update, please wait...
Hit:1 https://deb.debian.org/debian bookworm InRelease
Hit:2 https://deb.debian.org/debian bookworm-updates InRelease
Hit:3 https://deb.debian.org/debian-security bookworm-security InRelease
Hit:4 https://deb.debian.org/debian bookworm-backports InRelease
Hit:5 https://dtcooper.github.io/raspotify raspotify InRelease
Hit:6 https://dietpi.com/apt bookworm InRelease
Hit:7 https://dietpi.com/apt all InRelease
Reading package lists...
[  OK  ] DietPi-Update | APT update
[ INFO ] DietPi-Update | No APT upgrades were found, not creating file: /run/dietpi/.apt_updates

hmm can you try following

dietpi-update -1

Here is the result


 DietPi-Update
─────────────────────────────────────────────────────
 Phase: Checking for available DietPi update

[  OK  ] DietPi-Update | Checking IPv4 network connectivity
[  OK  ] DietPi-Update | Checking DNS resolver
[ INFO ] DietPi-TimeSync | Manual mode detected, skipping time sync
/.update/versionUpdate | Getting latest version from: https://raw.githubusercontent.com/MichaIng
curl: (3) URL using bad/illegal format or missing URL
[FAILED] DietPi-Update | Unable to get latest version.
[ INFO ] DietPi-Update | Please check the target Git repository and your network connection, then rerun dietpi-update.
[ INFO ] DietPi-Update | If this error persists, please report at: https://github.com/MichaIng/DietPi/issues
[ INFO ] DietPi-Update | APT update, please wait...
Hit:1 https://dtcooper.github.io/raspotify raspotify InRelease
Hit:2 https://deb.debian.org/debian bookworm InRelease
Hit:3 https://deb.debian.org/debian bookworm-updates InRelease
Hit:4 https://deb.debian.org/debian-security bookworm-security InRelease
Hit:5 https://deb.debian.org/debian bookworm-backports InRelease
Hit:6 https://dietpi.com/apt bookworm InRelease
Hit:7 https://dietpi.com/apt all InRelease
Reading package lists...
[  OK  ] DietPi-Update | APT update
[ INFO ] DietPi-Update | Storing number of available APT upgrades to file: /run/dietpi/.apt_updates

When I run dietpi-update the url is https://raw.githubusercontent.com/MichaIng/DietPi/master/.update/version

Not sure but you can probably pass that to dietpi-update somehow.

Actually, after looking at the script cat /boot/dietpi/dietpi-update it does not look possible.

Not sure why your url is mangled.

I replaced my local URL with what you suggested and it got a bit further. Now I get this error when starting update. There are some weird characters in the url

Downloading pre-patches                                                                                              β”‚
                     β”‚  - Command: curl -sSfLO https://raw.githubusercontent.com/MichaIng^M/DietPi/master^M/.update/pre-patches             β”‚
                     β”‚  - Exit code: 3                                                                                                      β”‚
                     β”‚  - DietPi version: v9.8.0 (MichaIng/master) | HW_MODEL: 66 | HW_ARCH: 2 | DISTRO: 7                                  β”‚
                     β”‚  - Error log:                                                                                                        β”‚
                     β”‚ curl: (3) URL using bad/illegal format or missing URL           ```

That is awfully strange, I am wondering if there are hardware issues (memory or disk writes). I would definitely back up anything of value before moving forward.

There are some strange characters inside the URL. Usually this happens if you edit scripts on a Windows system and simply copy over files.

1 Like

The culprit was my dietpi.txt file.
I did a wget directly into the device and made the necessary mods using nano there and voila, all is good.
Thank you.