various fixes
[distro-setup] / distro-begin
index b03134890ea3e4e67de6ade28ac275bbbd2771a4..a53cbb4f23ffac9a2d0c583f81b0df620dfe22a7 100755 (executable)
@@ -542,12 +542,30 @@ s mkdir -p "${dirs[@]}"
 s chown ian:ian  "${dirs[@]}"
 
 if [[ $HOSTNAME == treetowl ]]; then
-    tu /etc/fstab <<'EOF'
-/dev/disk/by-id/ata-TOSHIBA_MD04ACA500_84REK6NTFS9A-part1 /i btrfs  noatime,subvol=i  0 0
+    # partitioned it with fai partitioner outside of fai,
+    # because it\'s worth it to have 1% space reserved for boot and
+    # swap partitions in case I ever want to boot off those drives.
+    # as root:
+    # . /a/bin/fai/fai-wrapper
+    # eval-fai-classfile /a/bin/fai/fai/config/class/51-multi-boot
+    # fai-setclass ROTATIONAL
+    # export LUKS_DIR=/q/root/luks/
+    # # because the partition nums existed already
+    # fai-setclass REPARTITION
+    # /a/bin/fai/fai/config/hooks/partition.DEFAULT
+
+    # just the first in the btrfs raid
+    dev=ata-TOSHIBA_MD04ACA500_84REK6NTFS9A-part1
+    tu /etc/fstab <<EOF
+/dev/mapper/crypt_dev_$dev /i btrfs  noatime,subvol=i  0 0
 EOF
 else
     tu /etc/fstab <<'EOF'
 /q/i  /i  none  bind  0 0
+EOF
+
+    tu /etc/crypttab <<EOF
+crypt_dev_$dev  /dev/disk/by-id/$dev  /q/root/luks/host-treetowl  discard,luks
 EOF
 fi
 
@@ -556,6 +574,8 @@ tu /etc/fstab <<'EOF'
 /i/k  /k  none  bind  0 0
 EOF
 
+
+
 if ! mountpoint /kr; then
     s mkdir -p /kr
     s chown ian:traci /kr