summaryrefslogtreecommitdiff
path: root/gnu/machine
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim@guixotic.coop>2026-05-07 17:34:31 +0900
committerMaxim Cournoyer <maxim@guixotic.coop>2026-05-11 20:31:36 +0900
commit54e92a3c0553b212b1462df1dbc3f35f47356824 (patch)
tree6921b5aa35d03bd985b6424d7ae126a8a15a33b2 /gnu/machine
parent436aeea0bfd7c35e51db3b7ad7fb6e5bc54fb5fa (diff)
machine: hetzner: Refine installation with bind mount in rescue.
This reverts commit 3e1befe1d8e ("machine: hetzner: Fix deployment."), adopting a simpler/correct alternative. * gnu/machine/hetzner.scm (hetzner-machine-rescue-install-os): Bind mount /gnu, not /gnu/store. Change-Id: I09ffb4db8a39b4bcd5e7645aee63427c6bc969a0 Suggested-by: Rutherther <rutherther@ditigal.xyz>
Diffstat (limited to 'gnu/machine')
-rw-r--r--gnu/machine/hetzner.scm14
1 files changed, 3 insertions, 11 deletions
diff --git a/gnu/machine/hetzner.scm b/gnu/machine/hetzner.scm
index 4640e2c6193..8795ff8e5ea 100644
--- a/gnu/machine/hetzner.scm
+++ b/gnu/machine/hetzner.scm
@@ -585,19 +585,11 @@ chmod 600 /mnt/root/.ssh/authorized_keys
585 585
586# Small instance don't have much disk space. Bind mount the store of the 586# Small instance don't have much disk space. Bind mount the store of the
587# rescue system to the tmp directory of the new Guix system. 587# rescue system to the tmp directory of the new Guix system.
588mkdir -p /mnt/tmp/gnu/store 588mkdir -p /mnt/tmp/gnu
589mkdir -p /gnu/store 589mkdir -p /gnu
590mount --bind /mnt/tmp/gnu/store /gnu/store 590mount --bind /mnt/tmp/gnu /gnu
591 591
592wget -O /tmp/guix-install.sh https://guix.gnu.org/guix-install.sh 592wget -O /tmp/guix-install.sh https://guix.gnu.org/guix-install.sh
593
594# Modify the install script to point the systemd unit of the /gnu/store
595# mountpoint to the same /mnt/tmp/gnu/store which was introduced above.
596store_fix=\"sed -i 's#Where=/gnu/store#Where=/mnt/tmp/gnu/store#'
597 ~~root/.config/guix/current/lib/systemd/system/gnu-store.mount\"
598sed -i \"s@install_unit gnu-store.mount\"\\
599\"@$(printf \"%q \" $store_fix)\\ninstall_unit gnu-store.mount@\" /tmp/guix-install.sh
600
601chmod +x /tmp/guix-install.sh 593chmod +x /tmp/guix-install.sh
602set +o pipefail # avoid hangup on 'yes' killing this script 594set +o pipefail # avoid hangup on 'yes' killing this script
603yes '' | /tmp/guix-install.sh 595yes '' | /tmp/guix-install.sh