Skip to content
gohacks.dev
Tooling

fstab Entry Generator

Generate an /etc/fstab line for an ext4 or XFS disk, an NFS or SMB share, tmpfs, a swap file or a bind mount, with nofail and automount options explained.

Free · No sign-up · Your inputs stay in your browser

Input

Generate an /etc/fstab entry

Output

fstab line

85 characters

DeviceUUID=3f1c2b4e-9a7d-4c1e-8b2a-6d5e4f3a2b1c
Mount point/data
Typeext4
Optionsdefaults,noatime,nofail
Dump0 (dump(8) is obsolete)
Pass2

nofail lets the machine boot when the disk or share is missing instead of dropping to an emergency shell, which on a cloud server without a console means it never comes back. _netdev waits for the network, and x-systemd.automount mounts the share on first access. Test with sudo mount -a (and findmnt --verify) before rebooting.

Runs in this browser. Nothing you paste is sent to a server.

nofail saves cloud servers

If a disk listed in fstab is missing at boot, systemd drops into an emergency shell and waits. On a cloud server with no console, that looks like a server that never came back. nofail lets boot continue without the mount; for network shares, _netdev waits for the network and x-systemd.automount mounts on first access. See fstab(5) and systemd.mount(5).

Use UUIDs

Device names such as /dev/sdb1 depend on detection order and can swap between boots. blkid shows each filesystem's UUID, which does not change.

Share

Frequently asked questions

How do I test fstab without rebooting?
sudo mount -a mounts everything listed that is not mounted yet and reports errors. findmnt --verify checks the file for mistakes without mounting.
What do the last two numbers mean?
The fifth field is for the obsolete dump backup tool and is 0. The sixth sets fsck order: 1 for the root filesystem, 2 for other local disks, 0 to skip.
Is what I paste sent anywhere?
No. The tool runs entirely in your browser with JavaScript. Nothing you type or paste is sent to our server or stored.

Keep planning

Similar tools