This commit is contained in:
j3d1 2020-01-29 22:59:26 +01:00
parent 5282313b2e
commit 46015ce4af

View file

@ -42,10 +42,9 @@ function first_stage(){
echo w
) | fdisk ${DEVICE}
lsblk
echo mkfs.ext4 ${DEVICE}1
yes | mkfs.ext4 ${DEVICE}1
(
echo $luks_password
echo $luks_password
@ -53,19 +52,25 @@ function first_stage(){
echo $luks_password | cryptsetup luksOpen ${DEVICE}2 cryptlvm
pvcreate /dev/mapper/cryptlvm
vgcreate vg0 /dev/mapper/cryptlvm
echo lvcreate /dev/vg0 --name=root --size=100G
lvcreate /dev/vg0 --name=root --size=100G
yes | mkfs.btrfs /dev/vg0/root
echo lvcreate /dev/vg0 --name=swap --size=16G
lvcreate /dev/vg0 --name=swap --size=16G
echo lvcreate /dev/vg0 --name=swap --size=8G
lvcreate /dev/vg0 --name=swap --size=8G
mkswap /dev/vg0/swap
swapon /dev/vg0/swap
echo mount /dev/vg0/root $TARGET
mount /dev/vg0/root $TARGET
echo debootstrap sid $TARGET
debootstrap sid $TARGET
mount ${DEVICE}1 $TARGET/boot
echo mount ${DEVICE}1 $TARGET/boot
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