View previous topic :: View next topic |
Author |
Message |
shaman200 n00b
Joined: 29 Dec 2005 Posts: 30
|
Posted: Mon Jun 18, 2007 8:14 pm Post subject: [SOLVED] Prevent HAL to automount windows partition |
|
|
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 |
|
|
trolley Apprentice
Joined: 12 Jun 2002 Posts: 292 Location: Canada
|
|
Back to top |
|
|
Fred Krogh Veteran
Joined: 07 Feb 2005 Posts: 1036 Location: Tujunga, CA
|
Posted: Tue Jul 03, 2007 2:11 pm Post subject: |
|
|
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 |
|
|
kimmie Guru
Joined: 08 Sep 2004 Posts: 531 Location: Australia
|
Posted: Wed Jul 04, 2007 2:10 pm Post subject: Re: [SOLVED] Prevent HAL to automount windows partition |
|
|
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 |
|
|
Onip Advocate
Joined: 02 Sep 2004 Posts: 2912 Location: Parma (Italy)
|
Posted: Wed Dec 12, 2007 12:51 pm Post subject: |
|
|
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 |
|
|
Onip Advocate
Joined: 02 Sep 2004 Posts: 2912 Location: Parma (Italy)
|
Posted: Thu Dec 13, 2007 10:05 am Post subject: |
|
|
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 |
|
|
|