I have the feeling that this portion of the grub-pc.postinst script is causing the issue :
db_get grub-pc/install_devices
if [ -z "$RET" ]; then
# Reset the seen flag if the current answer is false, since
# otherwise we'll loop with no indication of why. db_get grub-pc/install_devices_empty
if [ "$RET" = false ]; then db_fset grub-pc/install_devices_empty seen false
fi
if db_input critical grub-pc/install_devices_empty; then db_go db_get grub-pc/install_devices_empty
if [ "$RET" = true ]; then break else db_fset "$question" seen false db_fset grub-pc/install_devices_empty seen false
fi
else break # noninteractive
fi
else
break
fi
Here is the debug log of a normal (i.e. failed) update :
I have the feeling that this portion of the grub-pc.postinst script is causing the issue :
db_get grub-pc/ install_ devices
db_get grub-pc/ install_ devices_ empty
db_fset grub-pc/ install_ devices_ empty seen false install_ devices_ empty; then
db_go
db_get grub-pc/ install_ devices_ empty
break
else
db_ fset "$question" seen false
db_ fset grub-pc/ install_ devices_ empty seen false
break # noninteractive
if [ -z "$RET" ]; then
# Reset the seen flag if the current answer is false, since
# otherwise we'll loop with no indication of why.
if [ "$RET" = false ]; then
fi
if db_input critical grub-pc/
if [ "$RET" = true ]; then
fi
else
fi
else
break
fi
Here is the debug log of a normal (i.e. failed) update :
debconf (developer): starting /var/lib/ dpkg/info/ grub-pc. postinst configure 1.99-21ubuntu3.18 install_ devices install_ devices install_ devices install_ devices_ empty install_ devices_ empty
...
debconf (developer): <-- INPUT high grub-pc/
debconf (developer): --> 30 question skipped
debconf (developer): <-- GO
debconf (developer): --> 0 ok
debconf (developer): <-- GET grub-pc/
debconf (developer): --> 0
debconf (developer): <-- GET grub-pc/
debconf (developer): --> 0
debconf (developer): <-- GET grub-pc/
debconf (developer): --> 0 true
debconf (developer): <-- INPUT critical grub-pc/
debconf (developer): --> 30 question skipped
When install_ devices_ empty = true, no question is asked and so no chance of fixing grub
When changing install_ devices_ empty to false we get :
debconf (developer): starting /var/lib/ dpkg/info/ grub-pc. postinst configure 1.99-21ubuntu3.18 install_ devices install_ devices install_ devices install_ devices_ empty install_ devices_ empty seen false install_ devices_ empty
....
debconf (developer): <-- INPUT high grub-pc/
debconf (developer): --> 30 question skipped
debconf (developer): <-- GO
debconf (developer): --> 0 ok
debconf (developer): <-- GET grub-pc/
debconf (developer): --> 0
debconf (developer): <-- GET grub-pc/
debconf (developer): --> 0
debconf (developer): <-- GET grub-pc/
debconf (developer): --> 0 false
debconf (developer): <-- FSET grub-pc/
debconf (developer): --> 0 false
debconf (developer): <-- INPUT critical grub-pc/
debconf (developer): --> 0 question will be asked
debconf (developer): <-- GO