update-initramfs hangs on debian Stretch
thank you for all your answers. I solved the problem by using ps faux
and identified that sync does nothing/waits forever.
As i had an usb drive which somehow died and got disconnected the drive still showed up as being mounted.
I renamed /bin/sync
to /bin/sync2
, copied /bin/ls
to /bin/sync
and ran apt-get upgrade
. It was successful so I renamed the files, rebooted and finally got rid of the disconnected drive.
Christian
Updated on September 18, 2022Comments
-
Christian over 1 year
using apt-get upgrade on Debian left me with the decision to update to kernel 4.9.0-6 but the installation never finishes. It always stalls at the following stage:
Setting up linux-image-4.9.0-6-amd64 (4.9.82-1+deb9u3) ... /etc/kernel/postinst.d/initramfs-tools: update-initramfs: Generating /boot/initrd.img-4.9.0-6-amd64
Nothing happens after that. I do end the processes and start update-initramfs -v -u so see what happens and what not. The update-initramfs stalls at:
Building cpio /boot/initrd.img-4.9.0-6-amd64.new initramfs
Does anyone have an idea what to do? The update from jessie to stretch (some days ago) went without any problems and I do not have modified anything since then.
-
Rui F Ribeiro about 6 yearsif you do
sudo dpkg --purge os-prober
, is it able to complete? -
Ferenc Wágner about 6 yearsBuilding the new initramfs file can take minutes. Find the PID of the
cpio
process underupdate-initramfs
in the output ofps af
, and runstrace -p <PID>
to see if it's chugging along. Also check yourkern.log
for disk errors. -
bryn about 6 yearsI have the same problem:
Building cpio /boot/initrd.img-4.15.0-1-amd64.new initramfs
hangs forever. I can't find any cpio process running on my system :o -
hayath786 about 6 yearsUse
ps fux
to identify the process that hangs (the last process spawned during installation).
-
-
CDuv over 5 yearsThanks, I had this issue on Ubuntu while performing an
aptitude upgrade
, it hanged on update-initramfs: Generating /boot/initrd.img-4.4.0-133-generic. I usedmv /bin/sync /bin/sync2 ; cp -a /bin/ls /bin/sync
, killed the /bin/sh /usr/sbin/update-initramfs -u and re-ranaptitude upgrade
. -
Luciano Andress Martini over 4 years+1 You just saved me fixing a database that runs nightly upgrades.