The Auto-mount Tutorial

The Auto-mount tutorial


Hey Linuxers!

Tired of mounting partitions every time you log in? Here's an article which solves your problem. Yes, we're gonna automatically mount the partitions at startup.

What does auto-mount really do?

The file at /etc/fstab contains your partitions which should be automatically mounted at startup, like the /(root) partition, /boot partition, and the swap partition.

So, what we're gonna do is, add the particular partition's info to the /etc/fstab file, so that it mounts the partition automatically.


The GUI method

This is the easiest method so far. Here, I'll be using KDE Partition Manager and Gnome-Disks to do this process.

Using KDE Partition Manager

This is the default partition manager shipped with KDE plasma. Follow the below steps to auto-mount a partition.



  1. Open KDE Partition Manager, select the partition, right click to edit mount options. 


  2. Select the Label and enter the mount point in the text box as /mnt/Partition_name. In my case, it's /mnt/Sample.

    Note: You can mount the partition at any folder, even as a folder at Desktop. But, the common method is this one.

  3. Now, click OK and save the configuration. As you may see here, that it's asking us for a confirmation to write the partition's info to /etc/fstab. Just authorize the operation, enter the administrator password if asked. 


  4. Viola! You've done setting it up! Your partition will automatically mount when the system starts.

Using GNOME Disks

This is the most common partitioning tool used. Let's move through the steps:

  1. Open GNOME Disks. You'll get an interface like this: 


  2. Select your disk, then your corresponding partition, and Edit mount options like this: 


  3. Then, right click and edit the mount point. Turn off the toggle named as Disable session defaults. And then, you're ready to go. 


  4. Make sure that Mount at Startup is checked. 


  5. After checking it, navigate to the drop-down with the title Identify As:, and select Label to mount the partition at /mnt/Sample (optional one). 


  6. Select OK, authorize the action with your admin password, and you're good to go.


Wrapping up

I hope you will find this tutorial helpful. If you need the command line method too, then don't forget to mention it in the comments section.

Questions and doubts are appreciated. The comment section is created for that purpose... LOL

Happy Linuxing :)

Comments

Popular Posts