Grub-btrfs

A couple days ago i listed my systemd units and it showed grub-btrfsd failing, and questioned if inotify-tools was installed.

󱞪  systemctl status grub-btrfsd
× grub-btrfsd.service - Regenerate grub-btrfs.cfg
     Loaded: loaded (/etc/systemd/system/grub-btrfsd.service; enabled; preset: disabled)
     Active: failed (Result: exit-code) since Sat 2024-04-06 11:01:49 EDT; 10min ago
   Duration: 76ms
    Process: 660 ExecStart=/usr/bin/grub-btrfsd --syslog --timeshift-auto (code=exited, status=1/FAILURE)
   Main PID: 660 (code=exited, status=1/FAILURE)
        CPU: 12ms

Apr 06 11:01:49 t440p grub-btrfsd[664]: [!] inotifywait was not found, exiting. Is inotify-tools installed?
Apr 06 11:01:49 t440p systemd[1]: grub-btrfsd.service: Main process exited, code=exited, status=1/FAILURE
Apr 06 11:01:49 t440p systemd[1]: grub-btrfsd.service: Failed with result 'exit-code'.

I followed the grub-btrfs instructions in the wiki, which doesn’t mention inotify-tools. So inotify-tools isn’t installed and never has been. Yet timeshift is making snapshots, and they are being added to my grub menu. If I hadn’t run systemctl list-units, seems I would never have known about this ‘problem’. I’ll install inotify-tools, but could somebody explain how it’s working anyway?

It is mentioned on the project page here: https://github.com/Antynea/grub-btrfs?tab=readme-ov-file#customization-of-the-grub-btrfsd-daemon

inotify-tools is required for using the grub-btrfsd daemon, not for using grub-btrfs. For this reason, they made it an optional dependency for the package:

❯ pacman -Si grub-btrfs
Repository      : extra
Name            : grub-btrfs
Version         : 4.13-1
Description     : Include btrfs snapshots in GRUB boot options
Architecture    : any
URL             : https://github.com/Antynea/grub-btrfs
[...]
Depends On      : btrfs-progs  grub
Optional Deps   : snapper: For snapper support
                  inotify-tools: For grub-btrfsd daemon
[...]

They did it this way so folks who want to use grub-btrfs without running the daemon (for example, because they have a different solution in place for this) would not need to pull in an unneeded library.

Ok, I thought the daemon was supposed to be running. Thanks for the reference.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.