8

I'm trying to make udev stop mounting one of my devices at boot time, and I've created a rule in /etc/udev/rules.d/ called 1-myblacklist.rules. All the rule does is matches the device by kernel identifier (ie. sdb) and and set the attribute OPTION to "ignore_device"

udevadm test /sys/block/sdb 

Shows that the my rules file is parsed as the first entry, but all subsequent rules still gets applied. And the partitions on the drive still shows up on my desktop (XFCE).

1
  • 1
    If its not mounting until xfce starts, then thats not udev, thats thunar+dbus. You might be able to use policykit to restrict this, but I dont know. This is territory I havent messed with much.
    – phemmer
    Dec 29, 2011 at 2:24

2 Answers 2

4

I just wanted to post the solution to this problem, in-case somebody else is faced with a similar challenge.

Adding the following rules file did the trick:

/etc/udev/rules.d/90-hide-partitions.rules

KERNEL=="sda2",ENV{UDISKS_PRESENTATION_HIDE}="1" 
KERNEL=="sda3",ENV{UDISKS_PRESENTATION_HIDE}="1"
0

The mounting of the device could be performed by XFCE itself. This page shows how to set it up under Debian/Lenny and would also be instructive on how to disable auto-mounting: http://blog.slucas.fr/en/debian/lenny-xfce-automount

2
  • Hey :) I believe that article is about making enabling (or disabling i suppose) automount. This is not really what im after.
    – JustDanyul
    Nov 29, 2011 at 0:56
  • 1
    Have you booted into a lower run-level to verify that the disk is mounted at boot time and not by any XFCE software?
    – Erik
    Dec 6, 2011 at 21:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .