5. Run first boot¶
Goal: copy the package to the Mac mini and run first-boot.sh as admin, at the Mac mini's own display and keyboard.
Steps¶
- Turn on the Mac mini and complete Apple's Setup Assistant. Create the
adminaccount. Do not turn on FileVault: it blocks the operator's automatic login. The Apple first-boot dialog guide covers each dialog. - On the Mac mini, open AirDrop in Finder (Shift-Command-R) and set "Allow me to be discovered by" to Everyone.
- On the dev Mac, AirDrop the
~/macmini-setupfolder to the Mac mini. It arrives in~/Downloads/macmini-setup. -
On the Mac mini, open Terminal and go to the package:
-
Make sure that FileVault is off and the disk is fully decrypted:
The output must be
FileVault is Off.If FileVault is on, turn it off in System Settings > Privacy & Security > FileVault. Wait untilfdesetup statusprintsFileVault is Off., which can take an hour or more. The script also offers to turn FileVault off, but turning it off before you run the script is the tested path. -
Run the script. Do not run it over SSH: it stops unless it runs in a desktop session.
-
Press Enter at "This script will configure your Mac Mini server. Continue?".
- Enter the
adminpassword when the script asks for it. Latersudoprompts show a label in brackets, such as[SSH setup]. Enter theadminpassword at each one. - Answer the Touch ID for
sudoand Wi-Fi prompts. -
If the SSH step asks you to give Terminal Full Disk Access, do these steps:
- Drag Terminal from the Finder window into the Full Disk Access list in System Settings.
- Close every Terminal window.
-
Open a new Terminal window and run the script again:
-
Turn on Screen Sharing when the script opens System Settings. Then sign in to the Apple Account. The script opens a one-time 1Password link to the password.
-
Wait while the script installs the Command Line Tools, Homebrew and the packages. This part takes the longest.
- At the end, a "Server Setup Complete" dialog opens. Click OK. A new Terminal window opens in
~/app-setup. Keep it open. You run app setup in it in tutorial step 6, before any restart.
Warning
Do not use --force on a first run. It skips the password prompt, and the keychain import needs that password.
For the prompts, options and errors in detail, see First boot.
Check¶
-
The summary says
Setup completed successfully with no errors or warnings!, or it lists only warnings that you understand. Some steps log a problem without adding it to the summary, so also search the full log:Read each line that it prints. No output means no module reported a problem. 2. The
operatoraccount exists and logs in automatically:dscl . -read /Users/operator UserShell defaults read /Library/Preferences/com.apple.loginwindow autoLoginUserThe second command prints
operator. -
The app setup folder exists:
-
From the dev Mac, SSH works with your key:
Next: Run app setup