I have fixed error reporting in non-interactive postinst case.
And made grub-install resilient, w.r.t. operating against non-existent devices or devices that refuse writing to. In all such cases, backup is created and restored. Thus there is no need to abort at preinst. Consistency between MBR & /boot is required and fixed here, without reimplementing postinst in preinst.
I disagree that preinst changes are needed.
I have fixed error reporting in non-interactive postinst case.
And made grub-install resilient, w.r.t. operating against non-existent devices or devices that refuse writing to. In all such cases, backup is created and restored. Thus there is no need to abort at preinst. Consistency between MBR & /boot is required and fixed here, without reimplementing postinst in preinst.