create btrfs subvolumes

This commit is contained in:
j3d1 2022-02-18 23:02:22 +01:00
parent 9c651bc647
commit 2998969bb4

View file

@ -116,8 +116,14 @@ function first_stage(){
mkswap /dev/vg0/swap mkswap /dev/vg0/swap
swapon /dev/vg0/swap swapon /dev/vg0/swap
echo mount /dev/vg0/root $TARGET mkdir -p /tmp/mnt
mount /dev/vg0/root $TARGET mount /dev/vg0/root /tmp/mnt
btrfs subvolume create /tmp/mnt/@
btrfs subvolume create /tmp/mnt/@home
umount /tmp/mnt
echo mount -osubvol=@ /dev/vg0/root $TARGET
mount -osubvol=@ /dev/vg0/root $TARGET
echo debootstrap sid $TARGET echo debootstrap sid $TARGET
debootstrap sid $TARGET debootstrap sid $TARGET
@ -125,6 +131,9 @@ function first_stage(){
mount ${DEVICE}1 $TARGET/boot mount ${DEVICE}1 $TARGET/boot
echo mount ${DEVICE}1 $TARGET/boot echo mount ${DEVICE}1 $TARGET/boot
echo mount -osubvol=@home /dev/vg0/root $TARGET/home
mount -osubvol=@home /dev/vg0/root $TARGET/home
genfstab -U $TARGET | tee $TARGET/etc/fstab genfstab -U $TARGET | tee $TARGET/etc/fstab
UUID=$(lsblk -lpo NAME,UUID | grep ${DEVICE}2 | awk '{print $2}') UUID=$(lsblk -lpo NAME,UUID | grep ${DEVICE}2 | awk '{print $2}')
echo cryptlvm UUID=${UUID} none luks > $TARGET/etc/crypttab echo cryptlvm UUID=${UUID} none luks > $TARGET/etc/crypttab