Ask Your Question
1

How to automatically mount a partition on startup?

asked 2017-08-17 03:50:55 -0600

wolfv gravatar image

I want a partition named data_backup to automatically mount on startup. It will be the destination for "Back In Time", similar to "Time Machine".

Screenshot is from: Show Applications > Disks > select data_backup partition > Additional Partition options (gear icon) > edit mount options

image description

Verify that mount options "Mount Point" and "Identify As" from screenshot are listed in directories:

$ ls /mnt
(empty)
$ ls /dev/disk/by-uuid/
dee31539-0623-4767-8961-332095132426
(and nine others)

I was expecting the data_backup partition to be mounted as described in the screenshot. Why is /mnt/dee31539-0623-4767-8961-332095132426 not mounted? Looking for clues:

$ mount -l -t ext4
/dev/mapper/fedora00-root on / type ext4 (rw,relatime,seclabel,data=ordered)
/dev/sda4 on /boot type ext4 (rw,relatime,seclabel,data=ordered)
/dev/mapper/fedora00-home on /home type ext4 (rw,relatime,seclabel,data=ordered)
$ gio mount -l
Drive(0): Samsung SSD 840 EVO 250GB mSATA
  Type: GProxyDrive (GProxyVolumeMonitorUDisks2)
  Volume(0): data_backup
    Type: GProxyVolume (GProxyVolumeMonitorUDisks2)
  Volume(1): 1.1 GB Volume
    Type: GProxyVolume (GProxyVolumeMonitorUDisks2)
Volume(2): 21 GB Volume
  Type: GProxyVolume (GProxyVolumeMonitorUDisks2)
Volume(3): 21 GB Volume
  Type: GProxyVolume (GProxyVolumeMonitorUDisks2)

Looking at fstab:

$ cat /etc/fstab
#
# /etc/fstab
# Created by anaconda on Mon Jul 17 14:17:34 2017
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
# Universally Unique Identifier (uuid)  mount point  fs type  options                 dump  fsck
/dev/mapper/fedora00-root                 /           ext4    defaults                   1  1
UUID=b4d97178-7afc-4df9-b8a0-6fd5d965542c /boot       ext4    defaults                   1  2
UUID=1900-4101                            /boot/efi   vfat    umask=0077,shortname=winnt 0  2
/dev/mapper/fedora00-home                 /home       ext4    defaults                   1  2
/dev/mapper/fedora00-swap                 swap        swap    defaults                   0  0

Maybe I need to add data_backup partition to fstab? (similar to line for home partition):

dee31539-0623-4767-8961-332095132426      /mnt        ext4    defaults                   1  2

How to automatically mount a partition on startup?

Normally I would just try adding the line to fstab, but I am new to partitioning and a bit paranoid about messing up the install (I will backup data before changing fstab).

edit retag flag offensive close merge delete

Comments

you put it in fstab. (don't mount it to /mnt, choose something more unique, like /mnt/backup - you need to create that directory first (mkdir -p /mnt/backup).

BTW, your question has already been asked an answered a few times on this platform: link1, link2, link3

florian gravatar imageflorian ( 2017-08-17 05:12:06 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2017-08-17 05:13:43 -0600

ozeszty gravatar image

In the window on your screenshoot you have to disable Automatic Mount Options (currently it's ON for that partition - and doesn't mount it, since it's not required by system), and only then you'll be able to change greyed out settings and actually save them. This will create proper entry in /etc/fstab that will work from the next startup.

You can customize mounting options, e.g. change mount point to something more user friendly.

edit flag offensive delete link more

Comments

That slider switch is confusing. The slider switch is ON when "OFF" is exposed! gnome-disks inserted a proper line in /etc/fstab just like you said. Thanks for your help ozeszly.

wolfv gravatar imagewolfv ( 2017-08-17 08:03:06 -0600 )edit

You're welcome.

It's 'Automatic Mount Options', not 'Automatic Mounting'. By default only system's configured mount points (/, /home or /boot etc.) are automatically mounted on startup, the rest requires user interaction or fstab entry.

ozeszty gravatar imageozeszty ( 2017-08-17 11:00:32 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2017-08-17 03:50:55 -0600

Seen: 2,245 times

Last updated: Aug 17 '17