if [[ $DISTRO == debianbuster_bootstrap ]]; then
cat > /tmp/fai/fstab <<EOF
$first_boot_dev / btrfs noatime,subvol=$boot_vol 0 0
-$first_efi /boot/efi vfat nofail 0 0
+$first_efi /boot/efi vfat nofail,x-systemd.device-timeout=30s,x-systemd.mount-timeout=30s 0 0
EOF
cat >/tmp/fai/disk_var.sh <<EOF
BOOT_DEVICE="${short_devs[@]}"
else
# note, fai creates the mountpoints listed here
cat > /tmp/fai/fstab <<EOF
-$first_root_crypt / btrfs noatime,subvol=root_$DISTRO$mopts 0 0
-$first_root_crypt /mnt/root btrfs nofail,noatime,subvolid=0$mopts 0 0
-$first_boot_dev /boot btrfs nofail,noatime,subvol=$boot_vol 0 0
-$first_efi /boot/efi vfat nofail 0 0
-$first_boot_dev /mnt/boot btrfs nofail,noatime,subvolid=0 0 0
+$first_root_crypt / btrfs x-systemd.device-timeout=90s,x-systemd.mount-timeout=90s,noatime,subvol=root_$DISTRO$mopts 0 0
+$first_root_crypt /mnt/root btrfs nofail,x-systemd.device-timeout=30s,x-systemd.mount-timeout=30s,noatime,subvolid=0$mopts 0 0
+$first_boot_dev /boot btrfs nofail,x-systemd.device-timeout=30s,x-systemd.mount-timeout=30s,noatime,subvol=$boot_vol 0 0
+$first_efi /boot/efi vfat nofail,x-systemd.device-timeout=30s,x-systemd.mount-timeout=30s 0 0
+$first_boot_dev /mnt/boot btrfs nofail,x-systemd.device-timeout=30s,x-systemd.mount-timeout=30s,noatime,subvolid=0 0 0
EOF
swaps=()
rm -f /tmp/fai/crypttab
$(swap-cryptname) $(swapdev) /dev/urandom swap,cipher=aes-xts-plain64,size=256,hash=ripemd160
EOF
cat >> /tmp/fai/fstab <<EOF
-$(swap-cryptdev) none swap nofail,sw 0 0
+$(swap-cryptdev) none swap nofail,x-systemd.device-timeout=30s,x-systemd.mount-timeout=30s,sw 0 0
EOF
done