LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 12-18-2008, 08:39 AM   #1
sertmusluman
Member
 
Registered: Jan 2006
Location: Canakkale, Turkiye
Distribution: Slackware 12.2
Posts: 53

Rep: Reputation: 15
How to disable auto-mounting of USB Devices on Slackware 12.2?


I have installed Slack 12.2 yet. My issue is about mounting USB devices. Although I entered "noauto" option on the related lines on fstab file, KDE directly opens index of USB flash drives on a new window. Using the same fstab file on Slack 12.1 (KDE), everything goes fine, no problem occurs, it is asked that whether mount or not on a pop up window. I want Slack 12.2 to ask me whether mount or not before opening mount directory (content) on a new window.

Thanks for your interest.

My fstab file:

Quote:
/dev/sda2 swap swap defaults 0 0
/dev/sda1 / ext3 defaults 1 1
/dev/sda5 /opt ext3 defaults 1 2
/dev/sda6 /home ext3 defaults 1 2
/dev/sda4 /xp ntfs-3g umask=000 1 0
/dev/sda7 /depo ntfs-3g auto,noatime,users,suid,dev,exec,locale=tr_TR.UTF-8 0 0
/dev/sr0 /mnt/cdrom0 auto user,exec,ro,noauto 0 0
/dev/sr1 /mnt/cdrom1 auto user,exec,ro,noauto 0 0
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0

/dev/sda /mnt/flash1 auto user,exec,rw,noauto,umask=0 0 0
/dev/sdb /mnt/flash2 auto user,exec,rw,noauto,umask=0 0 0
/dev/sdc /mnt/flash3 auto user,exec,rw,noauto,umask=0 0 0
/dev/sdd /mnt/flash4 auto user,exec,rw,noauto,umask=0 0 0
/dev/sde /mnt/flash5 auto user,exec,rw,noauto,umask=0 0 0
/dev/sdf /mnt/flash6 auto user,exec,rw,noauto,umask=0 0 0
/dev/sdg /mnt/flash7 auto user,exec,rw,noauto,umask=0 0 0
/dev/sdh /mnt/flash8 auto user,exec,rw,noauto,umask=0 0 0

/dev/sdb1 /mnt/flash10 auto user,exec,rw,noauto,umask=0 0 0
/dev/sdc1 /mnt/flash11 auto user,exec,rw,noauto,umask=0 0 0
/dev/sdd1 /mnt/flash12 auto user,exec,rw,noauto,umask=0 0 0
/dev/sde1 /mnt/flash13 auto user,exec,rw,noauto,umask=0 0 0
/dev/sdf1 /mnt/flash14 auto user,exec,rw,noauto,umask=0 0 0
/dev/sdg1 /mnt/flash15 auto user,exec,rw,noauto,umask=0 0 0
/dev/sdh1 /mnt/flash16 auto user,exec,rw,noauto,umask=0 0 0

/dev/sdb5 /mnt/flash18 auto user,exec,rw,noauto,umask=0 0 0
/dev/sdc5 /mnt/flash19 auto user,exec,rw,noauto,umask=0 0 0
/dev/sdd5 /mnt/flash20 auto user,exec,rw,noauto,umask=0 0 0
/dev/sde5 /mnt/flash21 auto user,exec,rw,noauto,umask=0 0 0
/dev/sdf5 /mnt/flash22 auto user,exec,rw,noauto,umask=0 0 0
/dev/sdg5 /mnt/flash23 auto user,exec,rw,noauto,umask=0 0 0
/dev/sdh5 /mnt/flash24 auto user,exec,rw,noauto,umask=0 0 0

/dev/sdb6 /mnt/flash26 auto user,exec,rw,noauto,umask=0 0 0
/dev/sdc6 /mnt/flash27 auto user,exec,rw,noauto,umask=0 0 0
/dev/sdd6 /mnt/flash28 auto user,exec,rw,noauto,umask=0 0 0
/dev/sde6 /mnt/flash29 auto user,exec,rw,noauto,umask=0 0 0
/dev/sdf6 /mnt/flash30 auto user,exec,rw,noauto,umask=0 0 0
/dev/sdg6 /mnt/flash31 auto user,exec,rw,noauto,umask=0 0 0
/dev/sdh6 /mnt/flash32 auto user,exec,rw,noauto,umask=0 0 0

