Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have seen some similar questions but none that I have seen have resolved my issue. An error occured durring a kernel upgrade on Ubuntu 12.04 from linux-image-3.2.0-36-generic to linux-image-3.2.0-38-generic. A Kernel Panic occurs on boot while booting with 3.2.0-38.

Booting in under `3.2.0-36 the system starts normally. However when I attempt to remove clean or configure the affected kernel package it throws the following error:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
initramfs-tools : Depends: initramfs-tools-bin (< 0.99ubuntu13.1~) but 0.99ubuntu13.1 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

Attempting sudo apt-get -f install, meets with no success citing dependency and configuration issues, after the package retrevial:

dpkg: dependency problems prevent configuration of initramfs-tools:
 initramfs-tools depends on initramfs-tools-bin (<< 0.99ubuntu13.1~); however:
  Version of initramfs-tools-bin on system is 0.99ubuntu13.1.
dpkg: error processing initramfs-tools (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-image-3.2.0-38-generic:
 linux-image-3.2.0-38-generic depends on initramfs-tools (>= 0.36ubuntu6); however:
  Package initramfs-tools is not configured yet.
dpkg: error processing linux-image-3.2.0-38-generic (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error    from a previous failure.
                          No apport report written because the error message indicates its a followup error from a previous failure.
                                                    dpkg: dependency problems prevent configuration of casper:
 casper depends on initramfs-tools (>= 0.92bubuntu55); however:
  Package initramfs-tools is not configured yet.
dpkg: error processing casper (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                          Errors were encountered while processing:
 initramfs-tools
 linux-image-3.2.0-38-generic
 casper
E: Sub-process /usr/bin/dpkg returned an error code (1)

I receive similar errors when running dpkg -- configure -a, apt-get -f dist-upgrade and apt-get -f autoremove.

Any ideas on what exactly corrupted during the kernel upgrade and how I can roll back my kernel version without using Apt-get or Dpkg?

share|improve this question
    
Did you already try a sudo apt-get update before sudo apt-get -f install? –  Eric Carvalho Mar 5 '13 at 16:00
    
Indeed I did. apt-get update updates the repositories successfully. apt-get clean also works. But purge, build-dep, and remove all fail, citing the unmet dependencies. –  Simianspaceman Mar 5 '13 at 16:06
add comment

3 Answers 3

up vote 6 down vote accepted

The procedure is recover from this problem is to temporarly remove all problematic packages with:

 dpkg --force-depends --purge <packages> 

Afterwards repair the missing dependencies with

apt-get install -f

Ensure that your system is running not on the 3.2.0-38 kernel with

uname -r 

Then I suggest to do a:

dpkg --force-depends --purge linux*3.2.0-38*
apt-get install -f
share|improve this answer
    
How long should this process hang on the memtest86+ image? –  Simianspaceman Mar 5 '13 at 16:31
    
Great answer, I just fixed my problems by doing it with initramfs-tools as package. –  Lauer Apr 14 at 17:36
add comment

The packages causing all this trouble are initramfs-tools and initramfs-tools-bin. Their versions are 0.99ubuntu13 in precise repository and 0.99ubuntu13.1 in precise-updates repository. Somehow the package lists are in a inconsistent state making apt trying to install one version from each repository.

Remove the package lists:

sudo rm /var/cache/apt/*.bin /var/lib/apt/lists/* /var/lib/apt/lists/partial/*

Then run apt-get update to download new package lists, then try apt-get -f install again.

share|improve this answer
    
It seems to be hanging a bit on: Found memtest86+ image: /boot/memtest86+.bin. How long is it supposed to stay on that message? –  Simianspaceman Mar 5 '13 at 18:20
    
It shold be fast. What's the output of apt-get -f install? –  Eric Carvalho Mar 5 '13 at 19:43
    
it would hang at at all messages that contained boot/memtest86+.bin. In this case it was solved by repeated purging and updating. But removing the lists directory seemed to help. It was ultimately a mix of the two methods. –  Simianspaceman Mar 15 '13 at 21:46
add comment

This helped me in solving the issue:

sudo apt-get remove grub*

followed by

sudo apt-get update && sudo apt-get upgrade

Hope this helps you too.

Automatic translation from the original answer in Spanish.

share|improve this answer
    
Welcome to Ask Ubuntu! This is an English-only site, please keep your post in English. –  gertvdijk Jul 9 '13 at 16:02
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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