btrfs subvolume set-default 0 /mnt
[[ ! -e /mnt/root_$DISTRO ]] || btrfs subvolume delete /mnt/root_$DISTRO
-
## create subvols ##
cd /mnt
-for x in q home_$DISTRO root_$DISTRO; do
- btrfs subvolume list . | grep "$x$" >/dev/null || btrfs subvolume create $x
-done
+btrfs subvolume create root_$DISTRO
+[[ -e q ]] || btrfs subvolume create q
chown root:1000 q
-
mkdir -p /mnt/root_$DISTRO/boot
for x in root/a q/a; do
mkdir -p $x
$first_root_crypt / btrfs noatime,subvol=root_$DISTRO 0 0
$first_root_crypt /q btrfs noatime,subvol=q 0 0
/q/a /a none bind 0 0
-$first_root_crypt /home btrfs noatime,subvol=home_$DISTRO 0 0
$first_boot_dev /boot btrfs noatime,subvol=boot_$DISTRO 0 0
EOF