1

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:
 linux-image-3.2.0-4-amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)

1 Answer 1

2

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.

2
  • This is one of many reasons to use etckeeper.
    – hlovdal
    Dec 9, 2018 at 18:25
  • thanks a lot in my case it was similar, but because I've added apparmor=0 Jun 30, 2022 at 15:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .