DeterminateSystems / nix-installer

Install Nix and flakes with the fast and reliable Determinate Nix Installer, with over 7 million installs.
https://determinate.systems
GNU Lesser General Public License v2.1
2.15k stars 53 forks source link

Created APFS volume is not found #838

Open quatrezoneilles opened 8 months ago

quatrezoneilles commented 8 months ago

Error

Error: 

0: Install failure
   1: Error executing action
   2: Action `create_nix_volume` errored
   3: Failed to execute command with status 1 `"/usr/sbin/diskutil" "info" "/nix"`, stdout: Could not find disk: /nix

      stderr: 

Metadata

key value
version 0.16.1
os macos
arch x86_64

First attempt at install, on 10.14.6 Mojave. It goes wrong here

        "kickstart_launchctl_service": {
          "action": {
            "domain": "system",
            "service": "org.nixos.darwin-store"
          },
          "state": "Completed"
        },
        "enable_ownership": {
          "action": {
            "path": "/nix"
          },
         "state": "Uncompleted"
        }
Hoverbear commented 8 months ago

Seems there may have been an undetected problem in the APFS volume creation, darn.

Did it create a /nix? Can you see a Nix store in your Disk Utility list?

quatrezoneilles commented 8 months ago

Yes to the first question

ls /nix/
nix-installer   receipt.json

No to the second one

Hoverbear commented 8 months ago

Do you see a volume named Nix Store in diskutil apfs list?

quatrezoneilles commented 8 months ago

No I don't.

It dawned to me that it could be that this mac was bought by my employer in 2015 and the disk was encrypted by a sysadmin who told me I didn't need the password (true until now). I opened my own account and renamed the original account something like employer-admin ... unfortunately I deleted this account a few months ago, thinking I no longer needed it. Stupid me.

So a solution (I hope) would be to use the recovery facilities and erase the disk and start anew. Due to my main driver being kaputt right now that old Mac is under much heavier use than it would normally be and I wouldn't do it right now.

Do you have an alternative suggestion?

I thought of Nix because Brew is becoming worse and worse on old machines. I suspect MacPorts is better, I have two macs that I use as music servers that are too old for brew to install on them but MacPorts runs fine (overall) on them. Still best would be Nix, I have NixOS on my two Linux boxes .. one of which just crapped out as I said earlier. I don't want to ever use another Linux distro.

Thanks a lot anyway

Hoverbear commented 8 months ago

Does the upstream install work for you maybe? https://nixos.org/download

quatrezoneilles commented 8 months ago

Looked at the docs two days ago, found I need a bit more time and preparation to do it. APFS is a complicated beast. Will try this weekend.

Hoverbear commented 8 months ago

I definitely agree with you that APFS is a complicated beast.

quatrezoneilles commented 8 months ago

It was easy to add an APFS volume using Disk Utility. I called is Nix Store. But the macos instructions on the manual https://nixos.org/manual/nix/stable/installation/installing-binary#macos-installation are completely opaque. I don't have an. /etc/synthetic.conf file, I don't know where to find it in the manpages... and my /etc/fstab is empty.. There's nothing about this either when I do ./nix-installer-etc help install

Awaiting further instructions, but we're progressing.

Hoverbear commented 8 months ago

If you're installing Nix manually (without this installer), you'd need to create both the synthetic.conf and fstab.