nix-installer icon indicating copy to clipboard operation
nix-installer copied to clipboard

Mac APFS volume cannot be unmounted (Kernel)

Open byrongibson opened this issue 1 year ago • 2 comments
trafficstars

Related: https://github.com/DeterminateSystems/nix-installer/issues/824

Error

> sudo /nix/nix-installer uninstall

...

Error: 
   0: Error reverting
   0: Action `create_or_merge_nix_config` errored
      Remove file `/etc/nix/nix.conf`

      Action `create_apfs_volume` errored
      Failed to execute command with status 1 `"/usr/sbin/diskutil" "apfs" "deleteVolume" "Nix Store"`, stdout: Started APFS operation
      Deleting APFS Volume from its APFS Container
      Unmounting disk3s7
      The volume "Nix Store" on disk3s7 couldn't be unmounted because it is in use by process 0 (kernel)

      stderr: Error: -69888: Couldn't unmount disk

Metadata

key value
version 0.16.0
os macos
arch aarch64

byrongibson avatar Feb 11 '24 05:02 byrongibson

The file /etc/nix/nix.conf did not exist per the other issue referenced at top. But nix-installer couldn't delete the APFS volume here.

byrongibson avatar Feb 11 '24 05:02 byrongibson

Similar to #836. We likely need to find some way to not attempt install while the APFS disk is unmountable.

Hoverbear avatar Feb 12 '24 16:02 Hoverbear