]>
git.immae.eu Git - perso/Immae/Projets/Puppet.git/blob - scripts/hetzner_server/arch_host_script.sh
12 # Prepare an arch chroot
15 LATEST
=$(curl -L https://mirrors.kernel.org/archlinux/iso/latest/sha1sums.txt | grep "bootstrap" | head -n1)
16 SHA1
=$(echo "$LATEST" | cut -d' ' -f1)
17 NAME
=$(echo "$LATEST" | cut -d' ' -f3)
19 curl
-L -O "https://mirrors.kernel.org/archlinux/iso/latest/$NAME"
23 echo 'Server = http://archlinux.mirrors.ovh.net/archlinux/$repo/os/$arch' > /tmp
/root.x
86_
64/etc
/pacman.d
/mirrorlist
24 # /Prepare an arch chroot
26 # Prepare device information (not available in chroot)
30 UUID
=$(lsblk -rno UUID "$DEVICE")
32 echo "$UUID" > /tmp
/root.x
86_
64/device_uuid
33 # /Prepare device information
35 # Install very basic system via chroot (base git puppet)
36 cp /tmp
/arch_chroot_script.sh
/tmp
/root.x
86_
64/
38 /tmp
/root.x
86_
64/bin
/arch
-chroot /tmp
/root.x
86_
64/ /arch_chroot_script.sh
39 # /Install very basic system via chroot
41 # Mount and install rest of system (via puppet)
42 mount
"$DEVICE" "$MOUNTPOINT"
44 cp /tmp
/arch_install_script.sh
"$MOUNTPOINT/root/"
45 cp /tmp
/puppet_variables.json
"$MOUNTPOINT/root/"
47 /tmp
/root.x
86_
64/bin
/arch
-chroot "$MOUNTPOINT" /root
/arch_install_script.sh
"$git_branch" "$environment"
48 # /Mount and install rest of system