Page MenuHomePhabricator

update-grub does get run by grub-* packages during postinst
Closed, ResolvedPublic

Description

Packages in question:
https://github.com/Whonix?utf8=%E2%9C%93&query=grub-

The postinst script of these packages should call update-grub. Otherwise these packages have no effect before a kernel upgrade triggers or the user manually runs it.

Debian has no update-grub trigger yet:
https://bugs.debian.org/481542

FYI:
https://wiki.debian.org/DpkgTriggers

Details

Impact
Normal

Event Timeline

Patrick claimed this task.
Patrick raised the priority of this task from to Low.
Patrick updated the task description. (Show Details)
Patrick set Impact to Normal.
Patrick added subscribers: Patrick, HulaHoop, nrgaway, marmarek.

Done for grub-screen-resolution package...
run update-grub during postinst so package takes effect right after installation - https://phabricator.whonix.org/T377:
https://github.com/Whonix/grub-screen-resolution/commit/b03aea8ff3a2ad28ec1bec7dba3d4a58e55cceda

Can be easily replicated for the grub-enable-apparmor and #grub-verbose-output package. Just waiting for potential comments on this.

Anyone has any suggestions on the error message when this fails? (@bnvk, @mfc, @MemoryLost)

      echo "$DPKG_MAINTSCRIPT_PACKAGE $DPKG_MAINTSCRIPT_NAME ERROR: Running \
'update-grub' failed with exit code $?. $DPKG_MAINTSCRIPT_PACKAGE is most \
likely only the trigger, not the cause. Unless you know this is not an issue, \
you should fix running 'update-grub', otherwise your system might no longer \
boot." >&2

(It fails open, i.e. package installation will succeed. It's just supposed to be a warning in case this fails.)