Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No submenu created on fedora #348

Open
diddiman opened this issue Aug 23, 2024 · 3 comments
Open

No submenu created on fedora #348

diddiman opened this issue Aug 23, 2024 · 3 comments

Comments

@diddiman
Copy link

diddiman commented Aug 23, 2024

I had this working, but one day the submenu was no longer there. Not sure what changed

Not sure what is needed but when i run the snapshots-btrfs i get

 sudo /etc/grub.d/41_snapshots-btrfs
Detecting snapshots ...
Found snapshot: 2024-08-22 22:10:10 | root/btrbk_snapshots/ROOT.20240822T2210 | N/A | N/A |
Found snapshot: 2024-08-22 10:30:01 | root/btrbk_snapshots/ROOT.20240822T1030 | N/A | N/A |
Found snapshot: 2024-08-21 10:10:01 | root/btrbk_snapshots/ROOT.20240821T1010 | N/A | N/A |
Found snapshot: 2024-08-20 10:08:02 | root/btrbk_snapshots/ROOT.20240820T1008 | N/A | N/A |
Found snapshot: 2024-08-19 10:28:01 | root/btrbk_snapshots/ROOT.20240819T1028 | N/A | N/A |
Found snapshot: 2024-08-18 15:10:01 | root/btrbk_snapshots/ROOT.20240818T1510 | N/A | N/A |
Found snapshot: 2024-08-17 21:32:02 | root/btrbk_snapshots/ROOT.20240817T2132 | N/A | N/A |
Found snapshot: 2024-08-16 10:22:02 | root/btrbk_snapshots/ROOT.20240816T1022 | N/A | N/A |
Found snapshot: 2024-08-15 10:43:01 | root/btrbk_snapshots/ROOT.20240815T1043 | N/A | N/A |
Found snapshot: 2024-08-12 10:46:02 | root/btrbk_snapshots/ROOT.20240812T1046 | N/A | N/A |
Found snapshot: 2024-08-04 12:31:01 | root/btrbk_snapshots/ROOT.20240804T1231 | N/A | N/A |
Found snapshot: 2024-07-13 13:11:07 | root/btrbk_snapshots/ROOT.20240713T1311 | N/A | N/A |
if [ ! -e "${prefix}/grub-btrfs.cfg" ]; then
echo ""
else
submenu 'Fedora Linux snapshots' {
    configfile "${prefix}/grub-btrfs.cfg"
}
fi
Found 12 snapshot(s)
Unmount /tmp/grub-btrfs.83ormpXxcB .. Success

if i the run
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
the generated file has this in the end

### BEGIN /etc/grub.d/41_snapshots-btrfs ###
if [ ! -e "${prefix}/grub-btrfs.cfg" ]; then
echo ""
else
submenu 'Fedora Linux snapshots' {
    configfile "${prefix}/grub-btrfs.cfg"
}
fi
### END /etc/grub.d/41_snapshots-btrfs ###

and the /boot/grub2/grub-btrfs.cfg looks correct with all the snapshots listed. I can also see all the files there, ls gives
fonts grub-btrfs.cfg grub.cfg grubenv

However when i in grub go to the location of grub ((hd1,gpt1)/boot/grub2/), i can see my grub file, but not the grub-btrfs.cfg

Any idea here?

@diddiman
Copy link
Author

diddiman commented Aug 23, 2024

i tried setting
GRUB_BTRFS_GRUB_DIRNAME="/boot/efi/EFI/fedora"
and it worked... Does that make sense? Seemed to be able to boot at least

@pbignardi
Copy link

I'm facing the same issue. Apparently, the prefix variable is set to /usr when 41_snapshots-btrfs is run.
This breaks things because no submenu gets created, as /usr/grub-btrfs.cfg doesn't exist (mine is located in /boot/grub2/grub-btrfs.cfg).

Just out of curiosity, are you also having the same issue?

@Schievel1
Copy link
Collaborator

The prefix variable is set by grub when the script in /etc/grub.d/ are executed, not the 41_snapshots-btrfs-script itself.
If his is set to /usr for you, there went something wrong during grub installation.
See also: https://www.gnu.org/software/grub/manual/grub/html_node/prefix.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants