-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Rebooting always unmount Nix volume in macOS Monterey 12.5 #6839
Comments
Thanks for the good report. Gets a lot of basics out of the way. Three (groups of) questions to start:
|
Hi @abathur, thank you for looking into this! I will try to clear up the questions you raised here, please do let me know if you need more information:
What happened and the symptoms: Troubleshooting and investigations: Other remarks:
and
I'm not sure how relevant this is but just thought I should mention it. Since I managed to get my setup running again just by mounting I also came across these similar issues (#3616 etc) during my investigations, but I thought it wasn't applicable here because my whole Nix volume was missing, hence I didn't expect something that sources from |
The Unfortunately, the exact circumstances aren't something I think I've heard of. Two thoughts:
|
I'm not sure whether this helps, but since I ran into the same issues, I'll share my observations and how I fixed it temporarily. Basically the output of
shows I don't necessarily recommend disabling FileVault, but for a temporary solution on a Mac that never leaves home, I can live with it for the time being. |
@pejaab You might be able to disambiguate by looking for a credential with the same UUID in keychain. Here's how it's formatted/named/described when it's added: nix/scripts/create-darwin-volume.sh Lines 708 to 710 in a88ae62
If this credential goes missing for some reason, or if there is one but it doesn't correspond to your volume's UUID, the darwin-store daemon won't be able to unlock it. Technically macOS itself can unlock this on mount--but it does it too late to prevent subtle race condition failures if your system needs to run executables or restore apps/window contents that are on the Nix Store volume. The installer sets the volume up not to use the macOS built-in automounting to make sure problems like this have to get promptly and directly addressed instead of just causing people flaky hard-to-troubleshoot boot problems that might result in data loss and make them miserable for months or years. |
@abathur thanks for the explanation. From the discussion above I was more or less able to extrapolate how this should work. The corresponding credential was persisted correctly in an entry in the Keychain App. When manually starting the |
I'm a bit stumped on why it would be failing on boot and not when you manually launch the daemon (and why your case is differing with OPs on this point). I agree that it does smell like there's some sort of permission difference. Does your device happen to be an org device that may have an MDM profile? (I'm not sure why an org profile might appear to be restricting root more than your user, so I don't really think this would explain it--but we do have a small number of known problems associated with profile-enforced permissions/restrictions.) |
No it's not an org device and doesn't have an MDM profile. If there is anything you feel like worth trying, I'm happy to support in case that gets anyone further. |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/upgrading-to-macos-sonoma/33580/5 |
I met a similar problem with you - after I moved my Same as @pejaab pointed in #6839 (comment) I can manually execute I guess this is related to race condition for external storage: When |
I am facing the same issue after doing a macOS upgrade to Sonoma.
Now my remaining issue is the nix volume not mounting on startup (I'm not using external hard drives).
I am using FileVault and would like to continue using it. The volume UUID agrees with the UUID in Attaching both .plist files By the way, I've seen some threads suggesting to run |
@emileindik I'm skeptical that this is caused (or solely caused) by the update because we don't have the volume of corroborating reports we'd expect if macOS updates were systematically overwriting /etc/bashrc or messing up the volume-mounting service (in contrast with updates overwriting /etc/zshrc which is extensively corroborated by reports). I queried in the Nix on macOS room on Matrix and no one has corroborated seeing this on any Sonoma update so far (but I'll update if someone does).
I don't see anything wrong with these at a glance.
They are separate services. I'm not sure what's going on, so I'll just think out loud a bit...
|
Thanks for the quick response @abathur. I updated from Sonoma 14.6 to a developer beta version (14.6.x I think?). That borked my /etc/bashrc. I've since reverted back to 14.6 and this time /etc/bashrc stayed intact. Telling, perhaps.
I will report back if I uninstall/reinstall nix and still see issue. Many thanks! |
Update: finally got it working after reading last post in this thread https://discourse.nixos.org/t/macos-upgrade-breakage/50691/7 |
Describe the bug
The Nix Store volume is not mounted automatically after rebooting in macOS Monterey 12.5 (Intel).
Steps To Reproduce
/nix
path is not available.Expected behavior
The Nix Store APFS volume should be automatically mounted.
nix-env --version
outputnix-env (Nix) 2.10.3
Additional context
Things were working fine under Monterey 12.4, and this issue popped up after upgrading to Monterey 12.5.
I tried uninstalling and re-installing Nix, but that did not seem to fix the issue.
To get nix working again, I would have to mount the Nix Store APFS volume in Disk Utility manually and run
sudo launchctl kickstart -k system/org.nixos.activate-system
./etc/fstab
and/etc/synthetic.conf
seemed fine:In case this is relevant, I'm also running this Monterey from an external drive with the following structure:
The text was updated successfully, but these errors were encountered: