wip
This commit is contained in:
parent
c81e420526
commit
713c8a8041
1 changed files with 17 additions and 3 deletions
20
entry.sh
20
entry.sh
|
@ -26,6 +26,8 @@ function first_stage(){
|
||||||
break
|
break
|
||||||
done
|
done
|
||||||
|
|
||||||
|
export DEVICE
|
||||||
|
|
||||||
apt install -y debootstrap cryptsetup btrfs-progs lvm2
|
apt install -y debootstrap cryptsetup btrfs-progs lvm2
|
||||||
|
|
||||||
if [ -d /dev/vg0 ]; then
|
if [ -d /dev/vg0 ]; then
|
||||||
|
@ -67,6 +69,7 @@ function first_stage(){
|
||||||
echo $LUKS_PASSWORD
|
echo $LUKS_PASSWORD
|
||||||
)| cryptsetup luksFormat ${DEVICE}2
|
)| cryptsetup luksFormat ${DEVICE}2
|
||||||
echo $LUKS_PASSWORD | cryptsetup luksOpen ${DEVICE}2 cryptlvm
|
echo $LUKS_PASSWORD | cryptsetup luksOpen ${DEVICE}2 cryptlvm
|
||||||
|
unset LUKS_PASSWORD
|
||||||
pvcreate /dev/mapper/cryptlvm
|
pvcreate /dev/mapper/cryptlvm
|
||||||
vgcreate vg0 /dev/mapper/cryptlvm
|
vgcreate vg0 /dev/mapper/cryptlvm
|
||||||
|
|
||||||
|
@ -100,14 +103,16 @@ function first_stage(){
|
||||||
|
|
||||||
function second_stage(){
|
function second_stage(){
|
||||||
set -e
|
set -e
|
||||||
echo $TARGET
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
echo $LVM_SIZE
|
|
||||||
(
|
(
|
||||||
echo $ROOT_PASSWORD
|
echo $ROOT_PASSWORD
|
||||||
echo $ROOT_PASSWORD
|
echo $ROOT_PASSWORD
|
||||||
) | passwd
|
) | passwd
|
||||||
|
unset ROOT_PASSWORD
|
||||||
echo -n > /etc/motd
|
echo -n > /etc/motd
|
||||||
apt install -y linux-image-amd64 grub2 cryptsetup btrfs-progs lvm2 locales tzdata keyboard-configuration console-common zsh
|
update_sources
|
||||||
|
apt install -y linux-image-amd64 grub2 cryptsetup btrfs-progs lvm2 firmware-iwlwifi locales tzdata keyboard-configuration console-common zsh
|
||||||
|
brub-install
|
||||||
mkdir /snap
|
mkdir /snap
|
||||||
btrfs subvolume snapshot / /snap/$(date +%Y-%m-%d_basesystem)
|
btrfs subvolume snapshot / /snap/$(date +%Y-%m-%d_basesystem)
|
||||||
apt install -y task-mate-desktop mate-desktop-environment-extra
|
apt install -y task-mate-desktop mate-desktop-environment-extra
|
||||||
|
@ -120,6 +125,7 @@ function second_stage(){
|
||||||
echo
|
echo
|
||||||
echo
|
echo
|
||||||
) | adduser jedi
|
) | adduser jedi
|
||||||
|
unset USER_PASSWORD
|
||||||
|
|
||||||
HOME=/home/jedi
|
HOME=/home/jedi
|
||||||
btrfs subvolume snapshot / /snap/$(date +%Y-%m-%d_user_gui)
|
btrfs subvolume snapshot / /snap/$(date +%Y-%m-%d_user_gui)
|
||||||
|
@ -139,3 +145,11 @@ function post_install_stage(){
|
||||||
umount -l $LINE;
|
umount -l $LINE;
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function update_sources(){
|
||||||
|
if [ ! grep -Fxq "contrib" /etc/apt/sources.list ]
|
||||||
|
then
|
||||||
|
sed -i 's/main/main contrib non-free/g' /etc/apt/sources.list
|
||||||
|
apt update
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue