1. Automatically mounting USB devices
2. Manually mounting USB devices
1.1. Precondition
The device cannot be listed in /etc/fstab.
This desription works only with Gnome.
1.2. Installation
The following packages are required:
apt-get install pmount hal gnome-volume-manager hal-device-manager
In order to access the plugged devices, the user has to be added in group plugdev:
adduser yourUser plugdev
Now logout and re login to update the user groups.
1.3. Configuration
From Gnome bar, select:
Applications
Desktop Preferences
Removable Drives and Media
or, from a shell, simply type
gnome-volume-properties
Set the following items:
Mount removable drives when hot-plugged
Mount removable media when inserted
Browse removable media when inserted
1.4. Try it
That's all. Now just plug a USB device. After a short time, an icon will appear on the desktop.
If more than one device are plugged in, more icons will appear.
1.5. Related documents
This chapter has been based on http://www.linuxtrent.it/documentazione/wikilinux/DispositiviRimovibiliSuDebian.
2.1. Driver
USB devices (memory sticks, external USB harddisc, ...) are supported by the usb-storage driver.
If you install hotplug
apt-get install hotplug
it will be automatically loaded when necessary.
If you prefere doing it manually, just call:
modprobe usb-storage
2.2. Updating /etc/fstab
Add the following line in your /etc/fstab
/dev/sda1 /media/usb noauto,user,sync
Replace sda1 with the correct one if you have SCSI devices. Take a look at
tail /var/log/messages
to find it out.
2.3. Creating mount point
mkdir /media/usb
2.4. Try it
Now, just plug your memory stick and type as ordinary user (not root)
mount /media/usb
as a ordinary user (no root).
The memory stick will be mounted to /media/usb and probably an icon will appear on the desktop.
|