LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 08-05-2005, 08:12 AM   #1
dukeinlondon
Member
 
Registered: May 2003
Location: London
Distribution: kubuntu 8.10
Posts: 593
Blog Entries: 1

Rep: Reputation: 30
removable drive automount


I am running kernel 2.6.12.3 with udev and d-bus and I am wondering what else I need to do for my usb devices to automount and appear on the desktop.

my fstab looks like this :

Code:
# /etc/fstab: static file system information.
#
# <device> <mount point>   <type>   <options>                    <dump> <pass>
/dev/hda8  /               reiserfs defaults                     0      1
/dev/hdb8  /ubuntuhome       ext3 defaults                     0      1
/dev/hda9  /home           reiserfs defaults                       0      1
/dev/hda3  /multimedia           reiserfs defaults                         0
  1
#/dev/hdb1  /share         vfat    defaults,gid=users,umask=002  0      2
/dev/hda1  /windows        ntfs     defaults,ro,gid=windows,umask=002 0      0

/dev/hda6 /mdk92        auto  defaults          0 1
/dev/hda7  none            swap     sw                           0      0
proc       /proc           proc     defaults                     0      0
/dev/fd0   /floppy         auto     defaults,user,noauto         0      0
usbfs      /proc/bus/usb   usbfs    rw,devmode=0660,devgid=432   0      0
/dev/hdc  /cdrom  udf,iso9660  defaults,user,noauto,ro  0  0
/dev/hdd  /cdrom1  udf,iso9660  defaults,user,noauto,ro  0  0
/dev/sda1       /pen    vfat defaults,users,noauto      0       1
Mounting manually works fine and KDE already mounts cdroms automatically. Getting near but not quite there....
 
Old 08-06-2005, 11:33 AM   #2
towjamb
Member
 
Registered: Aug 2004
Location: Canada
Distribution: Debian
Posts: 87

Rep: Reputation: 15
I believe the idea of Project Utopia was to eliminate all those static links in fstab. For instance, on my Sarge test machine with KDE 3.4.1, I have only static links to hard drive partitions and cdrom, and I believe that's because I installed HAL/udev afterwards. All my USB peripherals automount and show up on the desktop like magic without fstab entries. The trick is in the KDE Control Center > Desktop > Behavior. Check everything but mounted hard disk partition.
 
Old 08-06-2005, 12:29 PM   #3
dukeinlondon
Member
 
Registered: May 2003
Location: London
Distribution: kubuntu 8.10
Posts: 593

Original Poster
Blog Entries: 1

Rep: Reputation: 30
I have just installed hal and still no luck and KDE 3.4.1 behaviour was long configured to display icons for mounted devices. I thought a reboot might be required but still no luck....

Last edited by dukeinlondon; 08-06-2005 at 12:38 PM.
 
Old 08-06-2005, 03:02 PM   #4
bp12345
Member
 
Registered: Jun 2005
Distribution: Debian testing, Kubuntu 5.04
Posts: 104

Rep: Reputation: 15
If you want to have the drive mounted automatically when inserted, remove the 'noauto' option from the options after sda1. It will mount automatically, and you can create a link to /pen on the desktop or wherever.
 
Old 08-07-2005, 10:07 AM   #5
dukeinlondon
Member
 
Registered: May 2003
Location: London
Distribution: kubuntu 8.10
Posts: 593

Original Poster
Blog Entries: 1

Rep: Reputation: 30
I've changed the kde behaviour to display unmounted removable drives and surprise ! my usb card reader shows up on the desktop (unmounted) and clicking it mounts the drive.

I still need the fstab entries for that to work.

It's not exactly what I was asking for but it's exactly the behaviour I was after.

Thank you guys for your help
 
Old 08-09-2005, 11:40 AM   #6
basileus
Member
 
Registered: Nov 2004
Location: Turku, Finland
Distribution: Debian, Ubuntu, Gentoo
Posts: 388

Rep: Reputation: 30
I'm not sure about KDE but I think the solution is similar to Gnome's. You already had all required packages (udev, hald, dbus... ) installed, so what you require is an automounter that uses them.

In Gnome the automounter is called "gnome-volume-manager". Most likely KDE has something similar. It uses udev, hald etc. to automount volumes. What IS required, however, is that the user is part of the "plugdev" group. Otherwise automounting does not work. Also, remember to logout and login back again. Gnome volume manager is also capable of creating fstab entries and mountpoints dynamically, if required.

I strongly suggest you to create fstab entries at least for your flash devices; there are lots of mount options which you can use to lengthen their useful lifetime. One of mine looks like this:

/dev/sda1 /usbmem vfat noauto,users,dirsync,sync,noatime 0 0

dirsync and sync synchronize filetransfers so that amount of required writes is reduced. Noatime disables updating access timestamps for the files. As it is only possible to write to a flash memory (such as usb stick) only a couple of million(?) times, using these options will keep the memory stick working for much longer time than otherwise.

And about the "noauto" switch... see the "man mount":


noauto Can only be mounted explicitly (i.e., the -a option will
not cause the file system to be mounted).


-a Mount all filesystems (of the given types) mentioned in fstab.

So it is not related to hotplug and automounting.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to mount removable drive? intmail Slackware 3 07-21-2005 02:30 PM
removable drive problem thebignile Mandriva 2 05-29-2005 05:31 PM
Need to get Removable Drive Icons on Desktop barneyt Mandriva 10 05-18-2005 06:38 AM
Automounting a removable drive rhraz Linux - Newbie 1 03-11-2004 12:02 PM
Removable hard drive question eastj1974 Linux - Newbie 3 05-23-2003 07:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 04:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration