I have a virtual machine in a Google Compute Engine which is running Ubuntu 14.04.5 LTS (GNU/Linux 4.4.0-47-generic x86_64)
I want to make a periodic upgrade (I DON'T want to upgrade it to 16.04!) I just want to maintain it updated. Since some days, it's retrieving an error and I can't update it properly.
Each time I try to upgrade it, it says:
17 not fully installed or removed.
Sometimes I've tried an autoclean or an autoremove and the machine crashed forever, so I had to resucite it from snapshots. Any help will be appreciated.
This is the complete output I get when I make an apt-get upgrade
:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
linux-headers-4.4.0-45 linux-headers-4.4.0-45-generic linux-headers-4.4.0-51
linux-headers-4.4.0-51-generic linux-image-3.19.0-73-generic
linux-image-3.19.0-74-generic linux-image-3.19.0-75-generic
linux-image-3.19.0-77-generic linux-image-4.4.0-45-generic
linux-image-4.4.0-51-generic linux-image-extra-3.19.0-73-generic
linux-image-extra-3.19.0-74-generic linux-image-extra-3.19.0-75-generic
linux-image-extra-3.19.0-77-generic linux-image-extra-4.4.0-45-generic
linux-image-extra-4.4.0-51-generic
0 upgraded, 0 newly installed, 16 to remove and 1 not upgraded.
17 not fully installed or removed.
After this operation, 1,433 MB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 230239 files and directories currently installed.)
Removing linux-image-extra-3.19.0-75-generic (3.19.0-75.83~14.04.1) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.19.0-75-generic / boot/vmlinuz-3.19.0-75-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.19.0-75-generic /b oot/vmlinuz-3.19.0-75-generic
update-initramfs: Generating /boot/initrd.img-3.19.0-75-generic
xz: (stdin): Cannot allocate memory
E: mkinitramfs failure cpio 141 xz -8 --check=crc32 1
update-initramfs: failed for /boot/initrd.img-3.19.0-75-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-extra-3.19.0-75-generic (--remove):
subprocess installed post-removal script returned error exit status 1
Removing linux-image-3.19.0-75-generic (3.19.0-75.83~14.04.1) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.19.0-75-generic /boo t/vmlinuz-3.19.0-75-generic
update-initramfs: Deleting /boot/initrd.img-3.19.0-75-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.19.0-75-generic /boot /vmlinuz-3.19.0-75-generic
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.4.0-57-generic
Found linux image: /boot/vmlinuz-4.4.0-53-generic
Found linux image: /boot/vmlinuz-4.4.0-51-generic
Found linux image: /boot/vmlinuz-4.4.0-47-generic
Found initrd image: /boot/initrd.img-4.4.0-47-generic
Found linux image: /boot/vmlinuz-4.4.0-45-generic
Found initrd image: /boot/initrd.img-4.4.0-45-generic
Found linux image: /boot/vmlinuz-3.19.0-78-generic
Found linux image: /boot/vmlinuz-3.19.0-77-generic
Found linux image: /boot/vmlinuz-3.19.0-74-generic
Found initrd image: /boot/initrd.img-3.19.0-74-generic
Found linux image: /boot/vmlinuz-3.19.0-73-generic
Found initrd image: /boot/initrd.img-3.19.0-73-generic
done
The link /initrd.img is a damaged link
Removing symbolic link initrd.img
you may need to re-run your boot loader[grub]
The link /initrd.img.old is a damaged link
Removing symbolic link initrd.img.old
you may need to re-run your boot loader[grub]
Removing linux-image-extra-3.19.0-77-generic (3.19.0-77.85~14.04.1) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.19.0-77-generic / boot/vmlinuz-3.19.0-77-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.19.0-77-generic /b oot/vmlinuz-3.19.0-77-generic
update-initramfs: Generating /boot/initrd.img-3.19.0-77-generic
xz: (stdin): Cannot allocate memory
E: mkinitramfs failure find 141 cpio 141 xz -8 --check=crc32 1
update-initramfs: failed for /boot/initrd.img-3.19.0-77-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-extra-3.19.0-77-generic (--remove):
subprocess installed post-removal script returned error exit status 1
Removing linux-image-3.19.0-77-generic (3.19.0-77.85~14.04.1) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.19.0-77-generic /boo t/vmlinuz-3.19.0-77-generic
update-initramfs: Deleting /boot/initrd.img-3.19.0-77-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.19.0-77-generic /boot /vmlinuz-3.19.0-77-generic
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.4.0-57-generic
Found linux image: /boot/vmlinuz-4.4.0-53-generic
Found linux image: /boot/vmlinuz-4.4.0-51-generic
Found linux image: /boot/vmlinuz-4.4.0-47-generic
Found initrd image: /boot/initrd.img-4.4.0-47-generic
Found linux image: /boot/vmlinuz-4.4.0-45-generic
Found initrd image: /boot/initrd.img-4.4.0-45-generic
Found linux image: /boot/vmlinuz-3.19.0-78-generic
Found linux image: /boot/vmlinuz-3.19.0-74-generic
Found initrd image: /boot/initrd.img-3.19.0-74-generic
Found linux image: /boot/vmlinuz-3.19.0-73-generic
Found initrd image: /boot/initrd.img-3.19.0-73-generic
done
Removing linux-image-extra-4.4.0-51-generic (4.4.0-51.72~14.04.1) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-51-generic /b oot/vmlinuz-4.4.0-51-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-51-generic /bo ot/vmlinuz-4.4.0-51-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-51-generic
xz: (stdin): Cannot allocate memory
E: mkinitramfs failure cpio 141 xz -8 --check=crc32 1
update-initramfs: failed for /boot/initrd.img-4.4.0-51-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-extra-4.4.0-51-generic (--remove):
subprocess installed post-removal script returned error exit status 1
Removing linux-image-4.4.0-51-generic (4.4.0-51.72~14.04.1) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.4.0-51-generic /boot /vmlinuz-4.4.0-51-generic
update-initramfs: Deleting /boot/initrd.img-4.4.0-51-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.4.0-51-generic /boot/ vmlinuz-4.4.0-51-generic
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.4.0-57-generic
Found linux image: /boot/vmlinuz-4.4.0-53-generic
Found linux image: /boot/vmlinuz-4.4.0-47-generic
Found initrd image: /boot/initrd.img-4.4.0-47-generic
Found linux image: /boot/vmlinuz-4.4.0-45-generic
Found initrd image: /boot/initrd.img-4.4.0-45-generic
Found linux image: /boot/vmlinuz-3.19.0-78-generic
Found linux image: /boot/vmlinuz-3.19.0-74-generic
Found initrd image: /boot/initrd.img-3.19.0-74-generic
Found linux image: /boot/vmlinuz-3.19.0-73-generic
Found initrd image: /boot/initrd.img-3.19.0-73-generic
done
The link /vmlinuz.old is a damaged link
Removing symbolic link vmlinuz.old
you may need to re-run your boot loader[grub]
Removing linux-headers-4.4.0-45-generic (4.4.0-45.66~14.04.1) ...
Removing linux-headers-4.4.0-45 (4.4.0-45.66~14.04.1) ...
Removing linux-headers-4.4.0-51-generic (4.4.0-51.72~14.04.1) ...
Removing linux-headers-4.4.0-51 (4.4.0-51.72~14.04.1) ...
Removing linux-image-extra-3.19.0-73-generic (3.19.0-73.81~14.04.1) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.19.0-73-generic / boot/vmlinuz-3.19.0-73-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.19.0-73-generic /b oot/vmlinuz-3.19.0-73-generic
update-initramfs: Generating /boot/initrd.img-3.19.0-73-generic
xz: (stdin): Cannot allocate memory
E: mkinitramfs failure cpio 141 xz -8 --check=crc32 1
update-initramfs: failed for /boot/initrd.img-3.19.0-73-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-extra-3.19.0-73-generic (--remove):
subprocess installed post-removal script returned error exit status 1
No apport report written because MaxReports is reached already
Removing linux-ima ge-3.19.0-73-generic (3.19.0-73.81~14.04.1) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.19.0-73-generic /boo t/vmlinuz-3.19.0-73-generic
update-initramfs: Deleting /boot/initrd.img-3.19.0-73-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.19.0-73-generic /boot /vmlinuz-3.19.0-73-generic
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.4.0-57-generic
Found linux image: /boot/vmlinuz-4.4.0-53-generic
Found linux image: /boot/vmlinuz-4.4.0-47-generic
Found initrd image: /boot/initrd.img-4.4.0-47-generic
Found linux image: /boot/vmlinuz-4.4.0-45-generic
Found initrd image: /boot/initrd.img-4.4.0-45-generic
Found linux image: /boot/vmlinuz-3.19.0-78-generic
Found linux image: /boot/vmlinuz-3.19.0-74-generic
Found initrd image: /boot/initrd.img-3.19.0-74-generic
done
Removing linux-image-extra-3.19.0-74-generic (3.19.0-74.82~14.04.1) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.19.0-74-generic / boot/vmlinuz-3.19.0-74-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.19.0-74-generic /b oot/vmlinuz-3.19.0-74-generic
update-initramfs: Generating /boot/initrd.img-3.19.0-74-generic
xz: (stdin): Cannot allocate memory
E: mkinitramfs failure find 141 cpio 141 xz -8 --check=crc32 1
update-initramfs: failed for /boot/initrd.img-3.19.0-74-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-extra-3.19.0-74-generic (--remove):
subprocess installed post-removal script returned error exit status 1
No apport report written because MaxReports is reached already
Removing linux-ima ge-3.19.0-74-generic (3.19.0-74.82~14.04.1) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.19.0-74-generic /boo t/vmlinuz-3.19.0-74-generic
update-initramfs: Deleting /boot/initrd.img-3.19.0-74-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.19.0-74-generic /boot /vmlinuz-3.19.0-74-generic
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.4.0-57-generic
Found linux image: /boot/vmlinuz-4.4.0-53-generic
Found linux image: /boot/vmlinuz-4.4.0-47-generic
Found initrd image: /boot/initrd.img-4.4.0-47-generic
Found linux image: /boot/vmlinuz-4.4.0-45-generic
Found initrd image: /boot/initrd.img-4.4.0-45-generic
Found linux image: /boot/vmlinuz-3.19.0-78-generic
done
Removing linux-image-extra-4.4.0-45-generic (4.4.0-45.66~14.04.1) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-45-generic /b oot/vmlinuz-4.4.0-45-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-45-generic /bo ot/vmlinuz-4.4.0-45-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-45-generic
xz: (stdin): Cannot allocate memory
E: mkinitramfs failure find 141 cpio 141 xz -8 --check=crc32 1
update-initramfs: failed for /boot/initrd.img-4.4.0-45-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-extra-4.4.0-45-generic (--remove):
subprocess installed post-removal script returned error exit status 1
No apport report written because MaxReports is reached already
Removing linux-ima ge-4.4.0-45-generic (4.4.0-45.66~14.04.1) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.4.0-45-generic /boot /vmlinuz-4.4.0-45-generic
update-initramfs: Deleting /boot/initrd.img-4.4.0-45-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.4.0-45-generic /boot/ vmlinuz-4.4.0-45-generic
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.4.0-57-generic
Found linux image: /boot/vmlinuz-4.4.0-53-generic
Found linux image: /boot/vmlinuz-4.4.0-47-generic
Found initrd image: /boot/initrd.img-4.4.0-47-generic
Found linux image: /boot/vmlinuz-3.19.0-78-generic
done
Errors were encountered while processing:
linux-image-extra-3.19.0-75-generic
linux-image-extra-3.19.0-77-generic
linux-image-extra-4.4.0-51-generic
linux-image-extra-3.19.0-73-generic
linux-image-extra-3.19.0-74-generic
linux-image-extra-4.4.0-45-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)