/dev/sdb2 /mnt/flash33 auto user,exec,rw,noauto,umask=0 0 0
/dev/sdc2 /mnt/flash34 auto user,exec,rw,noauto,umask=0 0 0
/dev/sdd2 /mnt/flash35 auto user,exec,rw,noauto,umask=0 0 0
/dev/sde2 /mnt/flash36 auto user,exec,rw,noauto,umask=0 0 0
/dev/sdf2 /mnt/flash37 auto user,exec,rw,noauto,umask=0 0 0
/dev/sdg2 /mnt/flash38 auto user,exec,rw,noauto,umask=0 0 0
/dev/sdh2 /mnt/flash39 auto user,exec,rw,noauto,umask=0 0 0

/dev/sdb3 /mnt/flash40 auto user,exec,rw,noauto,umask=0 0 0
/dev/sdc3 /mnt/flash41 auto user,exec,rw,noauto,umask=0 0 0
/dev/sdd3 /mnt/flash42 auto user,exec,rw,noauto,umask=0 0 0
/dev/sde3 /mnt/flash43 auto user,exec,rw,noauto,umask=0 0 0
/dev/sdf3 /mnt/flash44 auto user,exec,rw,noauto,umask=0 0 0
/dev/sdg3 /mnt/flash45 auto user,exec,rw,noauto,umask=0 0 0
/dev/sdh3 /mnt/flash46 auto user,exec,rw,noauto,umask=0 0 0

Last edited by sertmusluman; 12-18-2008 at 04:39 PM.
 
Old 12-18-2008, 09:09 AM   #2
Ilgar
Member
 
Registered: Jan 2005
Location: Istanbul, Turkey
Distribution: Slackware 14.1, Slackware64 14.1
Posts: 930

Rep: Reputation: 96
I think hal-disable-polling may help, but I don't remember the details, please check the man page.
 
Old 12-18-2008, 11:22 AM   #3
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 14.1 (multilib)
Posts: 1,210

Rep: Reputation: 55
Why do you have all of this in your fstab file?
 
Old 12-18-2008, 12:06 PM   #4
Toods
Member
 
Registered: Dec 2005
Location: UK
Distribution: Slackware 12.1
Posts: 249

Rep: Reputation: 32
Quote:
Originally Posted by arubin View Post
Why do you have all of this in your fstab file?
I think I can see why this lot is present in his fstab, but I think a suitable udev rule would avoid the need for it.
 
Old 12-18-2008, 01:06 PM   #5
sertmusluman
Member
 
Registered: Jan 2006
Location: Canakkale, Turkiye
Distribution: Slackware 12.2
Posts: 53

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by arubin View Post
Why do you have all of this in your fstab file?
These entries are the possibilities that suit to mount usb devices many times without shutting down the computer. For each plugging of usb device, Slack choses different device name (sdb, sdb1, sdb2, sdc, sdc1, etc...). I solved my problem like this, but there must be packages that do this operation to mount volumes. I am not an advanced Slack user and do not know an easy way to mount volumes without manually. Which method do you use?
 
Old 12-18-2008, 01:11 PM   #6
sertmusluman
Member
 
Registered: Jan 2006
Location: Canakkale, Turkiye
Distribution: Slackware 12.2
Posts: 53

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Toods View Post
I think I can see why this lot is present in his fstab, but I think a suitable udev rule would avoid the need for it.
How can i set this rule for my computer? I want to mount volumes as user without having a fstab file that is rich of entries
 
Old 12-18-2008, 01:20 PM   #7
sertmusluman
Member
 
Registered: Jan 2006
Location: Canakkale, Turkiye
Distribution: Slackware 12.2
Posts: 53

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Ilgar View Post
I think hal-disable-polling may help, but I don't remember the details, please check the man page.
i'm looking that subject now, but when i inserted a dvd on dvd-rom, index of dvd was not opened directly, first KDE requested me options on a pop up window, then clicking related icon mounting completed. I think different rules are valid for each usb, sata and ide devices.

Thanks for everyone.

Last edited by sertmusluman; 12-18-2008 at 01:24 PM.
 
Old 12-18-2008, 01:26 PM   #8
dugan
Senior Member
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 4,987

Rep: Reputation: 1555Reputation: 1555Reputation: 1555Reputation: 1555Reputation: 1555Reputation: 1555Reputation: 1555Reputation: 1555Reputation: 1555Reputation: 1555Reputation: 1555
Quote:
Originally Posted by sertmusluman View Post
How can i set this rule for my computer? I want to mount volumes as user without having a fstab file that is rich of entries
http://reactivated.net/writing_udev_rules.html
 
