wip
This commit is contained in:
parent
d4232602f3
commit
547b8aba1a
1 changed files with 9 additions and 5 deletions
14
entry.sh
14
entry.sh
|
@ -5,7 +5,7 @@ function first_stage(){
|
|||
set -e
|
||||
echo foo first_stage
|
||||
|
||||
apt install -y debootstrap cryptsetup btrfs-progs
|
||||
apt install -y debootstrap cryptsetup btrfs-progs lvm2
|
||||
|
||||
|
||||
echo -n luks_password:
|
||||
|
@ -43,9 +43,13 @@ function first_stage(){
|
|||
echo $luks_password
|
||||
)| cryptsetup luksFormat ${DEVICE}2
|
||||
echo $luks_password | cryptsetup luksOpen ${DEVICE}2 cryptlvm
|
||||
yes | mkfs.ext4 ${DEVICE}2
|
||||
mount ${DEVICE}2 $TARGET
|
||||
echo mount ${DEVICE}2 $TARGET
|
||||
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.ext4 /dev/vg0/root
|
||||
echo mount /dev/vg0/root $TARGET
|
||||
mount /dev/vg0/root $TARGET
|
||||
echo debootstrap sid $TARGET
|
||||
debootstrap sid $TARGET
|
||||
mount ${DEVICE}1 $TARGET/boot
|
||||
|
@ -57,5 +61,5 @@ function second_stage(){
|
|||
echo bar second_stage
|
||||
passwd
|
||||
echo -n > /etc/motd
|
||||
apt install -y linux-image-amd64 grub2 cryptsetup btrfs-progs locales tzdata keyboard-configuration console-common
|
||||
apt install -y linux-image-amd64 grub2 cryptsetup btrfs-progs lvm2 locales tzdata keyboard-configuration console-common
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue