Skip to content

Installer: write the encryption choice onto the new ESP, not an empty folder - #15

Merged
maralcbr merged 2 commits into
mainfrom
mac/86-encryption-choice-esp
Sep 26, 2026
Merged

maralcbr merged 2 commits into
mainfrom
mac/86-encryption-choice-esp

Conversation

@maralcbr

Copy link
Copy Markdown
Collaborator

Port of Eryk Wieliczko's fix from maralcbr/omarchy-mx-mac#274 (issue maralcbr/omarchy-mx-mac#273, still open there). Commit author kept.

The engine leaves the new ESP mounted in /Volumes. diskutil mount -mountPoint <dir> then succeeds without moving it, so install.conf, which carries the encryption choice, went into an empty directory instead of the ESP. First boot then defaulted to encrypting, even with the checkbox off. Now the ESP is unmounted and mounted again at the handoff directory. The write only goes ahead when diskutil info confirms that exact device is writable there. The failure cleanup uses rmdir so it can never recurse into a mounted filesystem.

Tested on the M4: swift-format lint --strict clean; swift test debug (463) and release (457) pass, including the five new mount tests; test/all passes. The contributor tested it on a MacBook Air M1 with encryption off. Not yet run on our test Macs.

Second review: no verified findings. Checked unmount/remount safety, the mount-point verification and the cleanup path.

@maralcbr
maralcbr merged commit beed767 into main Sep 26, 2026
3 checks passed
@maralcbr
maralcbr deleted the mac/86-encryption-choice-esp branch September 26, 2026 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant