From e296418596d0387fa98814b0b12612e4e2df61b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Wed, 25 Jan 2023 15:18:55 +0100 Subject: 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. --- tools/install.sh | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tools') 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")" -- cgit v1.2.3