initramfs fail after upgrade to 13.04, can't update system with apt-get / dpkg

Todd

The other night I received the prompt suggesting for me to upgrade from 12.10 to 13.04. I figured why not, and accepted the upgrade. I had very little interaction, just clicked the accept button, and came back to an upgraded machine in an hour or so.

initramfs now fails on old linux headers which I do not believe exist on my system, and I am unable to update anything on my system which depends on it (which is, pretty much everything, including graphics drivers, system updates, etc). I have been trying to resolve this issue for nearly a month now, and have learned quite a lot about Ubuntu/Linux in the process, though I am still not sure what I have to do to get past the following error.

Whenever I run commands such as:

sudo apt-get install  (with -f or not)
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo apt-get remove
sudo apt-get autoremove
sudo update-initramfs -u

I will receive the following messages/errors and will not be able to continue the process:

Setting up initramfs-tools (0.103ubuntu0.7) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools ...
update-initramfs: Generating /boot/initrd.img-3.8.0-31-generic
Fatal: open /boot/vmlinuz-3.5.0-21-generic: No such file or directory
run-parts: /etc/initramfs/post-update.d//runlilo exited with return code 1
dpkg: error processing initramfs-tools (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)

Both sudo apt-get clean and sudo apt-get autoclean seem to have no effect. Using sudo apt-get update appears to run as expected, but no change as far as receiving the above error with subsequent commands.

Running sudo dpkg-reconfigure -a did not make a difference.

I've learned that there may be remnants of '3.5.0-21-generic' on my system. I've done my best at locating them and moving them to a tmp dir in my home. I've examined my /etc/apt/sources.list for any references to those headers, and there aren't any.

I've examined the contents of /var/lib/dpkg/info/linux-image-generic.list which is as follows:

/.
/usr
/usr/share
/usr/share/doc
/usr/share/doc/linux-image-generic
/usr/share/doc/linux-image-generic/copyright
/usr/share/doc/linux-image-generic/changelog.gz

I've checked the contents of all of those locations, and found no references to anything with 3.5.0-21, and in fact searching my entire system, the only files with that string in the name now exist in my new tmp dir that I moved everything into. I've also moved the references to linux-image-3.5.0-21-generic.* and linux-image-extra-3.5.0-22-generic.* that were in /var/lib/dpkg/info into my new tmp dir.

It seems to me that there isn't any place where vmlinuz-3.5.0-21-generic can be on my system. I can't find any when searching all files for anything containing 3.5.0-21. I still can't use initramfs, which implies that I can't update/upgrade my system, install new packages, or fix a few other issues that sprung up when I upgraded to 13.04.

What follows is (some of) my output from:

$ sudo update-initramfs -u -v
Available versions:  3.8.0-31-generic 3.5.0-41-generic
Keeping /boot/initrd.img-3.8.0-31-generic.dpkg-bak
update-initramfs: Generating /boot/initrd.img-3.8.0-31-generic
Adding module /lib/modules/3.8.0-31-generic/kernel/drivers/hid/hid.ko
... (mostly adding/calling happening here, hundreds of lines of output, seems successful)
Calling hook busybox
Adding binary /usr/lib/initramfs-tools/bin/busybox
Calling hook dmsetup
Adding binary /sbin/dmsetup
Adding library /lib/i386-linux-gnu/libdevmapper.so.1.02.1
rm -f ./etc/ld.so.conf.d/nvidia_settings.conf 
rm -f ./lib/firmware/cxgb4/t4fw.bin 
Building cpio /boot/initrd.img-3.8.0-31-generic.new initramfs
Fatal: open /boot/vmlinuz-3.5.0-21-generic: No such file or directory
run-parts: /etc/initramfs/post-update.d//runlilo exited with return code 1

Could anyone please help me understand this problem, and how I can alleviate it? What can I do to get past this? I really don't want to resort to completely reinstalling my system, is there any other way to fix this?

Todd

I fixed the issue, and can now update my system as normal. However, I still dont understand how this issue began.

In any event, I went ahead and installed both the first listed missing kernel, 3.5.0-21. I have since edited this aspect of the question out, but after getting 3.5.0-21 installed, initramfs began whining about 3.5.0-17. So I decided I had delt with this issue and allowed it to consume way too much of my time, and backed up all my data, and prepared for the worst but hoped for the best.

I figured out how to download old/deprecated linux kernel/headers by searching for them on packages.ubuntu.com. I then edited my /etc/apt/sources.list file to allow the candidate versions associated with these two linux images to be downloaded. I then ran 'sudo apt-get update' to update the sources. Then I was able to run 'sudo apt-get download linux-image3.5.0-##-generic' and succesfully installed both packages.

After this, all my apt-get commands continued to function, I managed to get the latest updates to 13.04 installed and also all of my other user software updated.

