Kernel version | Linux DietPi 6.1.21-v7+ #1642 SMP Mon Apr 3 17:20:52 BST 2023 armv7l GNU/Linux
Architecture | armhf
Hardware model | RPi 3 Model B (armv7l) (ID=3)
Power supply | (EG: RAVPower 5V 1A)
SD card | (EG: SanDisk Ultra 16 GB)
Pre-image | Raspbian Lite
Steps to reproduce:
I simply ran dietpi-update
Expected behaviour:
Update should complete without error
Actual behaviour:
Update stopped due to error.
Extra details:
I had already manually updated PiHole to v6 by pihole -up prior to running dietpi-update
Additional logs:
usermod: invalid option -- 'r'
Usage: usermod [options] LOGIN
Options:
-b, --badnames allow bad names
-c, --comment COMMENT new value of the GECOS field
-d, --home HOME_DIR new home directory for the user account
-e, --expiredate EXPIRE_DATE set account expiration date to EXPIRE_DATE
-f, --inactive INACTIVE set password inactive after expiration
to INACTIVE
-g, --gid GROUP force use GROUP as new primary group
-G, --groups GROUPS new list of supplementary GROUPS
-a, --append append the user to the supplemental GROUPS
mentioned by the -G option without removing
the user from other groups
-h, --help display this help message and exit
-l, --login NEW_LOGIN new value of the login name
-L, --lock lock the user account
-m, --move-home move contents of the home directory to the
new location (use only with -d)
-o, --non-unique allow using duplicate (non-unique) UID
-p, --password PASSWORD use encrypted password for the new password
-R, --root CHROOT_DIR directory to chroot into
-P, --prefix PREFIX_DIR prefix directory where are located the /etc/* files
-s, --shell SHELL new login shell for the user account
-u, --uid UID new UID for the user account
-U, --unlock unlock the user account
-v, --add-subuids FIRST-LAST add range of subordinate uids
-V, --del-subuids FIRST-LAST remove range of subordinate uids
-w, --add-subgids FIRST-LAST add range of subordinate gids
-W, --del-subgids FIRST-LAST remove range of subordinate gids
-Z, --selinux-user SEUSER new SELinux user mapping for the user account
I ran dietpi-update for a second time and it completed without any errors. Iβm not sure if any of the clean up scripts was run because I was not prompted to uninstall the previous pihole dependencies?
Probably web server and PHP are still used by other applications. At least we check for know apps like Nextcloud. In this case, no decency will be removed.
Best indicator for a successful DietPi/ Pihole migration is the availability of PiHole on port 8089
I am doing the same update (on bullseye) and got the same error, at the moment Iβve used the option to use a temp shell and this is what I can add to the OP:
I already had pihole 6 installed and I was running it on a different port as 80/4433 are used by reversed proxy.
this is the on screen log:
DietPi-Update
βββββββββββββββββββββββββββββββββββββββββββββββββββββ
Phase: Applying incremental patches
[ INFO ] DietPi-Update | Current version : v9.10.0
[ INFO ] DietPi-Update | Latest version : v9.11.2
[ INFO ] DietPi-Patch | Patching to DietPi v9.11...
[ OK ] DietPi-Patch | rm /var/www/pihole
[ OK ] DietPi-Patch | rm /var/www/admin
[ OK ] DietPi-Patch | rm -f /etc/lighttpd/conf-available/99-dietpi-pihole-block_public_admin.conf /etc/lighttpd/conf-available/99-dietpi-pihole.conf /etc/lighttpd/conf-enabled/99-dietpi-pihole-block_public_admin.conf /etc/lighttpd/conf-enabled/99-dietpi-pihole.conf
[. ]usermod: invalid option -- 'r'hole www-data
[FAILED] DietPi-Patch | usermod -rG pihole www-data
Currently I am on the shell, so let me know what youβd like me to check
Thanks.
Same here. I upgraded pi-hole on Feb. 22. after running dietpi-update.
Today I ran dietpi-update again and saw the same error message.
I simply ran dietpi-update once more without error message.
But thereβs more: Outdated certificate, unbound not working . . .
I will first google a little more before posting.
That -r option was added with Bookworm it seems, hence Bullseye systems run into this. Iβll replace it with gpasswd -d www-data pihole. Only nasty that this one fails, if the user in not in the group anymore. usermod handles this more gracefully.
I just pushed this to master directly. Retrying the update should hence work now.
I would like to take this opportunity to point to our blog. Debian Bookworm has been released β DietPi Blog Maybe itβs the right time to update to Bookworm. Especially since the next Debian release Trixi will be released this summer 2025 and it will turn Bullseye into oldoldstable Debian
I ran this again and there were no errors. There were still no prompt to clean up? Is there supposed to be? I only have PiHole, Vaultwarden, and Caddy on this Pi.
Iβve resumed the upgrade and replaced the usermod with gpasswd -d www-data pihole and the upgrade finished successfully. However, pihole installation has changed the gui ports Iβve defined for http and https and used port 8089 for http and nothing for https.
(I had pihole 6 working on user defined ports since 80/443 were taken)
It is easy to change it back, but just wanted to mention it in case others user run into it and think pihole-web is not installed.
Thanks for the quick fix.
The Pi-hole v6 migration is indeed not done a second time, as the existence of the /var/www/pihole symlink is used as marker, and it has been removed on the first attempt already.
Webserver stacks cannot be removed directly. They are only a meta option for installing webserver, database and PHP, and the install status adjusts automatically based on whether this trio is installed. Hence, uninstall the webserver and PHP explicitly, if not needed:
dietpi-software uninstall 84 89
I also see nothing which depends on the MariaDB database server, unless you configured vaultwarden to use MariaDB instead of SQLite. But better be sure really nothing else uses it, and remember why it has been installed in the first place, before removing it.
I logged into the database and checked. Looked like a default install with the usual tables so I uninstalled it along with the others. Many thanks to you and @Joulinar.