Error when updating to 8.9

Hi, I was upgrading from 8.8 to 8.9 but every time I was receveing this error:

Probably because I’m using a custom font for my attached display, see this old post: Change default font terminal in DietPI

So I deleted the console-setup package, updated, all fine, but now I can’t reinstall the package because I see this error:

Setting up console-setup (1.205+rpt1) ...
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
dpkg: error processing package console-setup (--configure):
 installed console-setup package post-installation script subprocess returned error exit status 20
Errors were encountered while processing:
 console-setup
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@Pi-Hole:~# 

Now I can’t again change the font simply because I don’t have the console-setuppackage correctly installed, other things are working but every time I reboot the RaspberryPI I have to wait 3 minutes:

How can I reinstall this package - fix this issue? Every time I try to remove and reinstall it I get:

Preparing to unpack .../console-setup_1.205+rpt1_all.deb ...
Unpacking console-setup (1.205+rpt1) ...
Setting up console-setup (1.205+rpt1) ...
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
dpkg: error processing package console-setup (--configure):
 installed console-setup package post-installation script subprocess returned error exit status 20
Errors were encountered while processing:
 console-setup
E: Sub-process /usr/bin/dpkg returned an error code (1)

dpkg: error processing package console-setup (--configure):
 installed console-setup package post-installation script subprocess returned error exit status 20
Errors were encountered while processing:
 console-setup
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@Pi-Hole:~# 

Thanks

Edit: I updated my other RaspberryPI with DietPI from 8.8 to 8.9 without issue, so the problem is this package or the fact that I changed something inside the display font (now I also don’t remember what I’ve made months ago…)

did you tried using dietpi-config > 5 : Language/Regional Options to configure Locale

another option might be

rm /etc/default/locale
dpkg-reconfigure locales

Our default is C.UTF-8

Yes I already tried. Same error.


root@Pi-Hole:~# rm /etc/default/locale
root@Pi-Hole:~# dpkg-reconfigure locales
Generating locales (this might take a while)...
  C.UTF-8... done
Generation complete.
root@Pi-Hole:~# sudo apt install console-setup
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
console-setup is already the newest version (1.205+rpt1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up console-setup (1.205+rpt1) ...
dpkg: error processing package console-setup (--configure):
 installed console-setup package post-installation script subprocess returned error exit status 20
Errors were encountered while processing:
 console-setup
E: Sub-process /usr/bin/dpkg returned an error code (1) 

you need to reboot in between. Did you try that?

1 Like

Yes, I pasted all the output in one time but I rebooted after removing and setting the locales.

I thought it was also the issue, I also changed manually, reloaded the C.UTF-8 locale… nothing… I’m unable to fix/reinstall the console-setup package.

@MichaIng can you have a look on how to debug the post-installation script of console-setup package

1 Like

Can you show the output of:

bash -x /var/lib/dpkg/info/console-setup.postinst

Sure, thanks for the help:

root@Pi-Hole:~# bash -x /var/lib/dpkg/info/console-setup.postinst
+ set -e
+ . /usr/share/debconf/confmodule
++ '[' '!' '' ']'
++ PERL_DL_NONLAZY=1
++ export PERL_DL_NONLAZY
++ '[' '' ']'
++ exec /usr/share/debconf/frontend /var/lib/dpkg/info/console-setup.postinst
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LC_CTYPE = "UTF-8",
	LANG = "C.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("C.UTF-8").
Use of uninitialized value $action in string eq at /usr/share/debconf/frontend line 27.
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
root@Pi-Hole:~# 

Still an issue with the locale. It tries to use the same as fallback, which fails again. Can you show:

ls -l /usr/lib/locale
locale -a
root@Pi-Hole:~# ls -l /usr/lib/locale
total 1860
drwxr-xr-x 3 root root    4096 Sep 11 04:00 C.UTF-8
-rw-r--r-- 1 root root 1973920 Sep 27 11:49 locale-archive
root@Pi-Hole:~# locale -a
C
C.UTF-8
C.utf8
POSIX

Some updates here, I tried to configure dpkg-reconfigure locales, then I selected nothing/no locales, and it worked!

[root@pi-Hole:~# dpkg-reconfigure locales
Generating locales (this might take a while)..
Generation complete.
[root@pi-Hole:~# apt install console-setup
Reading package lists... Done
Building dependency tree..
Done
Reading state information... Done
console-setup is already the newest version (1.205+rpt1)
0 upgraded, 0 newly installed, o to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
[Do vou want to continue? [Y/n] v
Setting up console-setup(1.205+rpt1)
root@pi-Hole:~#

But every time I boot it takes 3 minutes to start, due to this error that’s still here

A start job is running for Helper to synchronize boot up for ifupdown

I thinks is something related to the failed kernel update or similare, I have never seen it, someone know what is and how to have a normal/fast boot?

Thanks!

could you share following right after reboot

journalctl -u ifup@eth0.service

Yes but not right after boot because the interface is down and I can’t SSH to it, I have to wait these 3 annoying minutes every time…

root@Pi-Hole:~# journalctl -u ifup@eth0.service
-- Journal begins at Wed 2022-09-28 09:30:35 CEST, ends at Wed 2022-09-28 09:33:22 CEST. --
Sep 28 09:30:36 Pi-Hole systemd[1]: Starting ifup for eth0...
Sep 28 09:30:36 Pi-Hole systemd[1]: Finished ifup for eth0.
root@Pi-Hole:~# 

could you reboot the system and export the entire system log once you have access

journalctl > /tmp/log.txt

Attach the log to your post

Yes, it’s here. But I have rebooted it few hours ago.

log.txt (1.8 MB)

PS: I’ve done all via iPhone connected to my home via VPN, I just discovered that it’s possible also to copy files from SSH :sunglasses: it’s a bit uncomfortable for the size of the text :grin:

Thanks!

Unfortunately, the log did not contain the boot process. There is nothing else than this

Sep 28 10:12:59 Pi-Hole sudo[240648]:   dietpi : TTY=tty1 ; PWD=/tmp/padd_1000 ; USER=root ; COMMAND=/usr/sbin/unbound-control stats_noreset
Sep 28 10:12:59 Pi-Hole sudo[240648]: pam_unix(sudo:session): session opened for user root(uid=0) by dietpi(uid=1000)
Sep 28 10:12:59 Pi-Hole sudo[240648]: pam_unix(sudo:session): session closed for user root
1 Like

DietPi will automatically clear log files in /var/log every hour (to free memory)

Oh damn, what a stupid, I forgot it and I haven’t opened the log (because it was illegible from the phone :D)

Here’s the log right after the boot:

log new.txt (77.5 KB)

This is the issue (I don’t know if also the i2cprobe is an issue or only the interface, I’m investigating) :thinking:

Sep 28 14:35:29 Pi-Hole systemd-udevd[177]: 22-005d: Spawned process '/usr/lib/raspberrypi-sys-mods/i2cprobe' [243] is taking longer than 59s to complete
Sep 28 14:35:29 Pi-Hole systemd-udevd[173]: 22-0014: Spawned process '/usr/lib/raspberrypi-sys-mods/i2cprobe' [246] is taking longer than 59s to complete
Sep 28 14:35:30 Pi-Hole systemd-udevd[168]: 22-0014: Worker [173] processing SEQNUM=1582 is taking a long time
Sep 28 14:35:30 Pi-Hole systemd-udevd[168]: 22-005d: Worker [177] processing SEQNUM=1586 is taking a long time
Sep 28 14:36:29 Pi-Hole systemd[1]: ifupdown-pre.service: Main process exited, code=exited, status=1/FAILURE
Sep 28 14:36:29 Pi-Hole systemd[1]: ifupdown-pre.service: Failed with result 'exit-code'.
Sep 28 14:36:29 Pi-Hole systemd[1]: Failed to start Helper to synchronize boot up for ifupdown.
Sep 28 14:36:29 Pi-Hole systemd[1]: Dependency failed for Raise network interfaces.
Sep 28 14:36:29 Pi-Hole systemd[1]: networking.service: Job networking.service/start failed with result 'dependency'.

Investigating the issue should be something related to

service network-manager start

Inside there’s a file called dietpi.conf

# Assure that ifupdown-pre always waits for udev to settle: https://dietpi.com/forum/t/dietpi-8-2-2-wireguard-doesnt-start-after-reboot/6415/28?u=michaing
[Service]
ExecStart=
ExecStart=/bin/dash -c '[ "$CONFIGURE_INTERFACES" = "no" ] || [ ! -x /bin/udevadm ] || udevadm settle'

Okay, I have to solve it, but to avoid the annoying 3 minutes wait every reboot, what is the correct entry to change the network timeout to 30 secs? In systemd-system.conf?

[Manager]
#LogLevel=info
#LogTarget=journal-or-kmsg
#LogColor=yes
#LogLocation=no
#LogTime=no
#DumpCore=yes
#ShowStatus=yes
#CrashChangeVT=no
#CrashShell=no
#CrashReboot=no
#CtrlAltDelBurstAction=reboot-force
#CPUAffinity=1 2
#NUMAPolicy=default
#NUMAMask=
#RuntimeWatchdogSec=0
#RebootWatchdogSec=10min
#ShutdownWatchdogSec=10min
#KExecWatchdogSec=0
#WatchdogDevice=
#CapabilityBoundingSet=
#NoNewPrivileges=no
#SystemCallArchitectures=
#TimerSlackNSec=
#StatusUnitFormat=description
#DefaultTimerAccuracySec=1min
#DefaultStandardOutput=journal
#DefaultStandardError=inherit
#DefaultTimeoutStartSec=90s
#DefaultTimeoutStopSec=90s
#DefaultTimeoutAbortSec=
#DefaultRestartSec=100ms
#DefaultStartLimitIntervalSec=10s
#DefaultStartLimitBurst=5
#DefaultEnvironment=
#DefaultCPUAccounting=no
#DefaultIOAccounting=no
#DefaultIPAccounting=no
#DefaultBlockIOAccounting=no
#DefaultMemoryAccounting=yes
#DefaultTasksAccounting=yes
#DefaultTasksMax=15%
#DefaultLimitCPU=
#DefaultLimitFSIZE=
#DefaultLimitDATA=
#DefaultLimitSTACK=
#DefaultLimitCORE=
#DefaultLimitRSS=
#DefaultLimitNOFILE=1024:524288
#DefaultLimitAS=
#DefaultLimitNPROC=
#DefaultLimitMEMLOCK=
#DefaultLimitLOCKS=
#DefaultLimitSIGPENDING=
#DefaultLimitMSGQUEUE=
#DefaultLimitNICE=
#DefaultLimitRTPRIO=
#DefaultLimitRTTIME=

Ahmmm DietPi is not using network-manager on a default installation. We use ifupdown to manage network connection. network-manager would be conflicting with ifupdown and both should not be used in parallel. Or do I misunderstand your statement?

This is the service which hangs:

journalctl -u ifupdown-pre

It waits for udev to settle before trying to initiate network interfaces. If it hangs, then there seems to be some hardware device flashing events until the timeout for udev is hit.

1 Like