While updating one of the servers I have encountered an error that I can not seem to solve. I have googled around and followed instructions on other threads but nothing is working to solve the issue. I have tried:

apt-get dist-upgrade

apt-get -f install

apt-get autoremove

I keep getting the errors, does anyone have any ideas what the next step is?

Setting up linux-image-3.2.0-4-amd64 (3.2.63-2+deb7u1) ...
Running depmod.
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/dkms 3.2.0-4-amd64 /boot/vmlinuz-3.2.0-4-amd64
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.2.0-4-amd64 /boot/vmlinuz-3.2.0-4-amd64
update-initramfs: Generating /boot/initrd.img-3.2.0-4-amd64
run-parts: executing /etc/kernel/postinst.d/pm-utils 3.2.0-4-amd64 /boot/vmlinuz-3.2.0-4-amd64
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.2.0-4-amd64 /boot/vmlinuz-3.2.0-4-amd64
/usr/sbin/grub-mkconfig: 18: /etc/default/grub: o#GRUB_TERMINAL=console: not found
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 127
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.2.0-4-amd64.postinst line 696, <STDIN> line 2.
dpkg: error processing linux-image-3.2.0-4-amd64 (--configure):
 subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

So after hours of digging around I finally found out what the problem was. On line 18 of /etc/default/grub is the line #GRUB_TERMINAL=console for some reason if you look at the error code that was thrown from the question you will notice an o before the commented out line. After removing the o that got rid of the problem. I am wondering how it even got there in the first place since I have not edited that file before. Maybe a bug in one of the recent updates.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.