fstab Entry Builder

Build entries for /etc/fstab — the file Linux reads at boot to mount filesystems. Pick a preset to seed an entry, fill in the device, and copy the table at the bottom into your fstab.

Why nofail matters: a failing fstab entry will halt boot at emergency.target if you only have local console — and on a headless Pi you'll think it's bricked. Always include nofail on USB drives and network shares unless they're truly required at boot.

fstab entries

/etc/fstab

Test before reboot: after editing fstab, run sudo mount -a — it tries every entry and reports failures without rebooting. Only reboot once mount -a is clean.

Find your UUID / PARTUUID: sudo blkid lists them for every block device. Prefer UUID over /dev/sda1 — the latter changes when you plug in a second drive.

NFS dependency: network mounts need _netdev in options so systemd waits for the network. NFS also benefits from x-systemd.automount — the mount is deferred until first access, so a slow NAS doesn't slow boot.

Credentials for CIFS/SMB: never put a password directly in fstab. Use credentials=/etc/cifs-creds with a root-only file containing username=... and password=....

NTFS on Bookworm: the in-kernel ntfs3 driver (Linux 5.15+) is available as a module on Raspberry Pi OS Bookworm and is faster than the FUSE ntfs-3g. Use type=ntfs3 for new entries; the ntfs-3g preset is kept for legacy compatibility.