This commit is contained in:
j3d1 2020-01-29 22:22:36 +01:00
parent 2291f99071
commit 19fc3d8ffa

View file

@ -55,7 +55,7 @@ function first_stage(){
vgcreate vg0 /dev/mapper/cryptlvm vgcreate vg0 /dev/mapper/cryptlvm
echo lvcreate /dev/vg0 --name=root --size=100G echo lvcreate /dev/vg0 --name=root --size=100G
lvcreate /dev/vg0 --name=root --size=100G lvcreate /dev/vg0 --name=root --size=100G
yes | mkfs.ext4 /dev/vg0/root yes | mkfs.btrfs /dev/vg0/root
echo lvcreate /dev/vg0 --name=swap --size=16G echo lvcreate /dev/vg0 --name=swap --size=16G
lvcreate /dev/vg0 --name=swap --size=16G lvcreate /dev/vg0 --name=swap --size=16G
mkswap /dev/vg0/swap mkswap /dev/vg0/swap
@ -66,6 +66,9 @@ function first_stage(){
debootstrap sid $TARGET debootstrap sid $TARGET
mount ${DEVICE}1 $TARGET/boot mount ${DEVICE}1 $TARGET/boot
echo mount ${DEVICE}1 $TARGET/boot echo mount ${DEVICE}1 $TARGET/boot
genfstab -U $TARGET | tee $TARGET/etc/fstab
lsblk -lpo NAME,UUID | grep $DEVICE | awk '{print $1}'
echo cryptlvm UID none luks > $TARGET/etc/crypttab
} }
function second_stage(){ function second_stage(){
@ -75,3 +78,5 @@ function second_stage(){
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 apt install -y linux-image-amd64 grub2 cryptsetup btrfs-progs lvm2 locales tzdata keyboard-configuration console-common
} }
//TODO crypttab