diff options
author | Karel Kočí <cynerd@email.cz> | 2023-01-25 15:18:55 +0100 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2023-01-25 15:18:55 +0100 |
commit | e296418596d0387fa98814b0b12612e4e2df61b4 (patch) | |
tree | 26eee94a6a96c39756f8ea612c398176a1cf3f10 | |
parent | f49a81ef79a2100cbae46bb9a5227ab140b04951 (diff) | |
download | nixos-personal-e296418596d0387fa98814b0b12612e4e2df61b4.tar.gz nixos-personal-e296418596d0387fa98814b0b12612e4e2df61b4.tar.bz2 nixos-personal-e296418596d0387fa98814b0b12612e4e2df61b4.zip |
tools/install.sh: fix activation
The activation tool mounts the /run or remounts if already mounted. The
mount removes copied over binfmt and this breaks activation. Remount
only changes mount options and thus preserves content and this binfmt
keeps working.
-rwxr-xr-x | tools/install.sh | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/install.sh b/tools/install.sh index 71a7aa7..254b93b 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -56,6 +56,9 @@ touch "$root/etc/NIXOS" # Copy over binfmt runners if required if [ "$buildSystem" != "$targetSystem" ]; then + mkdir -p "$root/run" + mountpoint -q "$root/run" \ + || mount -t tmpfs -o "nosuid,nodev,strictatime,mode=755" tmpfs "$root/run" mkdir -p "$root/run/binfmt" for binfmt in /run/binfmt/*; do nix copy --to "$root" "$(readlink -f "$binfmt")" |