Please edit /var/lib/dpkg/info/grub-pc.postinst and change the second line from set -e to set -ex, save it, and run sudo apt-get install -f to retry and post the output.
** Changed in: grub2 (Ubuntu) Status: New => Incomplete -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1777278 Title: package grub-pc 2.02-2ubuntu8 failed to install/upgrade: installed grub-pc package post-installation script subprocess returned error exit status 20 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1777278/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs