aboutsummaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
Diffstat (limited to 'init')
-rwxr-xr-xinit13
1 files changed, 10 insertions, 3 deletions
diff --git a/init b/init
index 2910791..672c9f1 100755
--- a/init
+++ b/init
@@ -298,9 +298,6 @@ while read l || [ -n "$l" ]; do
info "mounting $d (buildos.state) on /state as $t"
- o="defaults,noatime,nodiratime"
- echo "$d /state $t $o 0 0" >>$fstab
-
# Check it.
#
if ! fsck -n -t "$t" "$d"; then
@@ -308,6 +305,9 @@ while read l || [ -n "$l" ]; do
error
fi
+ o="defaults,noatime,nodiratime"
+ echo "$d /state $t $o 0 0" >>$fstab
+
# Mount it now since we need it below.
#
mkdir -p "/state"
@@ -348,6 +348,13 @@ while read l || [ -n "$l" ]; do
info "mounting $d (buildos.$l) on $m"
+ # Check it.
+ #
+ if ! btrfs check -p "$d"; then
+ info "$d (buildos.$l) has errors; run btrfs check -p --repair $d"
+ error
+ fi
+
o="defaults,noatime,nodiratime,user_subvol_rm_allowed"
echo "$d $m btrfs $o 0 0" >>$fstab