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

New custom-persist feature #551

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

Conversation

Guiiix
Copy link
Member

@Guiiix Guiiix commented Jan 28, 2025

This PR adds a new feature custom-persist described in QubesOS/qubes-issues#1006

When the custom-persist feature is enabled, we no longer need to worry about the bind directories configured in /rw/config/qubes-bind-dirs.d.
…ices start dependencies

The custom-persist feature should disable /home and /usr/local mounts by default.
To do this, we can use SystemD drop-ins which requires to remove fstab entries and
convert them to regular SystemD units as drop-ins does not seem to work with units generated
by systemd-fstab-generator.
Mount command in mount_dirs.sh is not required anymore and need to be deleted as it causes issues. Instead, a we can use
SystemD unit options to ensure /home and /usr/local are mounted before loading user bind dirs
Copy link

codecov bot commented Jan 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.46%. Comparing base (664df47) to head (3583fca).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #551      +/-   ##
==========================================
- Coverage   70.57%   70.46%   -0.12%     
==========================================
  Files           3        3              
  Lines         469      474       +5     
==========================================
+ Hits          331      334       +3     
- Misses        138      140       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

init/functions Outdated Show resolved Hide resolved
init/functions Outdated Show resolved Hide resolved
init/functions Outdated Show resolved Hide resolved
qubesagent/firewall.py Show resolved Hide resolved
vm-systemd/mount-dirs.sh Outdated Show resolved Hide resolved
Config is read from qubes database and every bind directory is mounted excepted /home and /usr/local which need to be handled differently
If not explicitly configured, /rw/home and /rw/usrlocal must not be bind mounted to /home and /usr/local.
Instead, the original /home and /usr/local is mounted.
SystemD drop-ins are used to override the resource to mount (What= option in unit)
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

Successfully merging this pull request may close these issues.

3 participants