Partial upgrade hangs at run-parts: executing /etc/kernel/postinst.d/zz-update-grub 2.6.38-11-generic-pae /boot/vmlinuz-2.6.38-11-generic-pae

Asked by mdmcginn

When I run sudo apt-get install -f, I get the message
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.

When I run that command or Update Manager or update-manager -d, it hangs (even overnight) when it gets to
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 2.6.38-11-generic-pae /boot/vmlinuz-2.6.38-11-generic-pae

So I couldn't run all the commands listed under Step 4 of https://help.ubuntu.com/community/PackageManagerTroubleshootingProcedure

When I use Ctrl-C when it hangs, it says
Errors were encountered while processing:
 linux-image-2.6.38-11-generic-pae

Here is the terminal output from Step 4:
michael@doulos:~$ sudo fuser -vvv /var/lib/dpkg/lock
michael@doulos:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=11.04
DISTRIB_CODENAME=natty
DISTRIB_DESCRIPTION="Ubuntu 11.04"
michael@doulos:~$ uname -a
Linux doulos 2.6.38-11-generic-pae #50-Ubuntu SMP Mon Sep 12 22:21:04 UTC 2011 i686 i686 i386 GNU/Linux
michael@doulos:~$ sudo rm /var/lib/apt/lists/lock
michael@doulos:~$ sudo cp -arf /var/lib/dpkg /var/lib/dpkg.backup
michael@doulos:~$ sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status
michael@doulos:~$ sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available
michael@doulos:~$ sudo rm -rf /var/lib/dpkg/updates/*
michael@doulos:~$ sudo rm -rf /var/lib/apt/lists
michael@doulos:~$ sudo rm /var/cache/apt/*.bin
michael@doulos:~$ sudo mkdir /var/lib/apt/lists
michael@doulos:~$ sudo mkdir /var/lib/apt/lists/partial
michael@doulos:~$ LANG=C;sudo apt-get clean
michael@doulos:~$ LANG=C;sudo apt-get autoclean
Reading package lists... Done
Building dependency tree
Reading state information... Done
michael@doulos:~$ LANG=C;sudo apt-get --purge autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up linux-image-2.6.38-11-generic-pae (2.6.38-11.50) ...
Running depmod.
update-initramfs: Generating /boot/initrd.img-2.6.38-11-generic-pae
Not updating initrd symbolic links since we are being updated/reinstalled
(2.6.38-11.48 was configured last, according to dpkg)
Not updating image symbolic links since we are being updated/reinstalled
(2.6.38-11.48 was configured last, according to dpkg)
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/dkms 2.6.38-11-generic-pae /boot/vmlinuz-2.6.38-11-generic-pae
 * dkms: running auto installation service for kernel 2.6.38-11-generic-pae
 * virtualbox-ose (4.0.4)... [ OK ]
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 2.6.38-11-generic-pae /boot/vmlinuz-2.6.38-11-generic-pae
run-parts: executing /etc/kernel/postinst.d/pm-utils 2.6.38-11-generic-pae /boot/vmlinuz-2.6.38-11-generic-pae
run-parts: executing /etc/kernel/postinst.d/update-notifier 2.6.38-11-generic-pae /boot/vmlinuz-2.6.38-11-generic-pae
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 2.6.38-11-generic-pae /boot/vmlinuz-2.6.38-11-generic-pae

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu apt Edit question
Assignee:
No assignee Edit question
Solved by:
mdmcginn
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1
Revision history for this message
mdmcginn (mcweb) said :
#2

I rebooted and ran Update Manager. This time the partial upgrade was successful.