jacob@Gandalf:~$ sudo apt-get upgrade
[sudo] password for jacob:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be REMOVED:
linux-image-3.16.0-77-generic linux-image-extra-3.16.0-77-generic
The following packages have been kept back:
gnome-shell gnome-shell-common libmirclient9 linux-generic linux-headers-generic linux-image-generic
0 upgraded, 0 newly installed, 2 to remove and 6 not upgraded.
9 not fully installed or removed.
After this operation, 202 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 300979 files and directories currently installed.)
Removing linux-image-extra-3.16.0-77-generic (3.16.0-77.99~14.04.1) ...
depmod: FATAL: could not load /boot/System.map-3.16.0-77-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.16.0-77-generic /boot/vmlinuz-3.16.0-77-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.16.0-77-generic /boot/vmlinuz-3.16.0-77-generic
update-initramfs: Generating /boot/initrd.img-3.16.0-77-generic
WARNING: missing /lib/modules/3.16.0-77-generic
Ensure all necessary drivers are built into the linux image!
depmod: ERROR: could not open directory /lib/modules/3.16.0-77-generic: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
W: mdadm: the array /dev/md125 with UUID 847f15bc:a3cfe7dc:dcbccf04:78d5cc64
W: mdadm: is currently active, but it is not listed in mdadm.conf. if
W: mdadm: it is needed for boot, then YOUR SYSTEM IS NOW UNBOOTABLE!
W: mdadm: please inspect the output of /usr/share/mdadm/mkconf, compare
W: mdadm: it to /etc/mdadm/mdadm.conf, and make the necessary changes.
depmod: WARNING: could not open /var/tmp/mkinitramfs_esjRrH/lib/modules/3.16.0-77-generic/modules.order: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_esjRrH/lib/modules/3.16.0-77-generic/modules.builtin: No such file or directory
run-parts: executing /etc/kernel/postinst.d/pm-utils 3.16.0-77-generic /boot/vmlinuz-3.16.0-77-generic
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 3.16.0-77-generic /boot/vmlinuz-3.16.0-77-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 3.16.0-77-generic /boot/vmlinuz-3.16.0-77-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.16.0-77-generic /boot/vmlinuz-3.16.0-77-generic
Generating grub configuration file ...
grub-probe: error: disk `mduuid/847f15bca3cfe7dcdcbccf0478d5cc64,1' not found.
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 1
dpkg: error processing package linux-image-extra-3.16.0-77-generic (--remove):
subprocess installed post-removal script returned error exit status 1
Removing linux-image-3.16.0-77-generic (3.16.0-77.99~14.04.1) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.16.0-77-generic /boot/vmlinuz-3.16.0-77-generic
update-initramfs: Deleting /boot/initrd.img-3.16.0-77-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.16.0-77-generic /boot/vmlinuz-3.16.0-77-generic
Generating grub configuration file ...
grub-probe: error: disk `mduuid/847f15bca3cfe7dcdcbccf0478d5cc64,1' not found.
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-3.16.0-77-generic.postrm line 328.
dpkg: error processing package linux-image-3.16.0-77-generic (--remove):
subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
linux-image-extra-3.16.0-77-generic
linux-image-3.16.0-77-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)