You are not logged in.

#1 2014-12-14 12:37:58

ttmdear
Member
Registered: 2014-08-26
Posts: 9

Automount with fstab

HI

I've got a problem , i ' d like to automount usd memory or harddrive ( by usb) when the divice is plugin.

# /etc/fstab: static file system information
#
# <file system>    <dir>    <type>    <options>    <dump>    <pass>
# /dev/sda2 LABEL=system
UUID=ca604eaa-534c-446a-b4bc-41135099830d    /             ext4          rw,relatime,data=ordered    0 1

# /dev/sda3 LABEL=home
UUID=0990abb1-d92a-4f5c-8994-0957c99c9167    /home         ext4          rw,relatime,data=ordered    0 2


# /dev/sda1
UUID=184a6781-5498-4b2b-a023-70f1c1d2929c    none          swap          defaults              0 0

# kingson
UUID=6D3F-D313                    /mnt/kingston8gb    vfat    rw,noauto,uid=1000,gid=100    0 0

# /dev/sda1
UUID=8fd2b76e-f363-4c71-8bd4-3ab539d2c11c    /mnt/shiru      ext4        rw,noauto,data=ordered        0 0

When i set auto for kingson and shiru the result is  , when the system is booting i've got message "A job i running " and i must
waint 1 minutes and than i have to login as root because the usb is not connected .

I have tired in many ways , but i can't the proper result .


Generalny i want to automount then i plugin the divice.

Offline

#2 2014-12-14 13:10:32

rebootl
Member
Registered: 2012-01-10
Posts: 431
Website

Re: Automount with fstab

This is not possible by editing the fstab.

See: https://wiki.archlinux.org/index.php/US … ge_devices


Personal website: reboot.li
GitHub: github.com/rebootl

Offline

#3 2014-12-14 13:11:45

the_shiver
Member
Registered: 2013-03-27
Posts: 130

Re: Automount with fstab

have you tried the nofail option?

Offline

#4 2014-12-14 13:54:39

Rob_H
Member
Registered: 2012-06-19
Posts: 72

Re: Automount with fstab

KDE supports automounting specific devices when they are plugged in, so that's one option if you use KDE. I would not be surprised if systemd supports this, too, but I have not tried.

Offline

#5 2014-12-15 01:29:27

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Automount with fstab

This is what tools like udisks and udevil are meant for, so you should use something like that.  There really is no pretty way to do this from the fstab.

Offline

#6 2014-12-15 03:21:35

semeion
Member
From: Brazil
Registered: 2008-10-20
Posts: 65

Re: Automount with fstab

Adding a bit more info in WonderWoofy post, you can mount/umount using an udisks front-end, in bash you have bashmount: https://aur.archlinux.org/packages/bashmount/

bashmount is really nice.

Last edited by semeion (2014-12-15 03:22:04)

Offline

Board footer

Powered by FluxBB