louiscar
Posts: 19
Joined: Wed May 18, 2016 3:08 am

Raspian - USB drives are automounting

Wed May 18, 2016 3:16 am

Hi,

I just bought a hub to plug in my drives to the Raspberry pi 2 with Raspian.
I discovered that as I was getting an error trying to mount the drive I found they were being mounted automatically under /media/ [UID]

I'd prefer not to have this feature as 1) it's listed under a long uid number and 2) I have set up mounts for my NAS drive in another area so would prefer to have them all in the same place. I can automate this using fstab however, I can't find out what is doing the automounting.

I don't have 'usbmount' installed so it must be something else.

Can any one enlighten me on how to either stop this or configure it or remove it?

DirkS
Posts: 10362
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Raspian - USB drives are automounting

Wed May 18, 2016 3:36 am

louiscar wrote:I don't have 'usbmount' installed so it must be something else.

Can any one enlighten me on how to either stop this or configure it or remove it?
It's the GU. More precisely: it's the file manager, pcmanfm.
To disable it, open the filemanager and change the preferences (Edit / Preferences). It should be easy to find the exact settings)

louiscar
Posts: 19
Joined: Wed May 18, 2016 3:08 am

Re: Raspian - USB drives are automounting

Wed May 18, 2016 4:06 am

Thanks Dirk,

I just found out it is part of Jessy now. Thanks for telling me where to get at it. I'll have to connect up to the desktop. I'm using SSH at the moment remotely.

It seems that unmounting and then setting the drives up in fstab will do it but I did wonder if it would conflict so turning it off is probably best.

regards

DirkS
Posts: 10362
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Raspian - USB drives are automounting

Wed May 18, 2016 4:11 am

louiscar wrote:I just found out it is part of Jessy now
Nothing to do with Jessie. It also happened in Wheezy.
It happens because the default boot mode is set to boot to GUI.
If you change to boot to CLI (with or without autologin) USB drives should not be automounted until you start the GUI

louiscar
Posts: 19
Joined: Wed May 18, 2016 3:08 am

Re: Raspian - USB drives are automounting

Wed May 18, 2016 4:56 am

DirkS wrote: If you change to boot to CLI (with or without autologin) USB drives should not be automounted until you start the GUI
Sorry I misunderstood then. I understand now. I prefer to leave the GUI in place as I do use the desktop at times but it seems that setting the drives in fstab to mount overrides it although I've not booted yet and then plugged the drive in. I merely booted with the drives connected.

Edit: works both ways so that's great and in fact drives that I haven't defined by UID get mounted anyway so it's the best of both worlds :-)

Return to “Beginners”