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

Show snapshot comment in grub-btrfs description #14

Closed
Martan404 opened this issue Sep 5, 2023 · 5 comments
Closed

Show snapshot comment in grub-btrfs description #14

Martan404 opened this issue Sep 5, 2023 · 5 comments

Comments

@Martan404
Copy link

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

@hirak99
Copy link
Owner

hirak99 commented Sep 6, 2023

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.

@Martan404
Copy link
Author

Martan404 commented Sep 7, 2023

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

@hirak99
Copy link
Owner

hirak99 commented Sep 7, 2023

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.

@Martan404
Copy link
Author

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.

@hunkyburrito
Copy link

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

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