master
root 7 years ago
commit 7fdf28e4c6

@ -0,0 +1,21 @@
#!/bin/bash
set -e
apt-get -y install mdadm btrfs-tools
"./parted/${1}.sh"
cryptsetup luksFormat /dev/md0
cryptsetup open --type luks /dev/md0 md0-unlocked
mkfs.btrfs /dev/mapper/md0-unlocked
mkdir /mnt/md0-unlocked
mount /dev/mapper/md0-unlocked /mnt/md0-unlocked
debootstrap --variant=minbase --arch=amd64 stretch /mnt/md0-unlocked https://deb.debian.org/debian/
mount -t proc none /mnt/md0-unlocked/proc
mount -t sysfs none /mnt/md0-unlocked/sys
mount -o bind /dev /mnt/md0-unlocked/dev

@ -0,0 +1,10 @@
#!/bin/bash
set -e
parted /dev/sda mklabel msdos Yes
parted /dev/sda mkpart primary 1 440GiB
parted /dev/sdb mklabel msdos Yes
parted /dev/sdb mkpart primary 1 440GiB
mdadm -C /dev/md0 --force -l1 -n2 /dev/sda1 /dev/sdb1 <<< yes
Loading…
Cancel
Save