Results 1 to 6 of 6

Thread: Preventing USB disks auto-mounting

  1. #1
    Join Date
    May 2008
    Beans
    21

    Preventing USB disks auto-mounting

    I'm running OS X in VMWare Player on Ubuntu 12.04LTS and have a couple of USB disks (one with two partitions) attached, formatted HFS+.

    When I boot the machine - or exit/reboot OS X - Ubuntu mounts the disks. When OS X starts it "steals" them from Ubuntu. I want to stop Ubuntu auto-mounting them (but with the ability to manually mount them should I wish).

    I've been looking into how to do this and think I've got it figured out but would like confirmation that I understand it correctly.

    I reckon I should follow the instructions here to ensure the disks always get assigned the same block device names (/dev/xxx), then I add entires for the devices to /etc/fstab with the `noauto' option.

    Have I got that right?

    Thanks.

  2. #2
    Join Date
    Dec 2011
    Beans
    Hidden!

    Re: Preventing USB disks auto-mounting

    i think the link you gave does not apply.
    comment out everything in your fstab that is related to those external drives (whether you added it or it was already there), reboot and see if you get the desired behavior.
    if they still mount automatically, it must be an automount setting usually accessible through the file managers preferences.

    if you're not sure, post your /etc/fstab here.

    cheers,
    o.
    please stick to the facts and be kind.
    what else can you do when you don't know each other.
    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . my avatar

  3. #3
    Join Date
    May 2008
    Beans
    21

    Re: Preventing USB disks auto-mounting

    Quote Originally Posted by ohnonot View Post
    i think the link you gave does not apply.
    comment out everything in your fstab that is related to those external drives (whether you added it or it was already there), reboot and see if you get the desired behavior.
    There are no entries in /etc/fstab for these drives (which is what I'd expect).

  4. #4
    Join Date
    Apr 2012
    Beans
    7,256

    Re: Preventing USB disks auto-mounting

    Have you checked that (launcher -->) Removable Drives and Media --> Storage tab --> 'Mount removable drives when hotplugged' is unchecked?

    If that doesn't do it, try

    Code:
    gsettings set org.gnome.desktop.media-handling automount false
    (or equivalently with dconf if you have the dconf-tools package)

    Code:
    dconf write /org/gnome/desktop/media-handling/automount false

  5. #5
    Join Date
    May 2008
    Beans
    21

    Re: Preventing USB disks auto-mounting

    Quote Originally Posted by steeldriver View Post
    Have you checked that (launcher -->) Removable Drives and Media --> Storage tab --> 'Mount removable drives when hotplugged' is unchecked?

    If that doesn't do it, try

    Code:
    gsettings set org.gnome.desktop.media-handling automount false
    (or equivalently with dconf if you have the dconf-tools package)

    Code:
    dconf write /org/gnome/desktop/media-handling/automount false
    It seems that I'd already done what I wanted to do without realising.

    I'd set automount and automount-open to false (using dconf-editor) but the drives still appeared in Nautilus under devices when OS X wasn't running. What I hadn't noticed was that there was no eject button next to them so although Ubuntu could see the drives it hadn't actually mounted them. I hadn't expected them to appear in Nautilus unless they were mounted.

    What further confused me is that VMWare Player was still popping up a dialogue saying the drives were in use by the host.

    So, it seems it is now working as I want.

    Thanks for all the help guys

  6. #6
    Join Date
    May 2008
    Beans
    21

    [SOLVED] Re: Preventing USB disks auto-mounting

    .

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •