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

Is it possible to auto-generate snapshots with read-write privileges? #786

Closed
pehkawn opened this issue Feb 17, 2023 · 3 comments
Closed
Labels

Comments

@pehkawn
Copy link

pehkawn commented Feb 17, 2023

I encountered an issue trying to boot into an automatically generated snapshot a few days ago, where booting into an automatically generated snapshot. (Snapper is configured to create timeline snaps of my root file system, and in addition I use snap-pac and grub-btrfs to generate snap pre- and post- upgrade/installation and add boot menu entries for the snapshots, respectively.) However, trying to load the snapshot resulted in the loading process crashed with the following warning:

Warning: The root device is not configured to be mounted read-write! It may be fsck'd again later.

Posted this issue on Reddit's Arch Linux forum, and the answer I got is that this is likely caused by the fact that Snapper by default generates read-only snapshots.

I confirmed then that my snapshots were indeed read-only, and created a read-write snapshot with the following command:

snapper create --read-write

Subsequently, I tried to boot into this snapshot, and it now works for the most part! The loading process is now completed, and I am now able to log into the system snapshot. So, the read-only restrictions is seems to be what's preventing the automatically generated snapshots from being loaded. (However, I still get the same error message. So there must be another cause for that. Any ideas?)

Having to set read-write privileges manually or take a new snapshot every time I make modifications to the computer is somewhat impractical and easy to forget. At least for my purposes, the main point of taking snaps of my root system so I can boot into a previous state if shit hits the fan, rather than having to resort to a live USB.

The question remains now is:

Can Snapper be configured to apply read-write privileges to automatically generated snapshots?

I've been trying to figure out if snapshots' default read-only behaviour can be modified in the config files, but I can find no variables in the configs that indicate so. If this is not possible, consider this a feature request.


System info

Snapper: 0.10.4
OS: Arch Linux x86_64 
Host: 82JY Legion 5 17ACH6H 
Kernel: 6.1.11-arch1-1 
DE: GNOME 43.2 
CPU: AMD Ryzen 7 5800H with Radeon Graphics (16) @ 3.200GHz [43.1°C] 
GPU: NVIDIA GeForce RTX 3070 Mobile / Max-Q 
GPU: AMD ATI Radeon Vega Series / Radeon Vega Mobile Series 
Memory: 3.13GiB / 29.24GiB 
GPU Driver: NVIDIA 525.89.02 
Disk (/): 800G / 954G (85%) 
@aschnell
Copy link
Member

snapper can indeed not be configured to create read-write snapshots per default. Those have the disadvantage that the file list used for the status command cannot be cached.

It should be possible to change the ro property using btrfs in a snapper plugin.

@aschnell aschnell closed this as not planned Won't fix, can't repro, duplicate, stale Feb 17, 2023
@pehkawn
Copy link
Author

pehkawn commented Feb 20, 2023

Ok, not the answer I had hope for, but thank you for your reply.

It should be possible to change the ro property using btrfs in a snapper plugin.

Could you recommend any such plugin?

@KiLLeRRaT
Copy link

I'm also interested in this, and would love to figure out a solution. Trying to move off of Timeshift in favour of snapper.

At the moment, I'm having to use Timeshift for my root, and snapper for the other subvolumes, so that I can boot in case of disaster.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants