diff --git a/hardware/test-vm/grub.sh b/hardware/test-vm/grub.sh new file mode 100755 index 0000000..4a92fe9 --- /dev/null +++ b/hardware/test-vm/grub.sh @@ -0,0 +1,5 @@ +#!/bin/bash +set -e + +grub-install /dev/vda +grub-install /dev/vdb diff --git a/hardware/test-vm/parted.sh b/hardware/test-vm/parted.sh new file mode 100755 index 0000000..9391de4 --- /dev/null +++ b/hardware/test-vm/parted.sh @@ -0,0 +1,20 @@ +#!/bin/bash +set -e + + +# root 10GB +# boot 5GB +# free 5GB + +parted /dev/vda mklabel msdos +parted /dev/vda mkpart primary 1 10GB +parted /dev/vda mkpart primary 10GB 15GB +parted /dev/vdb mklabel msdos +parted /dev/vdb mkpart primary 1 10GB +parted /dev/vdb mkpart primary 10GB 15GB + +sleep 1 + +# $1=hostname +echo 'yes' | mdadm -C /dev/md0 --homehost="$1" -l1 -n2 /dev/vd[ab]1 +echo 'yes' | mdadm -C /dev/md1 --homehost="$1" -l1 -n2 /dev/vd[ab]2 diff --git a/setup.sh b/setup.sh index 8f538cf..f3713b2 100755 --- a/setup.sh +++ b/setup.sh @@ -2,7 +2,7 @@ set -e -apt-get -y install mdadm btrfs-tools +apt-get -y install mdadm btrfs-tools cryptsetup # returns /dev/md0 as root device # returns /dev/md1 as boot device