fix pxe server
[automated-distro-installer] / fai / config / hooks / partition.DEFAULT
index aa7440968b8eaca3cde4c43672a69ad5825441c0..8c3140b5fd3c711aadb11914591c74b650af0e1e 100755 (executable)
@@ -1,4 +1,19 @@
 #!/bin/bash -x
+# Copyright (C) 2016 Ian Kelling
+
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
 set -eE -o pipefail
 trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR
@@ -324,15 +339,16 @@ $first_boot_dev  /boot  btrfs  noatime,subvol=boot_$DISTRO  0 0
 EOF
 
 
+# these 2 are alternative ways to identify a subvol, i think i prefer the 2nd.
 if ifclass treetowl; then
     cat >> /tmp/fai/fstab <<'EOF'
+$first_root_crypt  /i  btrfs  noatime,subvol=i  0 0
 UUID=3f7b31cd-f299-40b4-a86b-7604282e2715 /i btrfs  noatime  0 2
 EOF
 fi
-
 if ifclass frodo; then
     cat >> /tmp/fai/fstab <<'EOF'
-/q/i  /i  none  bind  0 0
+$first_root_crypt  /i  btrfs  noatime,subvol=i  0 0
 EOF
 fi