# udev rule to hide partitions do not work

## brain salad surgery

I don't understand what's wrong with this udev rule:

cat /etc/udev/rules.d/10-hide-partitions.rules

```
ACTION!="add|change", GOTO="hide_partition_end"

SUBSYSTEM!="block", GOTO="hide_partition_end"

KERNEL=="loop*|ram*", GOTO="hide_partition_end"

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

KERNEL=="sda4",ENV{UDISKS_PRESENTATION_HIDE}="1"

KERNEL=="sda1",ENV{UDISKS_PRESENTATION_HIDE}="1"

LABEL="hide_partition_end"

```

the partitions still appear under gnome.

The rule is read, as shown in this udev debug output:

```
udevadm --debug test /

custom logging function 0x7f6b8a048250 registered

selinux=0

main: runtime dir '/run/udev'

run_command: calling: test

adm_test: version 175

This program is for debugging only, it does not run any program,

specified by a RUN key. It may show incorrect results, because

some values may be different, or not available at a simulation run.

parse_file: reading '/etc/udev/rules.d/10-hide-partitions.rules' as rules file

parse_file: reading '/lib/udev/rules.d/40-crda.rules' as rules file

parse_file: reading '/lib/udev/rules.d/40-fuse.rules' as rules file

parse_file: reading '/lib/udev/rules.d/40-gnupg.rules' as rules file

parse_file: reading '/lib/udev/rules.d/40-hplip.rules' as rules file

```

kernel : 3.2.0-24-generic

udev --version gives 175

----------

## brain salad surgery

hey ? no one ?

come on, there must someone that knows what i am talking about...

----------

## salahx

Try UDISKS_IGNORE instead of UDISKS_PRESENTATION_HIDE

----------

## brain salad surgery

No more luck with this file:

```
ACTION!="add|change", GOTO="hide_partition_end"

SUBSYSTEM!="block", GOTO="hide_partition_end"

KERNEL=="loop*|ram*", GOTO="hide_partition_end"

KERNEL=="sda3",ENV{UDISKS_IGNORE}="1"

KERNEL=="sda4",ENV{UDISKS_IGNORE}="1"

KERNEL=="sda1",ENV{UDISKS_IGNORE}="1"

LABEL="hide_partition_end"

```

Any other idea ??? Couldn't a secret !

----------

## PaulBredbury

Try adding a space after the comma, like in all the examples.

----------

## brain salad surgery

added the spaces, but doesn't work

----------

## sebB

 *Quote:*   

> ACTION!="add|change", GOTO="hide_partition_end"
> 
> SUBSYSTEM!="block", GOTO="hide_partition_end"
> 
> KERNEL=="loop*|ram*", GOTO="hide_partition_end"
> ...

 

Try adding a s to partition

 *Quote:*   

> ACTION!="add|change", GOTO="hide_partitions_end"
> 
> SUBSYSTEM!="block", GOTO="hide_partitions_end"
> 
> KERNEL=="loop*|ram*", GOTO="hide_partitions_end"
> ...

 

----------

## brain salad surgery

doesn't work

----------

## sebB

Strange, did you reload the rules or restart computer?

----------

## brain salad surgery

always restart

strange indeed, but it's not magic, there is a solution

----------

## brain salad surgery

lol, as usual, no one knows anything [Mod edit for language − JRG] here !!

----------

## John R. Graham

@brain salad surgery, please keep the language G rated here, in compliance with the Forum Guidelines.

- John

----------

## brain salad surgery

lol, yeah, that's all you're able to do, change the sections of posts and warn about language

what about finding answers ???

waste of time, and only losers here

----------

## John R. Graham

Fare thee well.

- John

----------

