# for libreboot systems. grub2 only reads from subvolid=0
mkdir -p /mnt/grub2
-# todo: this would need some rework if we moved boot into
-# lvm.
+
+# 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
umount /mnt
-# initial setup of extra data fs, mounted,
-# btrfs subvol create nocow
-# chattr +C nocow
-# mkdir nocow/{t,user}
-# chown iank.iank nocow/{t,user}