1

I upgraded from Ubuntu 12.04 LTS to 14.04 LTS

When I try to run sudo apt-get upgrade, I get:

Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.2.0-33-generic /boot/vmlinuz-3.2.0-33-generic
update-initramfs: Deleting /boot/initrd.img-3.2.0-33-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.2.0-33-generic /boot/vmlinuz-3.2.0-33-generic
Generating grub configuration file ...
cat: /video.lst: No such file or directory
/usr/sbin/grub-probe: error: failed to get canonical path of `'.
No path or device is specified.
Usage: grub-probe [OPTION...] [OPTION]... [PATH|DEVICE]
Try 'grub-probe --help' or 'grub-probe --usage' for more information.
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 64
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-3.2.0-33-generic.postrm line 328.
dpkg: error processing package linux-image-3.2.0-33-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
No apport report written because MaxReports is reached already
                                                              Removing linux-image-3.2.0-34-generic (3.2.0-34.53) ...

Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.2.0-34-generic /boot/vmlinuz-3.2.0-34-generic
update-initramfs: Deleting /boot/initrd.img-3.2.0-34-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.2.0-34-generic /boot/vmlinuz-3.2.0-34-generic
Generating grub configuration file ...
cat: /video.lst: No such file or directory
/usr/sbin/grub-probe: error: failed to get canonical path of `'.
No path or device is specified.
Usage: grub-probe [OPTION...] [OPTION]... [PATH|DEVICE]
Try 'grub-probe --help' or 'grub-probe --usage' for more information.
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 64
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-3.2.0-34-generic.postrm line 328.
dpkg: error processing package linux-image-3.2.0-34-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
No apport report written because MaxReports is reached already
                                                              Removing linux-image-3.2.0-35-generic (3.2.0-35.55) ...

<snip>
<snip>
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.2.0-65-generic /boot/vmlinuz-3.2.0-65-generic
update-initramfs: Deleting /boot/initrd.img-3.2.0-65-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.2.0-65-generic /boot/vmlinuz-3.2.0-65-generic
Generating grub configuration file ...
cat: /video.lst: No such file or directory
/usr/sbin/grub-probe: error: failed to get canonical path of `'.
No path or device is specified.
Usage: grub-probe [OPTION...] [OPTION]... [PATH|DEVICE]
Try 'grub-probe --help' or 'grub-probe --usage' for more information.
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 64
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-3.2.0-65-generic.postrm line 328.
dpkg: error processing package linux-image-3.2.0-65-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
No apport report written because MaxReports is reached already
                                                              Errors were encountered while processing:
 linux-image-3.2.0-26-generic
 linux-image-3.2.0-27-generic
 linux-image-3.2.0-29-generic
 linux-image-3.2.0-30-generic
 linux-image-3.2.0-31-generic
 linux-image-3.2.0-32-generic
 linux-image-3.2.0-33-generic
 linux-image-3.2.0-34-generic
 linux-image-3.2.0-35-generic
 linux-image-3.2.0-36-generic
 linux-image-3.2.0-37-generic
 linux-image-3.2.0-38-generic
 linux-image-3.2.0-39-generic
 linux-image-3.2.0-40-generic
 linux-image-3.2.0-41-generic
 linux-image-3.2.0-43-generic
 linux-image-3.2.0-44-generic
 linux-image-3.2.0-45-generic
 linux-image-3.2.0-48-generic
 linux-image-3.2.0-49-generic
 linux-image-3.2.0-51-generic
 linux-image-3.2.0-52-generic
 linux-image-3.2.0-53-generic
 linux-image-3.2.0-54-generic
 linux-image-3.2.0-55-generic
 linux-image-3.2.0-56-generic
 linux-image-3.2.0-57-generic
 linux-image-3.2.0-58-generic
 linux-image-3.2.0-59-generic
 linux-image-3.2.0-60-generic
 linux-image-3.2.0-61-generic
 linux-image-3.2.0-63-generic
 linux-image-3.2.0-64-generic
 linux-image-3.2.0-65-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
lcable@dell9150:/boot/grub>

I have no idea what's wrong or how to fix it.

guntbert
  • 13,134
LarryC
  • 11

3 Answers3

1

What does “No apport report written because MaxReports is reached already” mean? suggests, as your message title implies, that there are too many old kernels installed. The posting offers several methods for removing old kernels. See also: Removing old kernels for a method to list all of the installed kernels, retain the last two (current plus a "backup"), and remove the earlier versions.

CentaurusA
  • 2,672
0

My suggestion is to install kernel-remover.

kernel-remover

Tool for the removal of the Linux kernel packages.

This tool handles the common tasks while handling testing kernels, the removal of deprecated kernel images, headers, depending packages, symlinks and associated drivers. Unpackaged cruft below /lib/modules/$KVERS will be nuked. Neither the currently running-, nor the newest kernels will be offered for removal.

Maintainer: Alf Gaida agaida@siduction.org

Source: http://svn.berlios.de/svnroot/repos/fullstory/kernel-remover

To install kerml-remover, download these files:

http://mirror.lug.udel.edu/pub/siduction/base/pool/main/c/creativecommons3/creativecommons3_1.1_all.deb

http://mirror.lug.udel.edu/pub/siduction/base/pool/main/k/kernel-remover/kernel-remover_3.1.11_all.deb

Install them by Gdebi, to resolve dependencies, first creativecommons3_1.1_all.deb.

Edit:---------------------

Test this:

Start the computer with a live dvd-usb Trusty Tahr.

After the session load, open a terminal.

Run in terminal:

sudo su
fdisk -l
+++Suppose that / is /dev/sda1
umount /dev/sda1
fsck -a /dev/sda1
mount /dev/sda1 /mnt
mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
chroot /mnt
apt-get update
apt-get autoremove
apt-get clean
apt-get -f install
dpkg --configure -a
apt-get dist-upgrade
apt-get clean
grub-install /dev/sda
grub-install --recheck /dev/sda
update-grub
Control + D 
umount /mnt/sys
umount /mnt/proc
umount /mnt/dev
umount /mnt
reboot

End --------------------

kyodake
  • 15,401
  • I tried to install gdebi but due to all these kernel errors,"E: Sub-process /usr/bin/dpkg returned an error code (1)" gdebi doesn't get installed. dpkg fails when trying to remove these linux images and I can't get around this problem. – LarryC Sep 01 '14 at 00:05
0

plz check this link,rename the postrm.d directory may solve the problem. Can't remove kernels "run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 1"