]> git.immae.eu Git - perso/Immae/Projets/Puppet.git/blobdiff - scripts/hetzner_server/arch_chroot_script.sh
Merge branch 'dev'
[perso/Immae/Projets/Puppet.git] / scripts / hetzner_server / arch_chroot_script.sh
diff --git a/scripts/hetzner_server/arch_chroot_script.sh b/scripts/hetzner_server/arch_chroot_script.sh
new file mode 100755 (executable)
index 0000000..afc78e2
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+pacman-key --init
+pacman-key --populate archlinux
+
+UUID=$(cat /device_uuid)
+PART="/dev/disk/by-uuid/$UUID"
+DEVICE=$(realpath "$PART")
+
+mkfs.ext4 -F -U "$UUID" "$DEVICE"
+mount "$DEVICE" /mnt
+
+pacstrap -G /mnt base git puppet
+
+echo "$PART / auto defaults 0 1" > /mnt/etc/fstab
+
+umount /mnt
+