From 2998969bb4a426b1829a5df9bb724e291a55f300 Mon Sep 17 00:00:00 2001 From: jedi Date: Fri, 18 Feb 2022 23:02:22 +0100 Subject: [PATCH] create btrfs subvolumes --- entry.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/entry.sh b/entry.sh index d100ffe..7e4d966 100755 --- a/entry.sh +++ b/entry.sh @@ -116,8 +116,14 @@ function first_stage(){ mkswap /dev/vg0/swap swapon /dev/vg0/swap - echo mount /dev/vg0/root $TARGET - mount /dev/vg0/root $TARGET + mkdir -p /tmp/mnt + 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 debootstrap sid $TARGET @@ -125,6 +131,9 @@ function first_stage(){ 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 UUID=$(lsblk -lpo NAME,UUID | grep ${DEVICE}2 | awk '{print $2}') echo cryptlvm UUID=${UUID} none luks > $TARGET/etc/crypttab