It seems to be a debconf problem.
The following exists with exit code 10: LANG=C DEBCONF_DEBUG=developer sudo debconf /var/lib/dpkg/info/grub-pc.postinst configure LANG=C sudo debconf --frontend=readline /var/lib/dpkg/info/grub-pc.postinst configure
But this one succeeds (notice the additional "sh"): LANG=C sudo debconf --frontend=readline sh /var/lib/dpkg/info/grub-pc.postinst configure
It seems to be a debconf problem.
The following exists with exit code 10: DEBUG=developer sudo debconf /var/lib/ dpkg/info/ grub-pc. postinst configure dpkg/info/ grub-pc. postinst configure
LANG=C DEBCONF_
LANG=C sudo debconf --frontend=readline /var/lib/
But this one succeeds (notice the additional "sh"): dpkg/info/ grub-pc. postinst configure
LANG=C sudo debconf --frontend=readline sh /var/lib/