Then, after restart, my mouse and keyboard were no longer responding! My grub menu disappeared! I couldnt get tty terminal up, or do anything really. From my windows computer, I downloaded a 13.10 image, created a usb flash ubuntu boot disk, and rescued grub after booting from this flash volume. After rescuing grub, I was able to boot into recovery mode, and fix any bad packages or whatever it was that happened. After rebooting into my machine, I could log in with full mouse and keyboard. Now my system seems stable and whoa am I amazed at what a learning experience this all is.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

initramfs fail after upgrade to 13.04, can't update system with apt-get / dpkg

From Dev

Can't boot after apt-get update && upgrade

From Dev

Can't upgrade/update ubuntu 18.04 as apt/dpkg error is showing up

From Dev

Debian dpkg broken after apt-get upgrade

From Dev

apt-get update fails after upgrade

From Dev

apt-get update fails after upgrade

From Dev

after upgrade from Ubuntu 18.04 to 20.04: 'apt-get update' fails with dpkg "pre-removal script subprocess was killed by signal (Terminated)"

From Dev

initramfs, LUKS and dm_mod can't boot after upgrade

From Dev

no internet after apt-get update && apt-get upgrade

From Dev

insync messed up apt and I can't do apt-get update/upgrade

From Dev

How do you recover from a failed upgrade ('apt-get -f install' and 'dpkg --configure -a' fail)?

From Dev

How do you recover from a failed upgrade ('apt-get -f install' and 'dpkg --configure -a' fail)?

From Dev

Can't apt-get update after firewalling with Iptables

From Dev

Ubuntu can't apt-get upgrade

From Dev

Ican't update/upgrade with apt or apt-get

From Dev

Problems with apt-get upgrade(dpkg and bluez)

From Dev

Can't apt update after deleting proxy

From Dev

Issue with dpkg and sudo apt-get update

From Dev

PHP Can't connect to external Mysql after apt upgrade

From Dev

Can't run apt-get upgrade ubuntu 14.04 gnome

From Dev

dpkg error when running sudo apt-get upgrade

From Dev

Error in dpkg when executing apt-get upgrade ( most of the commands )

From Dev

APT unable to update after release upgrade

From Dev

sudo apt upgrade not working after ubuntu update

From Dev

Fail to sudo apt-get update

From Dev

apt-get update fail (file not found)

From Dev

Will "apt-get upgrade" update the kernel on LTS?

From Dev

Will "apt-get upgrade" update the kernel on LTS?

From Dev

Is apt-get update and upgrade necessary?

Related Related

  1. 1

    initramfs fail after upgrade to 13.04, can't update system with apt-get / dpkg

  2. 2

    Can't boot after apt-get update && upgrade

  3. 3

    Can't upgrade/update ubuntu 18.04 as apt/dpkg error is showing up

  4. 4

    Debian dpkg broken after apt-get upgrade

  5. 5

    apt-get update fails after upgrade

  6. 6

    apt-get update fails after upgrade

  7. 7

    after upgrade from Ubuntu 18.04 to 20.04: 'apt-get update' fails with dpkg "pre-removal script subprocess was killed by signal (Terminated)"

  8. 8

    initramfs, LUKS and dm_mod can't boot after upgrade

  9. 9

    no internet after apt-get update && apt-get upgrade

  10. 10

    insync messed up apt and I can't do apt-get update/upgrade

  11. 11

    How do you recover from a failed upgrade ('apt-get -f install' and 'dpkg --configure -a' fail)?

  12. 12

    How do you recover from a failed upgrade ('apt-get -f install' and 'dpkg --configure -a' fail)?

  13. 13

    Can't apt-get update after firewalling with Iptables

  14. 14

    Ubuntu can't apt-get upgrade

  15. 15

    Ican't update/upgrade with apt or apt-get

  16. 16

    Problems with apt-get upgrade(dpkg and bluez)

  17. 17

    Can't apt update after deleting proxy

  18. 18

    Issue with dpkg and sudo apt-get update

  19. 19

    PHP Can't connect to external Mysql after apt upgrade

  20. 20

    Can't run apt-get upgrade ubuntu 14.04 gnome

  21. 21

    dpkg error when running sudo apt-get upgrade

  22. 22

    Error in dpkg when executing apt-get upgrade ( most of the commands )

  23. 23

    APT unable to update after release upgrade

  24. 24

    sudo apt upgrade not working after ubuntu update

  25. 25

    Fail to sudo apt-get update

  26. 26

    apt-get update fail (file not found)

  27. 27

    Will "apt-get upgrade" update the kernel on LTS?

  28. 28

    Will "apt-get upgrade" update the kernel on LTS?

  29. 29

    Is apt-get update and upgrade necessary?

HotTag

Archive