-
Notifications
You must be signed in to change notification settings - Fork 98
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
Can't encrypt ext4 filesystem if root is btrfs subvolume #339
Comments
|
Quick and dirty hack would be options to fscrypt and libpam-fscrypt to at least allow an expert user to tell the code that they know what they're doing, it all looks a bit prescriptive at the moment :( |
0.2.7 doesn't work either, so the finger points to #154. Really evil hack of bind mounting over /proc so fscrypt sees a fake mountinfo with "/" instead of "/<subvol>" as the fourth field doesn't work, which I really don't understand (findmnt is fooled by it OK!) Only other thing I can think of something odd to do with the device numbers, but the problem is not leaping out of the code at me :( |
|
Hmm, digging a bit more, I think it's the device number .. stat / shows 0x001c (0:28), but /proc/self/mountinfo shows 0:26. I can't actually find the code that checks this right now, but faking mountinfo with the number as returned by stat suppresses the error. |
Oh, duh, it's fscrypt/filesystem/mountpoint.go Line 361 in 6ec8ee0
The 'obvious' fix to my sleep deprived brain is to stat each mount point in parseMountInfoLine() rather than trusting the device number from the file, but I don't know if this would have any implications for bind mounts etc. |
Add back the mountsByPath map, which indexes all Mounts by mountpoint. This is needed again. To avoid confusion, also rename two local variables named mountsByPath. mountsByPath won't contain nil entries, so also make AllFilesystems() use it instead of mountsByDevice. This shouldn't change its behavior. Update #339
This is needed to make FindMount() work on btrfs filesystems. Update #339
This is needed to allow creating protector links to btrfs filesystems. Update #339
I couldn't find a great solution, but #340 should fix this. |
That seems to work - thank you very much for the quick turnaround on this! (It was holding up the preparation of my elderly uncle's new laptop, so we're doubly grateful :) |
Add back the mountsByPath map, which indexes all Mounts by mountpoint. This is needed again. To avoid confusion, also rename two local variables named mountsByPath. mountsByPath won't contain nil entries, so also make AllFilesystems() use it instead of mountsByDevice. This shouldn't change its behavior. Update #339
This is needed to make FindMount() work on btrfs filesystems. Update #339
This is needed to allow creating protector links to btrfs filesystems. Update #339
This is needed to make FindMount() work on btrfs filesystems. Update #339
This is needed to allow creating protector links to btrfs filesystems. Update #339
(Running 0.2.9, as it's what I had easily available, but I don't think this code has changed.)
My root partition is a btrfs subvolume, which means means the entry for root in /proc/self/mountinfo looks similar to this:
Trying to encrypt my home directory, which is on an ext4 volume, I get the error
"/" is not a mountpoint
.I can't see any obvious workarounds ...
The text was updated successfully, but these errors were encountered: