2

I have an Ubuntu 20.04.1 with an AMD 64bit machine and I am going clueless now over an issue. The software updater was as usual asking for the upgrades and I clicked that damn 'yes'.

It seems to be stuck forever with update-initramfs: Generating /boot/initrd.img-5.4.0-58-generic

In an attempt to fix this problem I made it even worse. Followed a solution similar to this problem and deleted the kernel 5.4.0-58. Luckily I still had my old one 5.4.0-56-generic.

Now when I select the 5.4.0-58-generic version from the boot menu it is going into the kernel panic mode. But with the 5.4.0-56-generic it is booting fine. However, it still is not able to install any packages via apt. It keeps saying

E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.

When I run dpkg --configure -a I get this

udate-initramfs is stuck . The message when it is stuck is (both for -58 and -56) swap: No such file or directory

I am not sure how to fix this problem. Any ideas would be highly appreciated.

1 Answers1

1

Maybe you had a file as swap somewhere. but now for any reason it is removed. but it's entry doesn't removed in other places that point to that swap file. it's better to look at /etc/fstab and check if any entry shows as swap or not.

Run "update-initramfs -c -v" . this will create a new initramfs and output many information during that. so you can check where doest it stuck and can fix it !