hirak99/yabsnap

Show snapshot comment in grub-btrfs description

Closed this issue · 5 comments

I would really like to see snapshot comments made by yabsnap also show up in grub-btrfs boot menu. 'Type' doesn't really matter but would be a nice bonus. Not seeing the pacman command is the one thing keeping me from ditching snapper

Agree that the ability to boot off the partitions is nice.

I don't use grub, hence I will not be able to take this on. Jotting down what I think needs to be done nonetheless -

  • Locally, etc/grub.d/41_snapshots-btrfs needs to be edited to add the ability to pick up comments from /.snapshots/*.json. This edit should be doable on a system with grub-btrfs installed, to locally test before creating a PR.
  • A PR needs to be then created on grub-btrfs, to modify 41_snapshots-btrfs.

I think that's it might be a little too advanced for me to make a PR for grub-btrfs but I am working on an Arch install script that can install Arch with full BTRFS snapshot support and grub. It's pretty quick and easy to get Arch running in a VM if this is something you want to test. It can install with either Yabsnap and Snapper

Edit: I think it would be easier to implement if the *-meta.json files were located inside each respective snapshot folder

Yes, I would like to try!
I am traveling, so I do not have access to my workstation desktop (probably not have it for the next 3 months as it's being shipped).
I will set up virtmanager on my laptop over this weekend or the next.

Curious, what are your thoughts on systemd-boot? (I've found it simpler to configure and use.)

Should be easy to sync systemd boot entries, since it will involve adding / managing some files in /boot/loader/entries.
I am thinking to give it a shot during my travel once I set up a VM and workflow to test these.

Similarly it should also be possible to do this with grub; and do what grub-btrfs does completely within yabsnap. But I will admit my knowledge on how grub exactly works is not the best.

Oh enjoy your trip!

Curious, what are your thoughts on systemd-boot? (I've found it simpler to configure and use.)

To be honest I'm pretty new to all this Unix stuff. I installed Garuda Linux on my desktop a few months ago and it spiraled out of control after I installed Arch manually in a VM for the first time.

I don't know a lot about systemd-boot, I just went with grub because that is what garuda uses, it has a lot of themes available and I managed to somewhat understand how grub works when you set it up. I guess I should read up on systemd-boot and also try it out.

I think this is where grub checks for timeshift snapshots and right above it also checks for snapper. My guess is that only a few lines of code are needed to be added, but that assumes you know what is going on in there, which I don't haha.

Seems like support for yabsnap to grub-btrfs has been added semi-recently, so this issue can likely be closed.