wip
This commit is contained in:
parent
a8e97e5c91
commit
eec23e7b88
1 changed files with 7 additions and 5 deletions
12
entry.sh
12
entry.sh
|
@ -4,20 +4,18 @@
|
||||||
function first_stage(){
|
function first_stage(){
|
||||||
set -e
|
set -e
|
||||||
echo foo first_stage
|
echo foo first_stage
|
||||||
|
|
||||||
apt install -y debootstrap cryptsetup btrfs-progs lvm2
|
|
||||||
|
|
||||||
|
|
||||||
echo -n luks_password:
|
echo -n luks_password:
|
||||||
read -s luks_password
|
read -s luks_password
|
||||||
|
|
||||||
|
|
||||||
lsblk -ftpo NAME,FSTYPE,LABEL,UUID,FSAVAIL,MOUNTPOINT
|
lsblk -ftpo NAME,FSTYPE,LABEL,UUID,FSAVAIL,MOUNTPOINT
|
||||||
select DEVICE in $(lsblk -frpno NAME); do
|
select DEVICE in $(lsblk -frpno NAME); do
|
||||||
echo using $DEVICE
|
echo using $DEVICE
|
||||||
break
|
break
|
||||||
done
|
done
|
||||||
|
|
||||||
|
apt install -y debootstrap cryptsetup btrfs-progs lvm2
|
||||||
|
|
||||||
if [ -b /dev/mapper/cryptlvm ]; then
|
if [ -b /dev/mapper/cryptlvm ]; then
|
||||||
cryptsetup luksClose cryptlvm
|
cryptsetup luksClose cryptlvm
|
||||||
fi
|
fi
|
||||||
|
@ -53,6 +51,10 @@ function first_stage(){
|
||||||
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.ext4 /dev/vg0/root
|
||||||
|
echo lvcreate /dev/vg0 --name=swap --size=16G
|
||||||
|
lvcreate /dev/vg0 --name=swap --size=16G
|
||||||
|
mkswap /dev/vg0/root
|
||||||
|
swapon /dev/vg0/root
|
||||||
echo mount /dev/vg0/root $TARGET
|
echo mount /dev/vg0/root $TARGET
|
||||||
mount /dev/vg0/root $TARGET
|
mount /dev/vg0/root $TARGET
|
||||||
echo debootstrap sid $TARGET
|
echo debootstrap sid $TARGET
|
||||||
|
|
Loading…
Reference in a new issue