--- grub-pc.postinst.org 2018-09-07 13:52:19.609236137 +1200 +++ grub-pc.postinst.new 2018-09-07 13:52:58.000000000 +1200 @@ -528,7 +528,8 @@ if [ -z "$new_devices" ]; then new_devices="$(devices_to_ids $old_devices)" db_set grub-pc/install_devices "$new_devices" - # Common-case optimisation: if all devices are translatable + # Common-case optimisations: if the devices where already + # in the new form or if all devices are translatable # to by-id and the number of devices there is the same as # the number of devices GRUB can see, then there's no point # asking again. (This handles e.g. "/dev/sda" with one @@ -536,8 +537,9 @@ old_devices_count="$(echo "$old_devices" | wc -w)" new_devices_count="$(echo "$new_devices" | wc -w)" devices_count="$(echo "$devices" | wc -w)" - if [ "$old_devices_count" != "$new_devices_count" ] || \ - [ "$new_devices_count" != "$devices_count" ]; then + if [ "x$old_devices" != "x$new_devices" ] && + { [ "$old_devices_count" != "$new_devices_count" ] || \ + [ "$new_devices_count" != "$devices_count" ]; }; then db_fset grub-pc/install_devices seen false db_fset grub-pc/install_devices_empty seen false fi