I was updating my system as usual and sudo apt update
showed me some packages to be updated. I ran sudo apt upgrade
and it downloaded the packages. But while packages were being configured during the installation, the computer was turned off due to low battery.
When I booted and tried to update using sudo apt update
I got this message:
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.
When I executed sudo dpkg --configure -a
I got this:
@mike-bravo:~$ sudo dpkg --configure -a
Setting up linux-image-4.4.0-96-generic (4.4.0-96.119) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
initrd.img(/boot/initrd.img-4.4.0-96-generic
) points to /boot/initrd.img-4.4.0-96-generic
(/boot/initrd.img-4.4.0-96-generic) -- doing nothing at
/var/lib/dpkg/info/linux-image-4.4.0-96-generic.postinst line 491.
vmlinuz(/boot/vmlinuz-4.4.0-96-generic
) points to /boot/vmlinuz-4.4.0-96-generic
(/boot/vmlinuz-4.4.0-96-generic) -- doing nothing at
/var/lib/dpkg/info/linux-image-4.4.0-96-generic.postinst line 491.
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-
96-generic /boot/vmlinuz-4.4.0-96-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-96-
generic /boot/vmlinuz-4.4.0-96-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-96-generic
run-parts: executing /etc/kernel/postinst.d/pm-utils 4.4.0-96-generic
/boot/vmlinuz-4.4.0-96-generic
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades
4.4.0-96-generic /boot/vmlinuz-4.4.0-96-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.4.0-96-
generic /boot/vmlinuz-4.4.0-96-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.4.0-96-
generic /boot/vmlinuz-4.4.0-96-generic
/usr/sbin/grub-mkconfig: 252: /usr/sbin/grub-mkconfig: cannot create
/boot/grub/grub.cfg.new: Read-only file system
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return
code 2
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-
image-4.4.0-96-generic.postinst line 1052.
dpkg: error processing package linux-image-4.4.0-96-generic (--
configure):
subprocess installed post-installation script returned error exit
status 2
dpkg: dependency problems prevent configuration of linux-signed-
image-4.4.0-96-generic:
linux-signed-image-4.4.0-96-generic depends on linux-image-4.4.0-96-
generic (= 4.4.0-96.119); however:
Package linux-image-4.4.0-96-generic is not configured yet.
dpkg: error processing package linux-signed-image-4.4.0-96-generic (-
-configure):
dependency problems - leaving unconfigured
Setting up linux-libc-dev:amd64 (4.4.0-96.119) ...
dpkg: unrecoverable fatal error, aborting:
unable to flush updated status of 'linux-libc-dev:amd64': Read-only
file system
As a side effect(?) to this my system became read-only. I had to reboot it to be able to move files, add or copy files from the system.
uname -r
gives me 4.4.0-93-generic
How can I delete this un-configured package (linux-image-4.4.0-96- generic) or configure it properly?
sudo apt install -f
– George Udosen Oct 01 '17 at 15:20