0

Following a spate of total freezes on my Acer B116 after upgrading to Ubuntu 16.04, I read this post and decided to upgrade the kernel to 4.7-RC3 using these instructions.

However, there were errors when installing. I tried to then uninstall the kernel using the instruction (from the previous link):

$ sudo apt-get remove 'linux-headers-4.7*' 'linux-image-4.7*'

From the terminal, the error messages are:

/usr/sbin/grub-probe: error: failed to get canonical path of `aufs'.
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 1
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-4.7.0-040700rc3-generic.postrm line 328.
dpkg: error processing package linux-image-4.7.0-040700rc3-generic (--remove):
subprocess installed post-removal script returned error exit status 1
Removing linux-headers-4.7.0-040700rc3-generic (4.7.0-040700rc3.201606121131) ...
Removing linux-headers-4.7.0-040700rc3 (4.7.0-040700rc3.201606121131) ...
Errors were encountered while processing:
linux-image-4.7.0-040700rc3-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

I've also tried to remove the kernel image via Synaptic Package Manager but similar error messages occur.

Advice on how to remove the kernel image would be greatly appreciated. For the record, I now know that installing this kernel is not the solution, and I don't want it installed.

NickT
  • 1

1 Answers1

0

I carried on searching after posting the problem, and found an answer which allowed me get on with installing and upgrading. I am not experienced enough to know if the answer I followed (below) or the solution posted by Zanna (thanks!) is better.

The solution I used was posted in this thread where Ox450 answers his own question, which is as follows:

The cause of the problem:

I checked the dpkg status of the packages:

dpkg --status linux-image-3.13.0.57-generic  
dpkg --status linux-image-extra-3.13.0-57-generic  

The output clearly stated that the packages were in bad state. They were "not fully installed" as I have written in the question above.

The solution:

The entries of these packages must be deleted from the status file of dpkg in order apt-get to function normally. The steps are as follows:

Make sure to make a back up of the status file if something goes wrong.

sudo cp /var/lib/dpkg/status /var/lib/dpkg/status.backupOpen /var/lib/dpkg/status with your preferred text editor and search and delete ONLY the references of the broken packages. You must not delete anything else!

Run sudo apt-get upgrade to make sure that everything is fixed.

NickT
  • 1