|
|
@ -6,9 +6,11 @@ apt-get -y install mdadm btrfs-tools
|
|
|
|
|
|
|
|
|
|
|
|
"./parted/${1}.sh" # "returns" /dev/md0 as root device
|
|
|
|
"./parted/${1}.sh" # "returns" /dev/md0 as root device
|
|
|
|
|
|
|
|
|
|
|
|
read md0pwd
|
|
|
|
echo -n 'Enter luks password: '
|
|
|
|
|
|
|
|
read -s md0pwd
|
|
|
|
echo -n $md0pwd | cryptsetup -q luksFormat /dev/md0
|
|
|
|
echo -n $md0pwd | cryptsetup -q luksFormat /dev/md0
|
|
|
|
unset md0pwd
|
|
|
|
unset md0pwd
|
|
|
|
|
|
|
|
|
|
|
|
cryptsetup open --type luks /dev/md0 md0-unlocked
|
|
|
|
cryptsetup open --type luks /dev/md0 md0-unlocked
|
|
|
|
|
|
|
|
|
|
|
|
mkfs.btrfs /dev/mapper/md0-unlocked
|
|
|
|
mkfs.btrfs /dev/mapper/md0-unlocked
|
|
|
@ -23,6 +25,6 @@ mount -t sysfs none /mnt/md0-unlocked/sys
|
|
|
|
mount -o bind /dev /mnt/md0-unlocked/dev
|
|
|
|
mount -o bind /dev /mnt/md0-unlocked/dev
|
|
|
|
|
|
|
|
|
|
|
|
cp docker.key /mnt/md0-unlocked/docker.key
|
|
|
|
cp docker.key /mnt/md0-unlocked/docker.key
|
|
|
|
cp post-debootstrap-installer.sh /mnt/md0-unlocked/post-debootstrap-installer.sh
|
|
|
|
cp -a post-debootstrap-installer.sh /mnt/md0-unlocked/post-debootstrap-installer.sh
|
|
|
|
|
|
|
|
|
|
|
|
chroot /mnt/md0-unlocked /post-debootstrap-installer.sh
|
|
|
|
chroot /mnt/md0-unlocked /post-debootstrap-installer.sh
|
|
|
|