grub-btrfsd(8)

πŸ“¦ version 4.14, in arch rolling

πŸ’… grub-btrfsd(8) β€” System Manager's Manual, but make it group chat πŸ’…

okay so bestie, this is the manual page for grub-btrfsd(8) and it's literally an OpenRC daemon situation. Let's get into it ✨

πŸŽ€ NAME πŸŽ€

grub-btrfsd β€” an OpenRC daemon to automatically update the grub menu with grub-btrfs(8) when a new btrfs snapshot is created. πŸ’–

🌈 SYNOPSIS 🌈

grub-btrfsd [-h, --help] [-c, --no-color] [-l, --log-file LOG_FILE] [-r, --recursive] [-s, --syslog] [-t, --timeshift-auto] [-o, --timeshift-old] [-v, --verbose] SNAPSHOTS_DIRS

πŸ¦‹ DESCRIPTION πŸ¦‹

grub-btrfsd is a shell script which is meant to be run as a daemon. No cap.

It watches a directory where btrfs-snapshots are created or deleted via inotifywait, and when something in that directory changes it runs grub-mkconfig (if grub-mkconfig never ran before since grub-btrfs was installed) or /etc/grub.d/41_snapshots-btrfs (when grub-mkconfig ran before with grub-btrfs installed). That's the whole main-character job, periodt. πŸ‘‘

✨ OPTIONS ✨

  • SNAPSHOTS_DIRS β€” This argument specifies the (space separated) paths where grub-btrfsd looks for newly created snapshots and snapshot deletions. It is usually defined by the program used to make snapshots. E.g. for Snapper this would be /.snapshots. It is possible to define more than one directory here, all directories will inherit the same settings (recursive etc.). This argument is not necessary to provide if --timeshift-auto is set. πŸ’…
  • -c, --no-color β€” Disable colors in output.
  • -l, --log-file β€” This argument specifies a file where grub-btrfsd should write log messages.
  • -r, --recursive β€” Watch snapshot directory recursively
  • -s, --syslog β€” Write to syslog
  • -t, --timeshift-auto β€” This is a flag to activate the auto detection of the path where Timeshift stores snapshots. Newer versions (>=22.06) of Timeshift mount their snapshots to /run/timeshift/$PID/backup/timeshift-btrfs. Where $PID is the process ID of the currently running Timeshift session. The PID is changing every time Timeshift is opened. grub-btrfsd can automatically take care of the detection of the correct PID and directory if this flag is set. In this case the argument SNAPSHOTS_DIRS has no effect. πŸ”₯
  • -o, --timeshift-old β€” Look for snapshots in /run/timeshift/backup/timeshift-btrfs instead of /run/timeshift/$PID/backup/timeshift-btrfs. This is to be used for Timeshift versions <22.06.
  • -v, --verbose β€” Let the log of the daemon be more verbose
  • -h, --help β€” Displays a short help message.

βš™οΈ CONFIGURATION βš™οΈ

The daemon is usually configured via the file /etc/conf.d/grub-btrfsd on openrc-init systems and sudo systemctl edit --full grub-btrfsd on systemd systems. In this file the arguments (See OPTIONS), that OpenRC passes to the daemon when it is started, can be configured. πŸ› οΈ

πŸ“ NOTES πŸ“

A common configuration for Snapper would be to set SNAPSHOTS_DIR to /.snapshots and not to set --timeshift-auto. For Timeshift --timeshift-auto is set to true and SNAPSHOTS_DIR can be left as is. 🫢

πŸ“ FILES πŸ“

  • /etc/conf.d/grub-btrfsd
  • /usr/lib/systemd/system/grub-btrfsd.service

πŸ‘€ SEE ALSO πŸ‘€

Copyright (c) 2022 Pascal JΓ€ger


okay bye bestie πŸ’‹ β€” this was the System Manager's Manual page for grub-btrfsd(8), and there's no date/version line on this one, just the manual name at the footer vibe. mwah! πŸŽ€

πŸ“¦ where this page comes from