Fstab Entry Generator

Write /etc/fstab entries for USB drives, SSDs and network shares without guessing at the six-field format or copying half-broken snippets from a forum post. Pick a starting preset (USB stick, external SSD, NAS NFS share or Windows backup folder), add one card per mount, and get a live fstab block you can append straight to your file. The generator pushes you toward the identifiers that survive a reboot — UUID= instead of /dev/sda1 — writes the options people forget (nofail on removable drives, _netdev on network shares, noatime on SSDs), and checks the mistakes that actually break boots: a device path that will point at a different stick next time you plug one in, a removable drive without nofail that hangs startup when it’s not connected, or a network mount that systemd tries to bring up before the network exists. Paste your blkid or lsblk -f output into the lookup panel and click a row to fill in the right UUID — everything happens in your browser.

🔒 100% private — nothing is uploaded or stored. The fstab entries are generated entirely in your browser. If you paste or upload blkid/lsblk output it is parsed locally and never sent to a server, so you can safely look up UUIDs for drives that hold private data.

1 · Starting point

Pick a preset to fill the form with a working baseline. Choosing a preset replaces the current entries — everything can be edited afterwards.

2 · Mounts (one card per fstab line)

Each card becomes one line in /etc/fstab. Click a card to make it the active entry — that’s where the UUID lookup below fills in. Swap and tmpfs lines work here too.

3 · UUID lookup (optional)

Run sudo blkid (or lsblk -f) on the machine and paste the output here — or upload the saved file. Click Use on a row to fill its UUID, filesystem type and label into the active entry. Pasted text is parsed in your browser and never uploaded.

4 · Your fstab entries

Ready

Validation

Install on your machine

Copy the entries above into /etc/fstab, then prove they work with mount -a before you reboot — a broken line for a missing device is the classic cause of a system that no longer boots.

# 1. Back up the current table first
sudo cp /etc/fstab /etc/fstab.bak

# 2. Add the generated lines (paste into your editor of choice)
sudo nano /etc/fstab

# 3. Verify everything mounts BEFORE rebooting
sudo mount -a
findmnt -R /mnt/data        # check the new mount shows up

# 4. If something is wrong, restore and try again
sudo cp /etc/fstab.bak /etc/fstab

How an fstab line works

Each line has six whitespace-separated fields. The first names the device, the second where it goes, and the last two are numeric checks that most modern systems ignore — but you still have to write them.

#FieldExampleMeaning
1DeviceUUID=a1b2…What to mount. UUID=, PARTLABEL= or a /dev/ path for local disks; server:/export for NFS; //server/share for CIFS; none for tmpfs and swap files.
2Mount point/mnt/dataThe directory the filesystem appears under. It must exist — systemd creates it for you at boot on most distros, but sudo mkdir -p /mnt/data first is safer.
3Filesystemext4ext4, xfs, btrfs, vfat, ntfs3, exfat, nfs, cifs, swap, tmpfs…
4Optionsdefaults,noatime,nofailComma-separated mount options — see the table below.
5dump0Legacy dump(8) backup flag. Write 0 unless you actually use dump.
6pass0fsck order at boot: 1 for root, 2 for other local filesystems, 0 for everything else (USB sticks, network, swap, tmpfs).

The options that matter

Most fstab pain comes from getting these wrong. The generator offers them as checkboxes with the reasoning built in — this table is the short version.

OptionWhat it doesUse it for
defaultsrw,suid,dev,exec,auto,nouser,async — the sane baseline.Everything; start here and override.
noatimeDon’t record file access times — fewer writes.SSDs and SD cards (wear), any read-heavy drive.
nofailIf the device is missing at boot, log a warning and continue instead of dropping to emergency mode.Every removable drive. Without it, a missing USB stick can stop the system from starting.
noautoDon’t mount at boot — only when you run mount /mnt/usb.USB sticks and SD cards you plug in occasionally.
_netdevTells systemd this mount needs the network first.Every NFS and CIFS entry. Without it the mount is attempted before your IP exists and fails (or, worse on older setups, blocks boot).
nodev / nosuid / noexecIgnore device files / setuid bits / executables on the mount.Data drives and anything you don’t run code from — cheap hardening.
uid=1000,gid=1000Force ownership to your user (FAT/exfat/NTFS have no real ownership).USB sticks and SD cards you want to write to as a normal user.
x-systemd.device-timeout=10sHow long systemd waits for a slow device before giving up.USB hubs and enclosures that take a moment to spin up.
credentials=/pathRead CIFS username/password from a file instead of the fstab line.Every CIFS mount — fstab is world-readable, passwords in it are not secret.
x-systemd.automountMount on first access instead of at boot.Slow or flaky network shares you don’t need immediately.

Do it without breaking your boot

  1. Back up first: sudo cp /etc/fstab /etc/fstab.bak. One line is all it takes to make a machine unbootable.
  2. Use UUIDs, not device paths. /dev/sda1 is whatever the kernel happened to name the first disk — plug in another stick and your data drive becomes sdb1. Run sudo blkid and copy the UUID= value; it follows the filesystem, not the port.
  3. Create the mount point: sudo mkdir -p /mnt/data && sudo chown $USER /mnt/data.
  4. Add the line and test: sudo mount -a mounts everything in fstab that isn’t mounted yet. If it returns silently, check with findmnt -R /mnt/data.
  5. Reboot once to be sure. Boot-time mounting is the only thing mount -a can’t fully prove — especially for network shares and x-systemd.device-timeout behaviour.
  6. Unplugged-drive rule: anything removable gets nofail (and usually noauto). That combination means: mount it when it’s there, shrug when it isn’t.

Luke Keam
Spot a bug or want a custom utility built? I'd love to hear from you. Get in touch
Luke Keam | techgeek.biz