Bullseye to bookworm update stuck

Hello,

I tried updating my pi from bullseys to bookworm with the dietpies update script.

The update to bookworm seems to have succeeded (at least the distro version reports bookworm) but the update script freezes when running `APT purge crda` and then nothing happens afterwards.

What may I try to keep the script going?

Thanks in advance and kind regards
Andreas

Creating a bug report/issue

yes I have searched the existing open and closed issues

Required Information

  • 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 | bookworm 0
  • Kernel version | Linux DietPi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux
  • Architecture | armhf
  • SBC model | RPi 4 Model B (aarch64)
  • Power supply used | original Pi
  • SD card used | SanDisk ultra

Steps to reproduce

  1. run the bullseye to bookworm update script

Actual behaviour

  • the script freezes when running `APT purge crda`

Extra details

firmware-mediatek is already the newest version (1:20240709-2~bpo12+1+rpt3).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
[  OK  ] dietpi-bookworm-upgrade | APT install firmware-mediatek
[  OK  ] dietpi-bookworm-upgrade | update-alternatives --set regulatory.db /lib/firmware/regulatory.db-upstream
[  OK  ] dietpi-bookworm-upgrade | apt-mark manual wireless-regdb
[ INFO ] dietpi-bookworm-upgrade | APT purge crda, please wait…
[ INFO ] dietpi-bookworm-upgrade | None of the packages are currently installed. Aborting…
[  OK  ] dietpi-bookworm-upgrade | APT purge crda

This is the last output, the script does not terminate, it just seems to be stuck here as nothing is happening any more.

I think you have misinterpreted the information. The step is actually complete and the script is stuck on one of the next steps. The exact order depends somewhat on the software installed. How long has it been stuck at this point?

Thanks! This is what I figured later.
It was stuck in the openssh part of the migration script for about 10 minutes, then I stopped the script execution.

I removed the openssh part and the script completed as it should in no manner.
So far I did not notice any problems.

That part just checks for some lines of the OpenSSH config :thinking:. Does this also hang when executing those commands manually?

set -x
[[ -f '/etc/ssh/sshd_config' ]] && \
grep -q '^[[:blank:]]*ChallengeResponseAuthentication[[:blank:]]' /etc/ssh/sshd_config && \
! grep -q '^[[:blank:]]*KbdInteractiveAuthentication[[:blank:]]' /etc/ssh/sshd_config
set +x

No, it does not seem like it hangs :thinking:

dietpi@DietPi:~$ set -x
[[ -f '/etc/ssh/sshd_config' ]] && \
grep -q '^[[:blank:]]*ChallengeResponseAuthentication[[:blank:]]' /etc/ssh/sshd_config && \
! grep -q '^[[:blank:]]*KbdInteractiveAuthentication[[:blank:]]' /etc/ssh/sshd_config
set +x
+ [[ -f /etc/ssh/sshd_config ]]
+ set +x
dietpi@DietPi:~$

Now I found and fixed it: dietpi-bookworm-upgrade: fix OpenVPN config update · MichaIng/DietPi@50527ad · GitHub
It was the step after the OpenSSH update, the OpenVPN update. The grep command was missing the file argument, hence was waiting for input from STDIN.

Please retry with the version from dev branch:

sudo bash -c "$(curl -sSf 'https://raw.githubusercontent.com/MichaIng/DietPi/dev/.meta/dietpi-bookworm-upgrade')"

I ran into this exact problem upgrading my NanoPi NEO2 (running Dietpi since 2018), the dev script worked beautifully.

Nice, thank you very very much! :slight_smile:

Have a nice day and kind regards
Andreas