Auto-mounting partitions and Fstab

Manu Järvinen
Jan 16, 2017 · 3 min read

Here I mentioned about the Work and Storage partitions I use. And in here I went through how to set them up during the installation of a distro.

In this article I tell how these mount-points can be made and auto-mounted if the distro is already installed and also a little bit about the File Systems Table or Fstab.

Image for post
Image for post
In this article I go through how to make the /work and /storage partitions if the distro is already installed

Auto-mounting partitions

So far in my experience the best application for auto-mounting partitions has been gnome-disk-utility (called Disks or gnome-disks in some systems). With this it’s easy to:

  • Add mount-points for partitions (like /work)
  • Make partitions to auto-mount on startup
  • Make some of the partitions invisible in the user interface, which clears up the clutter nicely in file managers, for example

Another, less popular graphical disk mount-point manager is pysdm.

Image for post
Image for post
gnome-disk-utility or gnome-disks

If you add mount-points for partitions (like /work), you may need to first create that folder (can’t remember if I did it or not). Do it by so in Terminal:

# Creating a folder for the /work mount-point:sudo mkdir /work

If you can’t create files or folders to the root of /work, you need to give your user some rights to do that:

# Adding user rights for user mj for the /work mount-point:sudo chown mj /work

File Systems Table or Fstab

# Open fstab file in the Nano text editor with root privileges:sudo nano /etc/fstab

Delete the last lines that seem right, close and save (ctrl+X, Y, enter) the file, restart the computer and start over.

Once my fstab was a bit messed up (I wonder why… :P), that really made the GUI programs like gnome-disk-utility to not work well. It was easily fixed by removing some of those extra lines.

Here is an image of my fstab file:

Image for post
Image for post

Here it is again with some comments:

Image for post
Image for post

Auto-mounting network locations

Cheers!



Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store