0% found this document useful (0 votes)
30 views4 pages

How To Auto Mount Partitions On Boot in Linux Easily

This document explains how to automatically mount partitions on boot in Linux by editing the fstab file. It details finding the UUID of partitions, adding entries to fstab with the UUID, filesystem type and mount point, and mounting partitions on reboot.

Uploaded by

scony
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views4 pages

How To Auto Mount Partitions On Boot in Linux Easily

This document explains how to automatically mount partitions on boot in Linux by editing the fstab file. It details finding the UUID of partitions, adding entries to fstab with the UUID, filesystem type and mount point, and mounting partitions on reboot.

Uploaded by

scony
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

How to Auto Mount Partitions On Boot in Linux Easily https://fossbytes.com/how-to-auto-mount-partition...

How to Auto Mount Partitions On


Boot in Linux Easily
By Rahul Raturi - May 21, 2015

Unlike Windows, Linux does not mounts �le systems automatically on


computer startup. You have to mount each partition manually after boot. This
can be annoying if some applications have to access contents from some
unmounted partitions on startup, like a media player. If your music library
resides on any unmounted partition, each time you open up your media
player, the contents won’t appear unless you mount that partition. In that
case, you might want to auto mount that partition.

n order to mount a particular partition automatically


I
on boot up, you just have to add its entry into the
fstab �le. You can do this by directly writing to the �le, or
graphically using some tool like Gnome Disks.

Here, I am going to discuss about editing the fstab �le


directly. You won’t need a “how to” on doing it graphically.

1 of 4 5/9/20, 7:56 PM
How to Auto Mount Partitions On Boot in Linux Easily https://fossbytes.com/how-to-auto-mount-partition...

Let’s get started

First, create a backup of your original fstab �le. It can be


removed later if �le systems mount properly. The fstab �le is
present in /etc/ directory. To do this, open a terminal window
and type:

sudo cp /etc/fstab /etc/fstab.original

The fstab �le stores entries in the following format:

<UUID or Label>  <Mount point>  <File system type>  <Mount


options>  <fs_freq>  <fs_passno>

The �fth and sixth �eld are used by dump and fsck utility
respectively. These determine which �le system needs to be
dumped, and the order of mounting of �le systems. These are
given a 0 value generally.

It is also recommended that you should use UUID to identify


partition rather than label, as labels can mismatch.

Finding UUID of partition:

To get the UUID of desired partition, type:

sudo blkid

This would show a list of partitions with their labels and


UUID. You can identify a partition by its Label. Or use lsblk to
identify the partition by its size. Copy the UUID of desired
partition.

Creating an entry in fstab:

Open the �le /etc/fstab in a text editor with root privileges. At

2 of 4 5/9/20, 7:56 PM
How to Auto Mount Partitions On Boot in Linux Easily https://fossbytes.com/how-to-auto-mount-partition...

the end of �le, append a line representing the partition’s


details.

The mount point is generally a folder in /mnt/ directory, like


/mnt/windows. You need to create a folder there prior to
mounting. The type of partition can be determined from the
blkid command given above. A default should suf�ce in the
mount option �eld. You can provide other mount options like
uid, gid, umask etc in a comma separated list after default.
After that, specify the <fs_freq> and <fs_passno> as 0 (or 1,2..,
if you are sure to change dump or mount order options). You
can use previous entries in the fstab �le as a referance, or the
image below.

Note: After updating the fstab �le, unmount manually


mounted partitions and type sudo mount -a in the
terminal. If you get unwanted results, like wrong permissions,
you can update the �le accordingly. So next time you boot up
the system you’ll get the desired results.

DO NOT MODIFY PREVIOUS ENTRIES IN THE FSTAB FILE. It


may lead to an unbootable system. Then you’ll have to
replace the updated �le with the fstab.original �le created in
�rst step.

A note for windows users

If you’re dual booting with Microsoft Windows 8 (or above),


you will have to disable fast startup �rst, otherwise your
Linux might display an error on startup. There is an option in
the control panel > power options, to disable fast startup.

3 of 4 5/9/20, 7:56 PM
How to Auto Mount Partitions On Boot in Linux Easily https://fossbytes.com/how-to-auto-mount-partition...

Try this out and if you �nd some dif�culty, comment down
your queries.

Recommended for you: Linux Windows Dual Boot and More:


Multi-booting Up to Five OS

4 of 4 5/9/20, 7:56 PM

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy