add missing /nocow
authorIan Kelling <iank@fsf.org>
Tue, 24 Feb 2026 11:51:24 +0000 (06:51 -0500)
committerIan Kelling <iank@fsf.org>
Tue, 24 Feb 2026 11:51:24 +0000 (06:51 -0500)
fai/config/hooks/partition.DEFAULT

index aee20c873f109ab31b769a3f536d9de47f43731c..6af8d386457f4f58bfefe566cf963fa60cb986e4 100755 (executable)
@@ -403,6 +403,9 @@ EOF
 crypt-$vg-o    /dev/$vg/o     none  nofail,keyscript=/root/keyscript,discard,luks,initramfs
 EOF
       fi
+      cat > /tmp/fai/fstab <<EOF
+/mnt/root/nocow /nocow  btrfs  nofail,x-systemd.device-timeout=300s,x-systemd.mount-timeout=300s,noatime,subvol=nocow,$mopts
+EOF
     fi
     if fsf; then
       cat >> /tmp/fai/fstab <<EOF
@@ -1240,8 +1243,15 @@ if $partition; then
   sleep 1
 
   bpart ${root_devs[@]}
-  if ! fsf && ! $skip_o; then
+  if ! fsf; then
+    btrfs subvol create /mnt/nocow
+    chattr +C /mnt/nocow
+    chown root:1000 /mnt/nocow
+    mkdir /mnt/nocow/{t,user}
+
+    if ! $skip_o; then
     bpart ${o_devs[@]}
+    fi
   fi
   bpart ${boot_devs[@]}
 
@@ -1312,15 +1322,6 @@ btrfs subvolume set-default 0 /mnt # already default, just ensuring it.
 # for libreboot systems. grub2 only reads from subvolid=0
 mkdir -p /mnt/grub2
 
-# initial setup of extra data fs.
-btrfs subvol create /mnt/nocow
-chattr +C /mnt/nocow
-mkdir /mnt/nocow/{t,user}
-cat > /tmp/fai/fstab <<EOF
-/mnt/root/nocow /nocow  none  nofail,x-systemd.device-timeout=300s,x-systemd.mount-timeout=300s,noatime,subvol=nocow,$mopts
-EOF
-
-
 cp $FAI/distro-install-common/libreboot_grub.cfg /mnt/grub2
 
 if $wipe && [[ -e /mnt/$boot_vol ]]; then