Antynea / grub-btrfs

Include btrfs snapshots at boot options. (Grub menu)
GNU General Public License v3.0
745 stars 77 forks source link

Grub menu not work #251

Closed mhagnumdw closed 1 year ago

mhagnumdw commented 1 year ago

Problem:

Versions:

UEFI?

sudo timeshift --list return 7 snapshots.

The /boot/grub2/grub-btrfs.cfg file appears to be populated with the 7 snapshots. But I don't know if the file is correct.

File /etc/default/grub-btrfs/config:

$ grep -P -v '(^#|^\s*$)' /etc/default/grub-btrfs/config
GRUB_BTRFS_VERSION=4.12-master-2022-12-10T21:20:15+00:00
GRUB_BTRFS_IGNORE_SPECIFIC_PATH=("@")
GRUB_BTRFS_IGNORE_PREFIX_PATH=("var/lib/docker" "@var/lib/docker" "@/var/lib/docker")
GRUB_BTRFS_GRUB_DIRNAME="/boot/grub2"
GRUB_BTRFS_GBTRFS_DIRNAME="/boot/grub2"
GRUB_BTRFS_MKCONFIG=/usr/sbin/grub2-mkconfig
GRUB_BTRFS_SCRIPT_CHECK=grub2-script-check

grub-btrfsd.service:

$ sudo systemctl cat grub-btrfsd.service | grep -P -v '(^#|^\s*$)'
[Unit]
Description=Regenerate grub-btrfs.cfg
[Service]
Type=simple
LogLevelMax=notice
Environment="PATH=/sbin:/bin:/usr/sbin:/usr/bin"
EnvironmentFile=/etc/default/grub-btrfs/config
ExecStart=/usr/bin/grub-btrfsd --syslog --timeshift-auto --timeshift-old
[Install]
WantedBy=multi-user.target

File /boot/grub2/grub.cfg:

# ...
### BEGIN /etc/grub.d/41_snapshots-btrfs ###
submenu 'Fedora Linux snapshots' {
    configfile "${prefix}/grub-btrfs.cfg"
} 
### END /etc/grub.d/41_snapshots-btrfs ###

Can anyone help me? Do you need any more information?

mhagnumdw commented 1 year ago

In Grub Customize, nothing appears inside the submenu:

image

Schievel1 commented 1 year ago

Maybe this is related to #234? What is your version of btrfs-progs?

mhagnumdw commented 1 year ago

btrfs-progs

6.0.2-1.fc37

Schievel1 commented 1 year ago

Hi, yes the culprit is grub-btrfs-4.12. It does not work very well with the pre 22.06 versions of timeshift. 4.12 does not support the --timeshift-old flag. Please install manually by cloning the repo, going into the cloned directory and doing sudo make install.

mhagnumdw commented 1 year ago

Please install manually by cloning the repo, going into the cloned directory and doing sudo make install

It was exactly how I did it from the beginning.

After doing two things the problem was solved, I still don't know which one solved it:

Since I've done a lot of things, I'm going to redo all the steps from a clean install of Fedora 37 and come back here.

mhagnumdw commented 1 year ago

Steps retraced right now on a clean, up-to-date install of Fedora 37 and everything worked fine!

Versions:

Tip: since Fedora 34 and above, even if EFI, use to update grub: sudo grub2-mkconfig -o /boot/grub2/grub.cfg

ps: configuration details in the first post

Schievel1 commented 1 year ago

Happy to hear that, although I wonder what was the problem in the first place now :/