Skip to content

Instantly share code, notes, and snippets.

@Brainiarc7
Last active March 24, 2026 03:14
Show Gist options
  • Select an option

  • Save Brainiarc7/c2dfc75ce931491fe510 to your computer and use it in GitHub Desktop.

Select an option

Save Brainiarc7/c2dfc75ce931491fe510 to your computer and use it in GitHub Desktop.
Generate fstab in Arch Linux

First, install arch-install-scripts:

sudo pacman -S --needed arch-install-scripts

Secondly, mount your partitions in all the internal hard drives.

Thirdly, generate and validate your config by piping it out to stdout:

genfstab -U -p / | less

If all looks green, proceed to overwrite your current fstab with the new entries:

genfstab -U -p / >> /etc/fstab

Run that command as ROOT.

Tip: It may be wise to add the nofail option for some partitions, namely NFS and the likes, so your system can boot even if shit hits the fan.

@Drewlius
Copy link
Copy Markdown

appreciate the commands bro. Idk why but I have been having the most trouble in my life with Arch and Fstab somehow my devices were being mapped by their /dev path and my root file system was getting all messed up. I knew something weird was going on and finally pinpointed it when I got stuck in a maintence mode loop. That took so long to figure out how to get out of. You posting this helped me get everything squared away again without having to worry about getting myself all messed up trying to manually copy the UUID from the blkid command. Appreciate it brother.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment