diff --git a/debootstrap.sh b/debootstrap.sh index 126a032..fe4b15e 100755 --- a/debootstrap.sh +++ b/debootstrap.sh @@ -6,9 +6,11 @@ apt-get -y install mdadm btrfs-tools "./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 unset md0pwd + cryptsetup open --type luks /dev/md0 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 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 diff --git a/post-debootstrap-installer.sh b/post-debootstrap-installer.sh old mode 100644 new mode 100755 index aef4467..683772a --- a/post-debootstrap-installer.sh +++ b/post-debootstrap-installer.sh @@ -5,12 +5,18 @@ set -e echo 'console-setup console-setup/charmap47 select UTF-8' | debconf-set-selections echo 'keyboard-configuration keyboard-configuration/variant select English (US)' | debconf-set-selections echo 'keyboard-configuration kekeyboard-configuration keyboard-configuration/layout select English (US)' | debconf-set-selections +echo 'locales locales/default_environment_locale select en_US.UTF-8' | debconf-set-selections +echo 'locales locales/locales_to_be_generated multiselect en_US.UTF-8 UTF-8' | debconf-set-selections +apt-get -y install locales + +# add docker key apt-get -y install gnupg2 apt-key add docker.key +apt-get -y --purge autoremove gnupg2 + echo 'deb https://download.docker.com/linux/debian stretch stable' > /etc/apt/sources.list.d/docker.list apt-get update -apt-get -y --purge autoremove gnupg2 apt-get -y install \ systemd \