From 388d1d2e8731bb5812a418d64b44f909c9231f49 Mon Sep 17 00:00:00 2001 From: jedi Date: Sat, 9 May 2020 13:56:03 +0200 Subject: [PATCH] wip --- entry.sh | 75 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 38 insertions(+), 37 deletions(-) diff --git a/entry.sh b/entry.sh index 624b4b0..6aeae4c 100755 --- a/entry.sh +++ b/entry.sh @@ -5,20 +5,20 @@ function first_stage(){ set -e echo foo first_stage - echo -n "luks password: " - read -s luks_password_in - export LUKS_PASSWORD=$luks_password_in - echo + #echo -n "luks password: " + #read -s luks_password_in + #export LUKS_PASSWORD=$luks_password_in + #echo echo -n "root password: " read -s root_password_in export ROOT_PASSWORD=$root_password_in echo - echo -n "user password: " - read -s user_password_in - export USER_PASSWORD=$user_password_in - echo + #echo -n "user password: " + #read -s user_password_in + #export USER_PASSWORD=$user_password_in + #echo lsblk -ftpo NAME,FSTYPE,LABEL,UUID,FSAVAIL,MOUNTPOINT select DEVICE in $(lsblk -frpno NAME); do @@ -52,7 +52,7 @@ function first_stage(){ echo p echo 1 echo - echo +2G + echo +1G echo n echo p echo 2 @@ -64,14 +64,14 @@ function first_stage(){ echo mkfs.ext4 ${DEVICE}1 yes | mkfs.ext4 ${DEVICE}1 - ( - echo $LUKS_PASSWORD - echo $LUKS_PASSWORD - )| cryptsetup luksFormat ${DEVICE}2 - echo $LUKS_PASSWORD | cryptsetup luksOpen ${DEVICE}2 cryptlvm - unset LUKS_PASSWORD - pvcreate /dev/mapper/cryptlvm - vgcreate vg0 /dev/mapper/cryptlvm + #( + #echo $LUKS_PASSWORD + #echo $LUKS_PASSWORD + #)| cryptsetup luksFormat ${DEVICE}2 + #echo $LUKS_PASSWORD | cryptsetup luksOpen ${DEVICE}2 cryptlvm + #unset LUKS_PASSWORD + pvcreate ${DEVICE}2 + vgcreate vg0 ${DEVICE}2 export LVM_SIZE=$(dev_size /dev/mapper/cryptlvm) @@ -98,7 +98,7 @@ function first_stage(){ genfstab -U $TARGET | tee $TARGET/etc/fstab UUID=$(lsblk -lpo NAME,UUID | grep ${DEVICE}2 | awk '{print $2}') - echo cryptlvm UUID=${UUID} none luks > $TARGET/etc/crypttab + #echo cryptlvm UUID=${UUID} none luks > $TARGET/etc/crypttab } function second_stage(){ @@ -112,29 +112,30 @@ function second_stage(){ echo -n > /etc/motd sed -i 's/main/main contrib non-free/g' /etc/apt/sources.list apt update - apt install -y linux-image-amd64 grub2 cryptsetup btrfs-progs lvm2 firmware-iwlwifi locales tzdata keyboard-configuration console-common zsh intel-microcode + #apt install -y linux-image-amd64 grub2 cryptsetup btrfs-progs lvm2 firmware-iwlwifi locales tzdata keyboard-configuration console-common zsh intel-microcode + apt install -y linux-image-amd64 grub2 btrfs-progs lvm2 locales tzdata keyboard-configuration console-common intel-microcode grub-install ${DEVICE} mkdir /snap btrfs subvolume snapshot / /snap/$(date +%Y-%m-%d_basesystem) - apt install -y task-mate-desktop mate-desktop-environment-extra - ( - echo $USER_PASSWORD - echo $USER_PASSWORD - echo - echo - echo - echo - echo - ) | adduser jedi - unset USER_PASSWORD + #apt install -y task-mate-desktop mate-desktop-environment-extra + #( + #echo $USER_PASSWORD + #echo $USER_PASSWORD + #echo + #echo + #echo + #echo + #echo + #) | adduser jedi + #unset USER_PASSWORD - HOME=/home/jedi - btrfs subvolume snapshot / /snap/$(date +%Y-%m-%d_user_gui) - apt install -y git virt-manager telegram-desktop firefox thunderbird geany vlc pidgin inkscape meld kicad blender - git clone git://github.com/robbyrussell/oh-my-zsh.git $HOME/.oh-my-zsh - chmod 0755 $HOME/.oh-my-zsh - chown -R jedi:jedi $HOME - chsh --shell /bin/zsh jedi + #HOME=/home/jedi + #btrfs subvolume snapshot / /snap/$(date +%Y-%m-%d_user_gui) + #apt install -y git virt-manager telegram-desktop firefox thunderbird geany vlc pidgin inkscape meld kicad blender + #git clone git://github.com/robbyrussell/oh-my-zsh.git $HOME/.oh-my-zsh + #chmod 0755 $HOME/.oh-my-zsh + #chown -R jedi:jedi $HOME + #chsh --shell /bin/zsh jedi echo second_stage done }