"System restart required"...why? How can I get what triggered this notification to also show details?

Solution 1:

Edit: Another, probably relevant or useful article.

As you already found out you can find the packages that require a restart in /var/run/reboot-required.pkgs

Now you just need to look in the changelog of the package to find the information you are looking for.

  • If you are already on the machine you can find the changelogs in /usr/share/doc/${package_name} (example: zless /usr/share/doc/linux-image-3.13.0-61-generic/changelog.Debian.gz).
  • Debian provides some tools like apt-listchanges to make this more convenient (1, 2, 3).
  • Another way to do that would be to use packages.ubuntu.com.

    In your case:

    image showing where to find the link for the changelog on packages.ubuntu.com

Solution 2:

The file ultimately called is /usr/lib/update-notifier/update-motd-reboot-required (it's called by /etc/update-motd.d/98-reboot-required).

Inside the conditional if statement of one of those files, simply add this:

    echo "Packages causing reboot:"
    cat /var/run/reboot-required.pkgs

So, for instance, your /usr/lib/update-notifier/update-motd-reboot-required file would look something like this:

#!/bin/sh -e
#
# helper for update-motd

if [ -f /var/run/reboot-required ]; then
        cat /var/run/reboot-required
        echo "Packages causing reboot:"
        cat /var/run/reboot-required.pkgs
fi