Gentoo Archives: gentoo-user

From: Walter Dnes <waltdnes@××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Automounting USB drives
Date: Wed, 06 Aug 2014 15:09:44
Message-Id: 20140806150931.GA21316@waltdnes.org
In Reply to: [gentoo-user] Automounting USB drives by Chris Stankevitz
1 On Tue, Aug 05, 2014 at 06:18:44PM -0700, Chris Stankevitz wrote
2 > Hello,
3 >
4 > Which package(s) do I need that allow:
5 >
6 > 1. A USB drive is inserted
7 >
8 > 2. The drive is mounted in some location automatically (e.g. /media/usbstick)
9 >
10 > 3. (2) happens even when the drive is an NTFS or FAT32 drive.
11 >
12 > 4. (1)-(3) happens even if I am not running a "GUI"
13
14 It can be done with udev rules. See webpage
15 http://www.tuxradar.com/answers/526#null The suggested udev rule is...
16
17 SUBSYSTEMS=="scsi", KERNEL=="sd[a-h][0-9]",
18 SYMLINK:="removable%n", RUN+="/usr/bin/pmount /dev/removable%n"
19
20 It sets up devices /dev/removable1, /dev/removable2, etc, depending on
21 the number of partitions on the USB device. The regular user should
22 able to unmount the device with the "pumount" command. I'm not certain,
23 but I believe that regular users need to be members of group "plugdev"
24 to be able to access and unmount the USB drive.
25
26 Because this is done independantly of the GUI, I don't think it'll set
27 up an icon automatically.
28
29 --
30 Walter Dnes <waltdnes@××××××××.org>
31 I don't run "desktop environments"; I run useful applications

Replies

Subject Author
Re: [gentoo-user] Automounting USB drives Neil Bothwick <neil@××××××××××.uk>
Re: [gentoo-user] Automounting USB drives Francisco Ares <frares@×××××.com>
Re: [gentoo-user] Automounting USB drives Chris Stankevitz <chrisstankevitz@×××××.com>