grub-btrfs
grub-btrfs copied to clipboard
Can't reboot to a snapshot with grub-reboot without manual menuentry selection during boot
I am making a home server. I want to configure anything so that I can do any maintenance remotely via ssh. This is why I would like to be able to grub-reboot to a snapshot directly without manual intervention.
I am currently testing with artix and have created one snapshot just for testing. Artix Linux snapshots submenu is at forth place in my grub.cfg. This would mean that either grub-reboot '3>2>3' or grub-reboot '3>1>2' should reboot to a snapshot. This doesn't happen.
My guess is that only after the snapshot submenu is selected grub-btrfs.cfg is loaded by grub and menuentries defined outside of grub.cfg can't be loaded with grub-reboot. Is this correct? If so would it be possible to generate the entries directly in grub.cfg? Or is there maybe a better solution?
When restoring with timeshift it changes the first entry in the grub menu to use the snapshot you restored to instead of /@. It's required a bit of fiddling to work with, for example if you activated the auto cleanup in timeshift it will remove that snapshot after the selected period while you're booted into it. So you can see your system getting deleted which is kind of scary.
Anyway, I know timeshift has this in its GUI, I don't know how to do it via CLI. But since the timeshift gui is just a wrapper around the timeshift CLI program, I am quite sure it's possible.
So maybe that fits your needs?