Skip to content

Error during installation or during grub menu creation #425

Description

@quizilkend

Hi!

I'm experiencing issues with grub-btrfs and am not able to troubleshoot them by myself. I filed an issue because the README says so, if this should rather be a discussion I can close the issue.

  1. install
    I tried to install and get:
Installing manpages...
Installing systemd .service file
Installing docs...
Updating the GRUB menu...
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-6.12.74+deb13+1-amd64
Found initrd image: /boot/initrd.img-6.12.74+deb13+1-amd64
Found linux image: /boot/vmlinuz-6.12.73+deb13-amd64
Found initrd image: /boot/initrd.img-6.12.73+deb13-amd64
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
Adding boot menu entry for UEFI Firmware Settings ...
Detecting snapshots ...
make: *** [Makefile:55: install] Fehler 2
  1. The files are in place and it seems snapshots are found as well:
sudo /usr/bin/grub-btrfsd -v /.snapshots
Arguments:
Snapshot directories: /.snapshots
Timestift autodetection: false
Timeshift old: false
Logfile: 0
Recursive: false
grub-btrfsd starting up...
starting daemon watching /.snapshots...
Subdaemon function started, PID: 1952
1952: Entering infinite while for /.snapshots
1952: Snapshot dir watchtimeout: 0
1952: Watching /.snapshots for new snapshots...
Setting up watches.
Watches established.
/.snapshots/ CREATE,ISDIR 17
1952: Detected snapshot creation/ deletion, recreating Grub menu
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-6.12.74+deb13+1-amd64
Found initrd image: /boot/initrd.img-6.12.74+deb13+1-amd64
Found linux image: /boot/vmlinuz-6.12.73+deb13-amd64
Found initrd image: /boot/initrd.img-6.12.73+deb13-amd64
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
Adding boot menu entry for UEFI Firmware Settings ...
Detecting snapshots ...
[!] Error during grub menu creation (grub/ grub-btrfs error)
1952: Watching /.snapshots for new snapshots...
Setting up watches.
Watches established.
  1. My setup
  • GRUB_BTRFS_VERSION=4.13-yabsnap_info_support-2024-03-06T13:43:57+00:00
  • subvolume for snapshots on @snapshots, this subvolume is mounted to /.snapshots
  • debian trixie with snapper
  • /boot on btrfs with raid1 and everything else on btrfs fs with raid1

Thank you very much for your help!
If I can provide any more information I'm more than glad to do so!
Samuel

Activity

  1. notepass commented on Jun 5, 2026

    @notepass

    I ran into the same issue. It seems that update-grub ran into an error for me.
    This was because of 2 sources within the grub hook (/etc/grub.d/41_snapshots-btrfs in my case):

    • I am using BTRFS RAID 1, so ${grub_probe} --target=device / returned two entries, which breaks logic after it. I replaced the according line (around line 124 or so) with root_device="$(${grub_probe} --target=device /|head -n 1)" # e.g. /dev/mapper/enc
    • The awk call after the comment #Root subvolume UUID did not work for me. So I replaced it with a grep chain (I can't read awk, so I don't know where the error there is). My line looks like this: root_uuid_subvolume="$(btrfs subvolume show / 2>/dev/null | grep -E '^\s+UUID:'|grep -Eo '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}')"

    This gets me to the point where I can get to the point where I see "grub-btrfs: No snapshots found.", as I have no snapshots yet. So I will continue to see if everything else works as soon as I have snapshots.

    Having a look at the PRs, at least the awk problem seems to be solved in #433 . The other issue might also have a PR, I would need to check that at some point.

    Hope this can help you as well.

    EDIT: #413 seems to solve the RAID issue as well

  2. quizilkend commented on Jun 8, 2026

    @quizilkend
    Author

    @notepass thank you for your investigation and writeup! I will definitely have a look into it.

  3. Antynea commented on Aug 24, 2026

    @Antynea
    Owner

    This thread had two separate causes stacked on top of each other, and both are now fixed on master.

    The first was multi-device Btrfs: grub-probe --target=device prints one line per device, and the whole multi-line value was being passed on to the UUID probe, which then returned nothing. Fixed in #440.

    The second was the awk parsing: the script used \s, a GNU extension that mawk treats as a literal s, so the expression never matched the tab-indented UUID line. Since awk is mawk by default on Debian and derivatives, this only showed up there. Fixed in #441.

    Closing this one. If anything is still off on current master, reopen and I'll take another look. Thanks for the patience, this sat here far longer than it should have.

  4. added a commit that references this issue on Aug 24, 2026
    d83c4be
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions