LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   How to disable auto-mounting of USB Devices on Slackware 12.2? (https://www.linuxquestions.org/questions/slackware-14/how-to-disable-auto-mounting-of-usb-devices-on-slackware-12-2-a-691462/)

sertmusluman 12-18-2008 07:39 AM

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


Ilgar 12-18-2008 08:09 AM

I think hal-disable-polling may help, but I don't remember the details, please check the man page.

arubin 12-18-2008 10:22 AM

Why do you have all of this in your fstab file?

Toods 12-18-2008 11:06 AM

Quote:

Originally Posted by arubin (Post 3380070)
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.

sertmusluman 12-18-2008 12:06 PM

Quote:

Originally Posted by arubin (Post 3380070)
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?

sertmusluman 12-18-2008 12:11 PM

Quote:

Originally Posted by Toods (Post 3380119)
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 :)

sertmusluman 12-18-2008 12:20 PM

Quote:

Originally Posted by Ilgar (Post 3379924)
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.

dugan 12-18-2008 12:26 PM

Quote:

Originally Posted by sertmusluman (Post 3380178)
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

arubin 12-18-2008 01:28 PM

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.

dugan 12-18-2008 01:38 PM

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

arubin 12-18-2008 02:06 PM

Silly me, I misread that.

sertmusluman 12-18-2008 02:07 PM

Quote:

Originally Posted by arubin (Post 3380269)
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)

sertmusluman 12-18-2008 02:19 PM

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.

Alien Bob 12-18-2008 02:20 PM

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

arubin 12-18-2008 02:21 PM

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


All times are GMT -5. The time now is 05:48 AM.