I recently tried to
apt-get dist-upgrade -t jessie-backports on a new Debian Jessie install. It gave me the following message:
Err http://ftp.debian.org/debian/ jessie-backports/main dh-autoreconf all 12~bpo8+1 502 Data corruption E: Failed to fetch http://ftp.debian.org/debian/pool/main/d/dh-autoreconf/dh-autoreconf_12~bpo8+1_all.deb 502 Data corruption E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
When I ran
apt-get dist-upgrade -t jessie-backports --fix-missing, I did not pay attention and notice it planned to remove a TON of packages, including Xserver, because that has never happened before. When I tried to install X again, I got this:
The following packages have unmet dependencies: linux-image-3.16.0-4-amd64 : Depends: initramfs-tools (>= 0.110~) but it is not installed or linux-initramfs-tool linux-image-4.9.0-0.bpo.2-amd64 : Depends: initramfs-tools (>= 0.120+deb8u2) but it is not installed or linux-initramfs-tool E: Unmet dependencies. Try using -f.
When I ran
apt-get -f install, I got another error telling me to run
apt-get autoremove, which removed a ton more packages but I still got the same error, so I ran
apt-get install initramfs-tools. Now when I try to use
apt to install X or do a dist-upgrade or whatever, I get this:
Removing linux-image-3.16.0-4-amd64 (3.16.39-1+deb8u2) ... /etc/kernel/postrm.d/initramfs-tools: update-initramfs: Deleting /boot/initrd.img-3.16.0-4-amd64 /etc/kernel/postrm.d/zz-update-grub: /usr/sbin/grub-mkconfig: 35: /etc/default/grub: Syntax error: Unterminated quoted string run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 2 Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-3.16.0-4-amd64.postrm line 206. dpkg: error processing package linux-image-3.16.0-4-amd64 (--remove): subprocess installed post-removal script returned error exit status 1 Errors were encountered while processing: linux-image-3.16.0-4-amd64 E: Sub-process /usr/bin/dpkg returned an error code (1)
Despite the references to
uname -r gives me
4.9.0-0.bpo.2-amd64. I tried rebooting, thinking somehow 3.16 kernel was active and reboot would use 4.9, but no luck, I am getting the same error. I have no idea what I've done or how to fix it.