Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a partition taking a whole separate drive that I use for backups. I don't want it to be automounted at startup or mounted by anything I'm not aware of because else it would kill the purpose of being protected against (amongst other things) rm -rf /. Here's a piece of my fstab:

#Backups
UUID=... /mnt/backups  ext4 nouser,noauto,ro,suid,dev,exec,async 0 2

This works with command line mount actions but as a normal user if I click on the drive in Dolphin it still gets mounted although while respecting read only mode, which makes it less harmful.

How can I totally prevent dolphin from doing its thing on its own with my partitions? I'm on a really fresh Kubuntu 14.04.

Note: I read this, but the asker said in a comment that he ran into the same issue.

share|improve this question

1 Answer 1

Create a udev rules to ignore that hard drive.

  1. Check drive serial number, using Disks utility (GUI)

    get drive serial number

    or using CLI:

    udevadm info --attribute-walk --name=/dev/sdb
    
  2. Write a rule files

    sudo nano /etc/udev/rules.d/90-hide-disks.rules

    ATTRS{serial}=="0000000000", ENV{UDISKS_IGNORE}="1"
    

    Replace 0000000000 with real drive serial number

  3. Reload/Trigger the new rules

    sudo udevadm control --reload-rules
    sudo udevadm trigger
    

References:

share|improve this answer
    
Well there's already a gui option in dolphin to hide the drive, and I could work around by assigning a failing mounting point to prevent automounting altogether, but do you have any idea on why dolphin bypasses fstab and how to cleanly fix that? –  nathdwek Jun 23 at 15:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.