|
|
@ -7,6 +7,9 @@ set -e
|
|
|
|
# free 7GB
|
|
|
|
# free 7GB
|
|
|
|
|
|
|
|
|
|
|
|
chroot="$1"
|
|
|
|
chroot="$1"
|
|
|
|
|
|
|
|
boot="./boot"
|
|
|
|
|
|
|
|
esp="./esp"
|
|
|
|
|
|
|
|
root="./root"
|
|
|
|
|
|
|
|
|
|
|
|
# encrypt and unlock the root partitions
|
|
|
|
# encrypt and unlock the root partitions
|
|
|
|
echo -n 'Enter LUKS password: '
|
|
|
|
echo -n 'Enter LUKS password: '
|
|
|
@ -20,9 +23,9 @@ unset root_pwd
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# root device btrfs raid1
|
|
|
|
# root device btrfs raid1
|
|
|
|
mkfs.btrfs /dev/sda1
|
|
|
|
mkfs.btrfs /dev/mapper/root-unlocked-sda1
|
|
|
|
mount /dev/sda1 "$chroot"
|
|
|
|
mount /dev/mapper/root-unlocked-sda1 "$chroot"
|
|
|
|
btrfs device add /dev/sdb1 "$chroot" -f
|
|
|
|
btrfs device add /dev/mapper/root-unlocked-sdb1 "$chroot" -f
|
|
|
|
btrfs balance start -dconvert=raid1 -mconvert=raid1 "$chroot"
|
|
|
|
btrfs balance start -dconvert=raid1 -mconvert=raid1 "$chroot"
|
|
|
|
|
|
|
|
|
|
|
|
# boot device ext4
|
|
|
|
# boot device ext4
|
|
|
|