Why won't my usb hard drive auto mount when i plug it in
Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Why won't my usb hard drive auto mount when i plug it in
Hello, this is really getting frustrating.
I have a usb hard drive that i keep turned off except when i want to use it. When i turn it on, i get a nice error saying the system failed to mount my drive cause i am not privileged.
my fstab has this line in it so that it mounts where i want it when i turn it on:
UUID=25bb9ecc-5d12-45a0-b4ef-3d84a8c5e922 /media/120GB/ xfs auto,users 0 0
also, i am able to go to a command line once the drive is turned on and just type in: "mount /media/120GB/" and the drive mounts nicely. So why do i get this error if i AM able to mount the drive without doing any sort of sudo or su command? I don't want to have to type in a command every time i want to use the drive. It's crazy.
I think you should delete that line from fstab. It worked for me.
I concluded (probably erroneously) that the reason for the auto mount to fail is that at boot time the mount point gets allocated so creating a new mount point requires root access.
You'll need to create a custom rule telling udev where you want the drive mounted. Have a look at this page from Linux From Scratch. It should help you create a rule specific to what you're trying to do.
Last edited by Total-MAdMaN; 10-01-2008 at 12:04 PM.
udev doesn't mount devices, it's what creates the files in /dev that say what devices are installed and how they can be used. By creating rules you can do different things with the devices, e.g. changing the directory a hard drive is mounted to.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.