Author Topic: How to stop Hal mounting HDD partitions  (Read 1706 times)

Offline kjpetrie

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3990
How to stop Hal mounting HDD partitions
« on: February 07, 2012, 06:44:57 AM »
Sometimes Hal mounts partitions on your hard drive relating to test installs or other OSes which you don't want available in pclos. This can be stopped by giving each partition a mount point and setting its noauto flag, but that's fiddly if you have to do it for every partition created elsewhere.

An alternative is to tell HAL to leave sata and ide devices alone unless they have removable media (eg optical drives).

Put the following in a file (as root) and store it at /etc/hal/fdi/preprobe/20-nomount-hdd:

Code: [Select]

<?xml version="1.0" encoding="UTF-8"?>
<!-- store at /etc/hal/fdi/preprobe/20-nomount-hdd -->
<deviceinfo version="0.2">
    <device>
        <match key="storage.bus" string_outof="sata;ide">
        <match key="storage.removable" bool="false">
            <merge key="info.ignore" type="bool">true</merge>
        </match>
    </device>
</deviceinfo>

HAL will now ignore SATA and IDE devices which don't have removable media.
-----------
KJP
-----------------------------------------------------------
PClos64 RC1 on Intel D945GCLF2 motherboard (Atom 330), 2GB DDR2 RAM, Maxtor STM325031, HL-DT-ST DVDRAM GSA-H42N, Amilo LSL 3220T monitor. Also Acer 5810TG (with custom kernel) and Asus eeePC 2G surf

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10644
  • MLUs Forever!
Re: How to stop Hal mounting HDD partitions
« Reply #1 on: February 07, 2012, 10:19:58 AM »
Quote
Sometimes Hal mounts partitions on your hard drive relating to test installs or other OSes which you don't want available in pclos.

Do you mean auto mount or mount when - for instance - selected in a file manager?

I have never had them automount here (KDE), which is why I ask.
MLUs rule the roost!

Linux XPS 3.4.38-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline djohnston

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6227
  • I don't do Windows
Re: How to stop Hal mounting HDD partitions
« Reply #2 on: February 07, 2012, 10:33:05 AM »

HAL will now ignore SATA and IDE devices which don't have removable media.


That's a good tip. Maybe this can be incorporated in our live CDs.
Bare metal                           VBox
AMD Athlon 7750 Dual-Core    Single core
4GiB RAM                              1GiB RAM
nVidia GeForce FX 5200          64MB video
LXDE 32bit                            KDE 64bit

Registered Linux User #416378

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10644
  • MLUs Forever!
Re: How to stop Hal mounting HDD partitions
« Reply #3 on: February 07, 2012, 10:34:32 AM »

HAL will now ignore SATA and IDE devices which don't have removable media.


That's a good tip. Maybe this can be incorporated in our live CDs.


:(  I hope not  :(
MLUs rule the roost!

Linux XPS 3.4.38-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline kjpetrie

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3990
Re: How to stop Hal mounting HDD partitions
« Reply #4 on: February 07, 2012, 12:58:00 PM »
Automount. They will still be mounted if specifically requested in the FM sidebar.
-----------
KJP
-----------------------------------------------------------
PClos64 RC1 on Intel D945GCLF2 motherboard (Atom 330), 2GB DDR2 RAM, Maxtor STM325031, HL-DT-ST DVDRAM GSA-H42N, Amilo LSL 3220T monitor. Also Acer 5810TG (with custom kernel) and Asus eeePC 2G surf

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10644
  • MLUs Forever!
Re: How to stop Hal mounting HDD partitions
« Reply #5 on: February 07, 2012, 03:03:40 PM »
Automount. They will still be mounted if specifically requested in the FM sidebar.


Thanks.

I never saw that happening here with KDE4.

I have a couple automount and the rest not. The only entries in fstab are for / & /home and a NFS mount point. The non-fstab partitions are taken care of with Device Notifier settings.

MLUs rule the roost!

Linux XPS 3.4.38-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT