You are not logged in.

#1 2008-04-15 23:20:54

HyperBaton
Member
From: Belgium
Registered: 2008-01-18
Posts: 207

How to stop GNOME automounting my partitions

Gnome always mounts my Windows partitions to /media. I have shut off all automount options in the gnome-volume-manager, but it still mounts them all. They are ofcourse not listed in my /etc/fstab. Is this supposed to be some kind of "feature"?

Does anyone know how I can fix this annoying behaviour?

Offline

#2 2008-04-17 17:53:22

tigrmesh
IRC Op
From: Florida, US
Registered: 2007-12-11
Posts: 794

Re: How to stop GNOME automounting my partitions

This may help you.  Look for where he talks about elective mount point:  http://kmandla.wordpress.com/2008/03/17 … istro-nfs/.

Offline

#3 2008-04-17 19:16:01

HyperBaton
Member
From: Belgium
Registered: 2008-01-18
Posts: 207

Re: How to stop GNOME automounting my partitions

I was thinking about that before, but I hadn't tried it yet because it seems a bit like a dirty hack method to get rid of this behaviour. But I can say, it does work! I added the partitions to fstab with the noauto option and they have stopped appearing on my desktop for now. Thanks for the link.

Still, I find it odd there isn't an easier way to accomplish this?

Offline

#4 2008-04-18 02:10:31

Phrodo_00
Member
From: Seattle, WA
Registered: 2006-04-09
Posts: 342
Website

Re: How to stop GNOME automounting my partitions

maybe add it to fstab with the noauto option? hal mounts everything that's not in the fstab...

Offline

#5 2008-04-18 08:40:51

chicha
Member
From: France
Registered: 2007-04-20
Posts: 271

Re: How to stop GNOME automounting my partitions

Phrodo_00 wrote:

maybe add it to fstab with the noauto option? hal mounts everything that's not in the fstab...

You are right !
I have had the same problem as you and here is the solution :

Define a mount point in /etc/fstab for your volumes which is not in /media. gnome-volume-manger will mount every thing which is either not in /etc/fstab (through hal) or which has a mount point in /media.

Also use the option 'noauto' in /etc/fstab for that mount point to make sure the init process will not mount it at boot.
You might have a line like this in /etc/fstab :

/dev/sda1  /mnt/mywindows  ntfs-3g  defaults,noauto  0 0

where /dev/sda1 is your windows partition. You might also use UUIDs (see http://wiki.archlinux.org/index.php/Per … ce_naming)

I hope it helped !

Offline

#6 2008-04-18 09:51:29

HyperBaton
Member
From: Belgium
Registered: 2008-01-18
Posts: 207

Re: How to stop GNOME automounting my partitions

Yes, that's what I did and it works, but like I said, it's kind of a dirty method to accomplish this. Because after all, I'm never ever going to mount these drives anyway, so it's rather silly that they have to be in my fstab. There has to be a simpler way of telling gnome-volume-manager not to mount these fixed partitions.

Offline

#7 2008-04-18 10:05:45

chicha
Member
From: France
Registered: 2007-04-20
Posts: 271

Re: How to stop GNOME automounting my partitions

There is a "cleaner" way, as long as you consider this method as a dirty one which I do not tongue. I guess it is a mater of choice ...
You can disable the mounting of a given partion inside hal configuration.

See :
http://wiki.archlinux.org/index.php/HAL
http://people.freedesktop.org/~david/ha … -spec.html

I did not want to go deeper into hal configuration, but I would be interested to know if you succeed this way and how you did it smile

Offline

#8 2008-04-18 10:50:00

HyperBaton
Member
From: Belgium
Registered: 2008-01-18
Posts: 207

Re: How to stop GNOME automounting my partitions

That actually worked! Thanks! But the partitions still show up in Nautilus and the Places menu though. I had a look at the HAL policies in the link you provided and I noticed the "volume.ignore" policy. If I can figure out how to implement that, it might work to not show the partitions anywhere at all.

Offline

#9 2008-04-18 11:53:39

HyperBaton
Member
From: Belgium
Registered: 2008-01-18
Posts: 207

Re: How to stop GNOME automounting my partitions

Okay, I managed to make it so they do not show up anywhere, here is my preferences.fdi file located in /etc/hal/fdi/policy/:

<?xml version="1.0" encoding="UTF-8"?>
<deviceinfo version="0.2">
 <device>
  <match key="storage.hotpluggable" bool="false">
   <match key="storage.removable" bool="false">
    <merge key="storage.automount_enabled_hint" type="bool">false</merge>
   </match>
  </match>
 </device>
 <device>
  <match key="volume.uuid" string="2E2C05502C05150D">
   <merge key="volume.ignore" type="bool">true</merge>
  </match>
  <match key="volume.uuid" string="afba1791-11b8-496d-a232-04805eaef6b2">
   <merge key="volume.ignore" type="bool">true</merge>
  </match>
 </device>
</deviceinfo>

Technically, the "storage.automount_enabled_hint" is not needed anymore, but it's not a bad thing to have it there.

I use UUID's to address my partitions, and that's pretty straight forward with the "volume.uuid" key, but for the people who want to use the normal partition names, I don't really know how that would work. There is a "volume.partition.number" key, but that only accepts a integer, and not a string like "sda6" for example.

You can find the UUID's of your partitions in /dev/disk/by-uuid/. Just do ls -l.

Thanks for all the help. One step closer to a perfect Arch system smile

Last edited by HyperBaton (2008-04-18 11:56:05)

Offline

#10 2008-04-18 12:08:14

chicha
Member
From: France
Registered: 2007-04-20
Posts: 271

Re: How to stop GNOME automounting my partitions

Glad you succeeded, and thank you for posting the hal solution !
This is why i like Arch : you learn how the low level layers work (not the GUI frontend). Thus what you learn can be applied on any other distro smile

Offline

#11 2008-04-18 13:07:11

HyperBaton
Member
From: Belgium
Registered: 2008-01-18
Posts: 207

Re: How to stop GNOME automounting my partitions

One thing that I don't understand is this though: Until a few days ago, I was using XFCE and I never had this "problem" there. My partitions were not automounted to /media and didn't show up on the Desktop. But HAL is HAL, whether it's XFCE or Gnome, it shouldn't matter. So does that mean I can conclude that it's gnome-volume-manager that's the cause of this and not HAL?

Offline

#12 2008-04-18 15:19:06

chicha
Member
From: France
Registered: 2007-04-20
Posts: 271

Re: How to stop GNOME automounting my partitions

I am not 100% sure but I think gnome-volume-manager is responsible for this.
I even had a different behavior in Gnome 2.20 and Gnome 2.22 (where they migrated to GIO/GVFS)

Offline

#13 2008-04-19 17:00:35

iBertus
Member
From: Greenville, NC
Registered: 2004-11-04
Posts: 2,228

Re: How to stop GNOME automounting my partitions

So, does this solution prevent USB flash drives from automounting or just the fixed discs within your system?

Offline

#14 2008-04-19 17:04:45

chicha
Member
From: France
Registered: 2007-04-20
Posts: 271

Re: How to stop GNOME automounting my partitions

This solution prevents only the discs within your system, and only the discs/partition you excplicitly specify.
For USB stuffs you can configure the behavior (manual mount or auto mount) with the usual Gnome configuration tools : system -> media storage (I do not know the exact name in english, but you will find it smile )

Offline

#15 2008-04-19 18:36:24

HyperBaton
Member
From: Belgium
Registered: 2008-01-18
Posts: 207

Re: How to stop GNOME automounting my partitions

System -> Removable Drives and Media

Tick off "Mount removable drives when hotplugged", that's the one you want I think.

Offline

#16 2008-04-19 18:56:57

pelle.k
Member
From: Åre, Sweden (EU)
Registered: 2006-04-30
Posts: 667

Re: How to stop GNOME automounting my partitions

Disable gnome-volume-manager automount;
http://bbs.archlinux.org/viewtopic.php?id=43384


"Your beliefs can be like fences that surround you.
You must first see them or you will not even realize that you are not free, simply because you will not see beyond the fences.
They will represent the boundaries of your experience."

SETH / Jane Roberts

Offline

#17 2008-04-19 20:08:04

HyperBaton
Member
From: Belgium
Registered: 2008-01-18
Posts: 207

Re: How to stop GNOME automounting my partitions

Yeah, that works, but with these extra hal policies the hard drives don't show up at all anymore, which is what I was really going for smile

Offline

#18 2008-04-20 03:14:01

Phrodo_00
Member
From: Seattle, WA
Registered: 2006-04-09
Posts: 342
Website

Re: How to stop GNOME automounting my partitions

actually, afaik gnome-volume-manager doesn't exist anymore, automonting is now done by nautilus or something

Last edited by Phrodo_00 (2008-04-20 03:17:28)

Offline

#19 2008-04-20 16:47:04

pelle.k
Member
From: Åre, Sweden (EU)
Registered: 2006-04-30
Posts: 667

Re: How to stop GNOME automounting my partitions

Yeah, that works, but with these extra hal policies the hard drives don't show up at all anymore, which is what I was really going for smile

My method does work with gnome 2.20 (gvm 2.17), just the way you would like it. Unfortunately gnome-volume-manager does not honor hal's request to disable automount, so that is why you need to patch gnome-volume-manager first.

Apparently, gnome 2.22 (gvm 2.22) honours the hal policy i used with gnome 2.20 (gvm 2.17) without patching gnome-volume-manager at all smile . I have yet to try that out though.
http://www.nabble.com/GNOME-2.22-has-be … #a16280245

The only other way i know of (without setting a policy in hal telling gvm not to autmount), is by using policykit to do temporary authorizations (like you can in mandriva 2008.1, fedora 9)


"Your beliefs can be like fences that surround you.
You must first see them or you will not even realize that you are not free, simply because you will not see beyond the fences.
They will represent the boundaries of your experience."

SETH / Jane Roberts

Offline

Board footer

Powered by FluxBB