Closed StollD closed 7 months ago
hm, if that is a downsteam patch some distros apply to grub, couldn't this PR be applied as a downstream patch for those distros as well? I mean when the package is created.
I can only speak about Fedora, but grub-btrfs is not packaged there. I've been installing it with make install
, so I figured I would propose this here. Especially since I don't know if it might apply to any other distro out there.
I have been considering this for a while now, but in the end I think grub-btrfs should stay distro agnostic. Nevertheless this would work for me if you name the variable a bit different (not mentioning a distro but instead describe what it actually does) and maybe add a few lines about that feature in the readme.
I just noticed that I never actually linked the patchset I am talking about, so I'd like to apologize for that.
grub2-btrfs
: https://code.opensuse.org/package/grub2/tree/masterThe SUSE_BTRFS_SNAPSHOT_BOOTING
variable is not defined by me, it is defined by the patchset itself and enables the behaviour I described. I can't change its name, and I wouldn't want to document it in the readme because it is not defined by grub-btrfs.
I can add a comment or reword the commit to better explain the purpose of that variable though, whatever you prefer.
ooh so this is not something the grub-btrfs user has to set in the config, it is available to all scripts in /etc/grub.d?
Yeah, it is set in /etc/default/grub
Some GRUBs out there (Fedora, openSUSE) have an option that makes all paths relative to the default subvolume of the filesystem. This can be used to include /boot in your snapshots and roll them back without having to regenerate grub.cfg.
However, enabling that option will break grub-btrfs, because loading the kernel from a different snapshot requires the paths to be absolute. To make this work, GRUB has to be told explicitly to access the root subvolume when booting to a snapshot.
I hope this is acceptable, because it's essentially a workaround for a downstream patch of GRUB.