Results 1 to 9 of 9

Thread: Disable automount for USB drive

  1. #1
    Join Date
    Feb 2010
    Beans
    7

    Disable automount for USB drive

    Ubuntu v9.10
    I have a damaged HDD which I want to clone using ddrescue.
    I want to attach it via USB connection, otherwise Linux hangs on startup.
    I don't want the O/S to attempt to mount the drive.
    I would be happy to disable mounting of all external USB drives.
    How can I achieve this?
    Last edited by New2Ubunt; February 19th, 2010 at 02:53 AM.

  2. #2
    Join Date
    Oct 2008
    Location
    philippines
    Beans
    618
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Disable automount for USB drive

    ...open a browser window (places), clik edit>preference>media...check never prompt or start program on media insertion.

  3. #3
    Join Date
    Feb 2010
    Beans
    7

    Re: Disable automount for USB drive

    Thanks for your response.

    I tried this, and I also unchecked Browse media when inserted
    The partition still seems to have been mounted - icon on Desktop, folder in /media
    This is not while using the damaged drive, I'm using a different USB ext HDD to see what happens.

  4. #4
    Join Date
    Jul 2007
    Beans
    419
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Disable automount for USB drive

    Alt + F2, then type in gconf-editor, and hit Enter. When that window comes up, navigate to apps-->nautilus-->preferences, then uncheck media automount

  5. #5
    Join Date
    Feb 2010
    Beans
    7

    Re: Disable automount for USB drive

    Thanks very much, rbc.

    That worked fine.

  6. #6
    Join Date
    Oct 2008
    Location
    philippines
    Beans
    618
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Disable automount for USB drive

    ...thanks as well, rbc

  7. #7
    Join Date
    Aug 2010
    Beans
    1

    Re: Disable automount for USB drive

    Is there a way to turn this off when the Desktop is not installed, running command line only. Ubuntu as server 10.4
    me scenario.
    I have a Smart Card reader that uses a USB device that is set as a Serial reader (virtual via USB) works great normally, but if I reboot at startup with a card in the reader it fails and it won't work unless i reboot without the card in the reader. once its rebooted, insert the card and it starts working again. Hence the need to stop the automount as it is trying to mount a smart card.

  8. #8
    Join Date
    Feb 2010
    Beans
    8

    Re: Disable automount for USB drive

    Quote Originally Posted by tugsy View Post
    Is there a way to turn this off when the Desktop is not installed, running command line only. Ubuntu as server 10.4
    A bit late to the party, but I just had to do this myself. You can apply the above solution from the CLI with gconftool-2 --set /apps/nautilus/preferences/media_automount --type bool false. This will only work if it's indeed Nautilus (or Gnome Volume Manager/whatever they use this year) what is mounting your card. If you don't have gconf2 installed, then something else is doing it (also through dbus or directly in fstab?), and this solution won't help you.

  9. #9
    Join Date
    Jan 2007
    Location
    Portland/Corvallis, OR
    Beans
    136
    Distro
    Ubuntu

    Re: Disable automount for USB drive

    Quote Originally Posted by byStanderone View Post
    ...open a browser window (places), clik edit>preference>media...check never prompt or start program on media insertion.
    Yahtzee! Thx.

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
  •