Please run sudo nano /var/lib/dpkg/info/grub-pc.postinst, and on the second line that reads "set -e", change it to "set -ex", then save and exit the editor. Then run sudo apt-get install -f, and post the output.
Please run sudo nano /var/lib/ dpkg/info/ grub-pc. postinst, and on the second line that reads "set -e", change it to "set -ex", then save and exit the editor. Then run sudo apt-get install -f, and post the output.