X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FProjets%2FPuppet.git;a=blobdiff_plain;f=scripts%2Fhetzner_server%2Farch_chroot_script.sh;fp=scripts%2Fhetzner_server%2Farch_chroot_script.sh;h=afc78e2430f55815378b1af12f7c3e376c0df218;hp=0000000000000000000000000000000000000000;hb=d2c58adb0dfa47a4be23686e231d1a2ebc620b81;hpb=c5465178352d4bce4a4ea01bf03fbc6d6b7e59e8 diff --git a/scripts/hetzner_server/arch_chroot_script.sh b/scripts/hetzner_server/arch_chroot_script.sh new file mode 100755 index 0000000..afc78e2 --- /dev/null +++ b/scripts/hetzner_server/arch_chroot_script.sh @@ -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 +