DietPi info (cpu, software) removed from console login screen

Creating a bug report/issue

I have searched the existing open and closed issues

Required Information

  • DietPi version | cat /boot/dietpi/.version
G_DIETPI_VERSION_CORE=9
G_DIETPI_VERSION_SUB=16
G_DIETPI_VERSION_RC=3
G_GITBRANCH='master'
G_GITOWNER='MichaIng'
G_LIVE_PATCH_STATUS[0]='applied'
G_LIVE_PATCH_STATUS[1]='applied'
  • Distro version | (empty)
  • Kernel version | Linux rpi4 6.12.34+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.12.34-1+rpt1 (2025-06-26) aarch64 GNU/Linux
  • Architecture | arm64
  • SBC model | (empty)
  • Power supply used | original PS
  • SD card used | SanDisk ultra

Additional Information (if applicable)

I cannot pinpoint the exact moment when it started, but after the recent upgrades of Dietpi and the move to trixie the console login looks now like this, instead of the diepti-specific information

Linux rpi4 6.12.34+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.12.34-1+rpt1 (2025-06-26) aarch64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sat Sep  6 19:31:42 2025 from fdbb:xxxx:yyyy:zzzz:1828:37d8:2ebe:9ef1

Can anybody pinpoint where, in Dietpi, dietpi-cpu and friends are supposed to be called, and how I can restore that behaviour?

Edit: the usual dietpi binaries are no longer in the PATH. It seems that bashrc.d/dietpi.bash is no longer sourced.

Regards,
-Patrick

You are going to login as user root? Just to be sure.

Yes indeed :fearful:
As a workaround, I added

run-parts --regex '.bash$' /etc/bashrc.d
run-parts --regex '.sh$'   /etc/bashrc.d

but in the git repository I did not find where this should happen originally. /etc/bash.bashrc for sure does not run-part /etc/bashrc.d.

@MichaIng can explain the whole process in detail :grin:

/etc/bash.bashrc, loaded on every interactive bash session, should have this as last line:

for i in /etc/bashrc.d/*.sh /etc/bashrc.d/*.bash; do [ -r "$i" ] && . "$i"; done; unset -v i

which does moreless what your manual workaround does, but sourcing the scripts as intended.

1 Like

Unfortunately it doesn’t, neither on my DietPi nor on a “plain” Debian (both on arm). On the latter the path /etc/bashrc.d does not exist.
Both have been upgraded from Debian 12 to 13, one with the DietPi script, the other according to Debian’s own upgrade instructions.

have a look to /etc/bashrc.d on your DietPi system. It should looks like this

root@DietPiOPi5:/etc/bashrc.d# ls -la
total 20
drwxr-xr-x  2 root root 4096 Aug 29 17:56 .
drwxr-xr-x 67 root root 4096 Sep  7 20:13 ..
lrwxrwxrwx  1 root root   33 Nov 24  2023 dietpi-bash_completion.sh -> /etc/profile.d/bash_completion.sh
-rw-r--r--  1 root root 5520 Aug 25 23:36 dietpi.bash
-rw-r--r--  1 root root  288 Aug 25 23:36 readme.txt
root@DietPiOPi5:/etc/bashrc.d#

does dietpi.bash exists?

Yes they look similar

root@rpi4:~# ll /etc/bashrc.d
total 12
-rwxr-xr-x 1 root root 5520 Aug 24 16:14 dietpi.bash
lrwxrwxrwx 1 root root   33 Jun 25 04:15 dietpi-bash_completion.sh -> /etc/profile.d/bash_completion.sh
-rw-r--r-- 1 root root  288 Aug 24 16:14 readme.txt

it’s just that no script is sourcing it, the line mentionned here does not exist in /etc/bash.bashrc (well now it does, I added it manually).

maybe the file has been overwritten by some Debian default. You would need to add the line to the bottom of the file.

On plain Debian /etc/bashrc.d does not exist. This is implemented our end, since we found a complementary solution to /etc/profile.d for interactive non-login (bash) shell sessions useful. Reminds me to push this upstream, as IMO this really is an unnecessarily missing feature in Debian.

If the line in /etc/bash.bashrc is missing, then probably it was overwritten by the package default config file. This should not happen automatically, since /etc/apt/apt.conf.d/97dietpi sets DPkg::options:: "--force-confdef,confold"; to keep old config files in place without interactive console prompt.

So either the latter config was altered of overridden by a higher priority one, or you or something else was replacing /etc/bash.bashrc with /etc/bash.bashrc.dpkg-dist?

However, to fix it:

echo 'for i in /etc/bashrc.d/*.sh /etc/bashrc.d/*.bash; do [ -r "$i" ] && . "$i"; done; unset -v i' | sudo tee -a /etc/bash.bashrc

Can confirm the bit about dpkg options:

root@rpi4:~# cat /etc/apt/apt.conf.d/97dietpi | grep confold
DPkg::options:: "--force-confdef,confold";

I have already manually fixed it, but in the projets github repo I have seen no source of that line of code, so I’m still wondering where it came from in the initial installation.

Anyway, my problem is temporarily fixed, and I know how to fix it next time.

Thanks everybody!

It is just appended by our installer script: DietPi/.build/images/dietpi-installer at 9273dd39756076ee4d8aca71dbe3fac1c077681b · MichaIng/DietPi · GitHub

To check whether dpkg replaced it, does any such file with a suffix exist?

ls -l /etc/bash.bashrc.*

Hi
no, there’s only the base file, no *.dpkg-/ucf- files.
Regards,
-pu

Okay, it remains a mystery then. At least easy to recognize and it does not really break anything aside of login banner and aliases in the interactive shell. We will see whether there are more reports like this, to have another look into how it could have happened.