Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
So I finally learned how to get my USB memory key to work in linux, for other newbies, it's easier than you might think!
mount -t vfat /dev/sda1 /target-foldername-here
You must specify the filesystem of the key to allow linux to use it, but this will allow both reading and writing to the drive..
So, I made a script named "stick" to enter the mount command and echo success or failure, which works fine, except for one problem.
What I can't deduce though, is how to use this command when not in root... Other accounts get a message that they are not allowed to use mount...
What am I overlooking to allow universal usage of this script/command? I'm only working on my home workstation, so I'm not worried about security problems, just trying to learn what the problem is, and fix it.
Anyone know what this mount problem means, and how to fix it, aside from giving the other account root privilege?
Another solution would be to ass a line to your fstab:
Code:
/dev/sda1 /media/pendrive vfat noauto,rw,user 0 0
noauto - do not try to mount the device at startup
rw - mount the device as read/write
user - allow non-root users to mount the device (making them the effective owner of the device)
After adding that line, your mount command does not need to be as verbose. A simple "mount /dev/sda1" or "mount /media/pendrive" will work, because mount can get the missing pieces from the /etc/fstab line.
why is necessary to use "vfat" as filesystem? i would suggest "auto". if you have something in the card considering MSWindows stuff and you get problems to mount, then you should try changing to "vfat".
Originally posted by slackie1000 why is necessary to use "vfat" as filesystem? i would suggest "auto".
Using "auto" is best when the media you are using has a tendency to change (for instance, floppy disks can be vfat, ext2, or whatever) and when the system doesn't have a problem detecting what type of filesystem it is.
Unfortunately, in this case, C0Y0TE already mentioned in the original post that specifying the filesystem was required for the mount command to work. I can also say that I have a similar problem. Even though vfat support is compiled into the kernel (i.e. not a module), I still must specify the filesystem when trying to mount my USB stick. If auto works on someone else's system, then I'd suggest keeping it that way. However, the filesystem is not likely to change on the stick. So there's no loss in leaving it as vfat.
ok! clear now, Dark_Helmet!
i misunderstood the first post. i thought he was not happy with the fact that it is necessary the filesystem specification.
my bad.
The literal "vfat" filetype specificiation may not necessarily be required, it was a universal solution we worked up for the people in my Linux OS class (who have any number of brands of USB stick, and EVERY one of them worked with this solution.)
I'll get to trying out the fstab thing, that sounds like the best solution in the long run, and definutely need to look up sudo as well, as I am not entirely sure what it is, although it looks like its similar the su, or at least based on it..? (correction, I looke dup sudo, I guess it would work, but I'd rather allow all users access to the mount comman universally, nstead of adding one at a time to a special list..)
Thanks again, now if only peple would answer my triple-boot questions as helpfully LOL.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.