Please edit /var/lib/dpkg/info/grub-pc.postinst and change the second line from set -e to set -ex, then run sudo apt-get install -f to try again and paste 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/1776885 Title: package grub-pc 2.02~beta2-36ubuntu3.17 failed to install/upgrade: subprocess installed. post-installation script returned error exit status 10 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1776885/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs