Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Prevent HAL to automount windows partition
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
shaman200
n00b
n00b


Joined: 29 Dec 2005
Posts: 30

PostPosted: Mon Jun 18, 2007 8:14 pm    Post subject: [SOLVED] Prevent HAL to automount windows partition Reply with quote

Well , since the update of HAL to 0.5.9-r1 ,all partition on my disks are automounted... and i don't want that

Merely because i'm not interested in my windows system or games partition in linux.

So i googled a little and found this wiki :http://wiki.archlinux.org/index.php/HAL

So to solve my problem here's the solution that work for me:

Just create the file /etc/hal/fdi/policy/90-user-methods.fdi with the following code:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<deviceinfo version="0.2">
  <device>
    <match key="volume.fsusage" string="filesystem">
      <merge key="volume.ignore" type="bool">true</merge>
      <match key="@block.storage_device:storage.removable" bool="true">
        <merge key="volume.ignore" type="bool">false</merge>
        <merge key="storage.policy.should_mount" type="bool">true</merge>
      </match>
    </match>
  </device>
</deviceinfo>


And then restart HAL

Code:
/etc/init.d/hald restart


Now, only removable device are automounted!!!


Last edited by shaman200 on Thu Aug 23, 2007 9:09 am; edited 1 time in total
Back to top
View user's profile Send private message
trolley
Apprentice
Apprentice


Joined: 12 Jun 2002
Posts: 292
Location: Canada

PostPosted: Tue Jun 19, 2007 12:32 am    Post subject: Reply with quote

I did it this way:

https://forums.gentoo.org/viewtopic-t-565859-highlight-.html
Back to top
View user's profile Send private message
Fred Krogh
Veteran
Veteran


Joined: 07 Feb 2005
Posts: 1036
Location: Tujunga, CA

PostPosted: Tue Jul 03, 2007 2:11 pm    Post subject: Reply with quote

Putting noauto in fstab was not doing the job for me. Ths suggestion by shaman200 did the job -- many thanks! (I'm frequently amazed at the solutions people come up with!) Perhaps shaman200 could edit his post to change
Code:
/etc/init.d/hal restart
to
Code:
/etc/init.d/hald restart

Fred
Back to top
View user's profile Send private message
kimmie
Guru
Guru


Joined: 08 Sep 2004
Posts: 531
Location: Australia

PostPosted: Wed Jul 04, 2007 2:10 pm    Post subject: Re: [SOLVED] Prevent HAL to automount windows partition Reply with quote

shaman200 wrote:
Well , since the update of HAL to 0.5.9-r1 ,all partition on my disks are automounted... and i don't want that

Merely because i'm not interested in my windows system or games partition in linux.

So i googled a little and found this wiki :http://wiki.archlinux.org/index.php/HAL
:
Now, only removable device are automounted!!!



Thanks very much for posting that, it was really bugging me!
Back to top
View user's profile Send private message
Onip
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 2912
Location: Parma (Italy)

PostPosted: Wed Dec 12, 2007 12:51 pm    Post subject: Reply with quote

rule posted by shaman200 halted my sd card reader to be automounted on sd insertion. So i wrote a much more specific rule for my hd partitions, not the best (I know) but it works. Here it is
Code:

<?xml version="1.0" encoding="UTF-8"?>
<deviceinfo version="0.2">
  <device>
     <match key="block.device" string="/dev/hda1">
        <merge key="volume.ignore" type="bool">true</merge>
     </match>
     <match key="block.device" string="/dev/hda2">
        <merge key="volume.ignore" type="bool">true</merge>
     </match>
  </device>
</deviceinfo>


If someone could suggest one blocking only internal hd partitions (or ones only listed in fstab with noauto...) please post it.
_________________
Linux Registered User n. 373835

Titus Lucretius Carus, De Rerum Natura - Tantum religio potuit suadere malorum
Back to top
View user's profile Send private message
Onip
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 2912
Location: Parma (Italy)

PostPosted: Thu Dec 13, 2007 10:05 am    Post subject: Reply with quote

after more googling and experimenting I found this one, which should get every internal disk partition ( i.e. ones which usually are listed in fstab) and ignore them.

Code:

<?xml version="1.0" encoding="UTF-8"?>
<deviceinfo version="0.2">
  <device>
     <match key="@block.storage_device:storage.hotpluggable" bool="false">
        <match key="@block.storage_device:storage.removable" bool="false">
           <merge key="volume.ignore" type="bool">true</merge>
        </match>
     </match>
  </device>
</deviceinfo>


If someone could provide some testing...
_________________
Linux Registered User n. 373835

Titus Lucretius Carus, De Rerum Natura - Tantum religio potuit suadere malorum
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum