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.
i would like to make a script to mount and unmount an external 200 GB hard driver. I have no problem mounting it as superuser with "mount -t vfat /dev/sda1 /mnt", but i can't unmount it ("umount /mnt") it just says "device is busy" twice.
So i have two questions:
1. How can i unmount the hard driver if when it's not in use it just says it's busy.
2. What mount command makes it so it mounts with read/write privilages for all?
The things is that i don't want to use the hard drive 24/7 so i just want to be able to mount it with a script giving full read/write access. I don't want to modify the fstab because if it's off at boot time, i'll get an error.
Right now, i don't have any program actively controlling the hard drive, but could gkrellm do something to it?
Thanks.
if you add the noauto option to the fstab entry then the OS wouldn't try to mount it at start up. Then you could just use the mount command to mount it when you need it.
didn't know that, so once you do that, you just do mount /dev/sda1 /mnt and it will mount there, even though you wrote it on the fstab right?
Thanks i'll try that.
Thats how it works, noauto specifes not ot mount it at boot, but you can still mount it the old fashoned way, you could probably use hotplug to detect the device and mount it when its inserted.
ok thanks i got it working, i'll look into using hotplug, i know you can modify the detect scripts to make it do what it wants. I still have problems unmounting though, it will rarely unmount, so i just power the hdd off most of the time if i'm sure it's not in use. Thanks.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.