Old 12-18-2008, 02:28 PM   #9
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 14.1 (multilib)
Posts: 1,210

Rep: Reputation: 55
It is not necessary anymore. I used to manage mounting in Slackware 11 by a combination of fstab entries and udev rules but, as I understand it it is not necessary in Slackware 12. In fact Pat says in 'changes and hints'

Quote:
There should never be a reason
to edit anything in /lib/udev/rules.d/, so if you think you have a case
where this is required, either you're wrong or it needs to be addressed
in the upstream source.
So I would delete or at least comment all this out from your fstab file. When you plug in a usb drive you ought to get a box coming up asking whether you want it automounted in konqueror.
 
Old 12-18-2008, 02:38 PM   #10
dugan
Senior Member
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 4,987

Rep: Reputation: 1555Reputation: 1555Reputation: 1555Reputation: 1555Reputation: 1555Reputation: 1555Reputation: 1555Reputation: 1555Reputation: 1555Reputation: 1555Reputation: 1555
He's not saying that user-written udev rules are obsolete. He's saying they don't go in /lib/udev/rules.d.

Last edited by dugan; 12-18-2008 at 02:46 PM.
 
Old 12-18-2008, 03:06 PM   #11
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 14.1 (multilib)
Posts: 1,210

Rep: Reputation: 55
Silly me, I misread that.
 
Old 12-18-2008, 03:07 PM   #12
sertmusluman
Member
 
Registered: Jan 2006
Location: Canakkale, Turkiye
Distribution: Slackware 12.2
Posts: 53

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by arubin View Post
It is not necessary anymore. I used to manage mounting in Slackware 11 by a combination of fstab entries and udev rules but, as I understand it it is not necessary in Slackware 12. In fact Pat says in 'changes and hints'



So I would delete or at least comment all this out from your fstab file. When you plug in a usb drive you ought to get a box coming up asking whether you want it automounted in konqueror.
I have tried this already. Story is below

1. I successfully completed Slackware 12.2 full installation
2. I did no change on fstab file. I preserved fstab file that was produced during the installation
3. I logged on Slack as user
4. I plugged an USB mass storage
5. Slack 12.2 directly tried to open target mount directory, but could not be successful.

http://www.freeimagehosting.net/uploads/db68f28346.jpg

(Without my entries on Slack 12.1, it was asked that whether mount or not. When i clicked open content in a directory button, i came to the point on the above picture.But here on slack 12.2 i directly meet the eroor mesage above)

Last edited by sertmusluman; 12-19-2008 at 06:08 AM.
 
Old 12-18-2008, 03:19 PM   #13
sertmusluman
Member
 
Registered: Jan 2006
Location: Canakkale, Turkiye
Distribution: Slackware 12.2
Posts: 53

Original Poster
Rep: Reputation: 15
dugan i am looking at the page that you send. It is a little bit complicated for me to solve this problem by my own.
 
Old 12-18-2008, 03:20 PM   #14
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 5,384

Rep: Reputation: Disabled
From CHANGES_AND_HINTS.TXT :
Code:
HAL is not new anymore, but here are a few notes related to it:
  1. User accounts with permission to mount removable devices must be in at
     least the plugdev group, and the power group is also recommended to 
     allow shutdown and reboot via HAL methods.
Looking at the screenshot you posted I think you did not add your account to the "plugdev" group.

As to the involuntary automounting, I will have to install 12.2 with KDE3 on a computer tonight to see (I have KDE4 here).

Eric
 
Old 12-18-2008, 03:21 PM   #15
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 14.1 (multilib)
Posts: 1,210

Rep: Reputation: 55
This looks like the plugdev issue. You need to be a member of the plugdev group for automounting to work.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Gnome: Auto mounting external devices as first user logged in, not current user yitzle Linux - Software 4 04-01-2008 10:43 AM
(auto)mounting devices in slackware w/ (or w/o) KDE crisostomo_enrico Slackware 1 08-05-2006 12:59 AM
how can i configure FreeBSD to auto mount USB devices? asilentmurmur *BSD 2 04-24-2006 02:24 PM
Disable Auto-mounting of devices in .... WINDOWS? opioid General 4 04-20-2006 02:35 PM
Auto mounting of USB devices leecming Linux - Newbie 6 08-05-2004 02:42 PM


All times are GMT -5. The time now is 09:33 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration