Die Bedienung der Bash-CLI erfolgt in diesem Artikel als root
. Die Fehlerbeschreibung der Bash schaut wie folgt aus:
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-4.19.0-11-amd64
cryptsetup: WARNING: The initramfs image may not contain cryptsetup binaries
nor crypto modules. If that's on purpose, you may want to uninstall the
'cryptsetup-initramfs' package in order to disable the cryptsetup initramfs
integration and avoid this warning.
cp: cannot stat '/etc/lvm/': No such file or directory
E: /usr/share/initramfs-tools/hooks/zz-busybox failed with return 1.
update-initramfs: failed for /boot/initrd.img-4.19.0-11-amd64 with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-4.19.0-11-amd64 (--configure):
installed linux-image-4.19.0-11-amd64 package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of linux-image-amd64:
linux-image-amd64 depends on linux-image-4.19.0-11-amd64; however:
Package linux-image-4.19.0-11-amd64 is not configured yet.
dpkg: error processing package linux-image-amd64 (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
linux-image-4.19.0-11-amd64
linux-image-amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)
Es tauchen einige Probleme auf, wenn man die Console genau anschaut. Es fällt auf, dass die initramfs-tools Probleme bei den Update-Hooks von Debian haben. Um diese zu analysieren, muss initramfs inspiziert werden:
root@server:~# update-initramfs -u -v
............
......
Adding binary /sbin/blkid
Calling hook xfs
Calling hook zz-busybox
E: /usr/share/initramfs-tools/hooks/zz-busybox failed with return 1.
Removing /boot/initrd.img-4.19.0-10-amd64.dpkg-bak
update-initramfs: failed for /boot/initrd.img-4.19.0-10-amd64 wi
Wie man sieht, ist das Script /usr/share/initramfs-tools/hooks/zz-busybox fehlerhaft. Um dies zu debuggen, geht man wie folgt vor. Editiere das Script mit dem Editor deiner Wahl und setze das Flag set -x
an den Anfang
............
......
Adding binary /sbin/blkid
Calling hook xfs
vi /usr/share/initramfs-tools/hooks/zz-busybox
Der Output gibt mehr Informationen zum Problem. In diesem Fall fehlt die Binary busybox:
E: /usr/share/initramfs-tools/hooks/zz-busybox failed with return 1.
Die Lösung für die fehlende busybox Binary (apt-get install schaut evtl. defekt aus, kann jedoch die Installation durchführen):
apt-get install busybox
Bei einem weiteren Durchlauf von update-initramfs -u -v
erscheint eventuell eine weitere Nachricht, wie beispielsweise diese:
Calling hook mdadm
E: /usr/share/initramfs-tools/hooks/mdadm failed with return 1.
Nun fehlt noch die binary für mdadm, die sich einfach nach installieren lässt:
apt-get install mdadm
Den Vorgang bei Bedarf erneut durchführen und gewissenhaft debuggen.