Skip to content

Commit d9c9d0e

Browse files
authored
Merge pull request NixOS#5500 from abathur/fix_darwin_existing_mounted_volume
darwin-install: fix already-mounted store volumes
2 parents 736d6ab + abdf9f2 commit d9c9d0e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

scripts/create-darwin-volume.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -742,6 +742,9 @@ setup_volume() {
742742

743743
use_special="${NIX_VOLUME_USE_SPECIAL:-$(create_volume)}"
744744

745+
_sudo "to ensure the Nix volume is not mounted" \
746+
/usr/sbin/diskutil unmount force "$use_special" || true # might not be mounted
747+
745748
use_uuid=${NIX_VOLUME_USE_UUID:-$(volume_uuid_from_special "$use_special")}
746749

747750
setup_fstab "$use_uuid"

0 commit comments

Comments
 (0)