aboutsummaryrefslogtreecommitdiff
path: root/scripts/ovh_vps_ssd/arch_chroot_script.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/ovh_vps_ssd/arch_chroot_script.sh')
-rwxr-xr-xscripts/ovh_vps_ssd/arch_chroot_script.sh29
1 files changed, 29 insertions, 0 deletions
diff --git a/scripts/ovh_vps_ssd/arch_chroot_script.sh b/scripts/ovh_vps_ssd/arch_chroot_script.sh
new file mode 100755
index 0000000..9dc5c46
--- /dev/null
+++ b/scripts/ovh_vps_ssd/arch_chroot_script.sh
@@ -0,0 +1,29 @@
1#!/bin/bash
2
3pacman-key --init
4pacman-key --populate archlinux
5
6UUID=$(cat /device_uuid)
7PART="/dev/disk/by-uuid/$UUID"
8DEVICE=$(realpath "$PART")
9
10# mkfs.ext4 -F -U "$UUID" "$DEVICE"
11mount "$DEVICE" /mnt
12
13##### FIXME: mkfs.ext4 would be better ####
14for i in /mnt/*; do
15 if [ "$i" = "/mnt/boot" ]; then
16 # keep /boot/grub
17 rm -f $i/*
18 else
19 rm -rf $i
20 fi
21done
22##### /FIXME ####
23
24pacstrap /mnt base git puppet
25
26echo "$PART / auto defaults 0 1" > /mnt/etc/fstab
27
28umount /mnt
29