while doing an apt upgrade on my Raspberry Pi 4 (Raspbian 10 - Buster), dpkg was interrupted during setup of the raspberrypi-kernel package:

raspberrypi-kernel (1.20190819-1) wird eingerichtet ...
»Umleitung von /boot/bcm2708-rpi-b-plus.dtb zu /usr/share/rpikernelhack/bcm2708-rpi-b-plus.dtb durch rpikernelhack« wird entfernt

which probably translates to

Set up raspberrypi-kernel (1.20190819-1) ...
»Diversion of /boot/bcm2708-rpi-b-plus.dtb to /usr/share/rpikernelhack/bcm2708-rpi-b-plus.dtb by rpikernelhack« will be removed

This process will hang forever (over night in my case). When I restart apt upgrade, the well known hint to use dpkg --configure -a will appear:

xxxxx@yyyyyyy:$sudo apt upgrade
[sudo] Passwort für xxxxx:
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.

Executing dpkg --configure -a, will also hang forever and even cannot be interrupted using CTRL-C. I'll have to log into another session in order to explicitly kill dpkg. On top of not being able to finish the kernel upgrade (which leaves me in a pretty unpleasant situation), the system load in top will increase with every trial, without any visible CPU- or I/O-intense processes. The only way I was able to reboot, was connecting the SD-Card to another Raspbian 10 device and copying all the missing files from that device's /boot-Directory to my non-working device's /boot-directory.

I checked the SD-card on my computer - it seems perfectly ok.

Any ideas how to solve this? Since I've put quite some effort into this system during the last months, setting it up from scratch would be the ultima ratio.

  • Please don't give additional information in comments. Instead edit the question and add it there.
    – Ingo
    Commented Sep 2, 2019 at 16:15
  • Thanks for the hint @Ingo. I wasn't able to close the question so this seemed appropriate to me.
    – Thomas R
    Commented Sep 4, 2019 at 11:02
  • If you have found the solution so please make an answer. Two days later you can accept your own answer. This will finish the whole question.
    – Ingo
    Commented Sep 4, 2019 at 15:49

1 Answer 1


Found out, that the reason for the hanging dpkg process was a hanging call to sync in two post-installation-scripts: raspberrypi-kernel.postinst and raspberrypi-bootloader.postinst, both located at /var/lib/dpkg/info/. After remounting root-fs using the sync option (mount -o remount,sync,rw,noatime /) and commenting out every call of sync in both scripts, I managed to get the new kernel installed and thus, finally be able to reboot again which finally also fixed the weird I/O problems causing sync to hang.

Still not sure, why sync didn't work before, but this method solved the situation.

  • Please accept your own answer with a click on the tick on its left side. Only this will finish the question and it will not pop up again year for year.
    – Ingo
    Commented Feb 2, 2020 at 19:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.