SlackwareThis Forum is for the discussion of Slackware 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 have a bunch of USB storage devices that I use and switch around, and sometimes I have trouble getting them to mount correctly and with the right user privileges. So I was going to make a change to my /etc/fstab to try to fix it. But I didn't want to mess anything up, so thought I'd run it by those of you who know more about what they're doing than I do.
Basically, adding
Code:
/dev/sdc1 /external1 auto umask=000 0 0
/dev/sdd1 /external2 auto umask=000 0 0
/dev/sde1 /external3 auto umask=000 0 0
/dev/sdf1 /external4 auto umask=000 0 0
to the end of fstab. already did mkdir /external# for each.
If I understand what I did (I only have a faint hope that I do), then this should automatically mount the first four additional harddrives that are plugged in at any given time and in whatever order, and allow the currently logged in user (in fact the only non-root user) full read/write access, and the four mountpoints are not tied to any particular drive - any plugged in usb storage can fill one of the slots.
Is this right?
If not, what do I need to do to this to make it do what I just described?
edit: wanted to add that sda and sdb are my computer's two internal drives and are already in fstab
I'm doubtful about that umask=000 My reading of man mount is that it is an option for FAT and msdos. While your USB devices may well be formatted for FAT, IMHO it would be better to use a file-system independent option like users, user, or group, which would let you use ext3 or whatever as well. See man mount, and maybe think about whether you want to leave the permissions as open as your umask=000 implies.
I was just making a guess with umask=000, it was the default for an external that I added automatically when I first installed slackware.
so if I changed umask=000 to user=lain, would that mean that a user logged in as lain would have full access and automatically mount, but no other users would? or do I just use " user " without anything else?
You would want to mount by uuid. If you search this forum for uuid you should come up with more than enough info.
The reason I'd go with uuid is - you can not guarantee which /dev/sd$ the externals would receive. uuid is a (Universally) Unique IDentifier. Each drive has a different uuid.
I'm not trying to put specific devices on specific mountpoints. the intention is that any usb storage that I might plug in will automatically mount to one of those points.
I was just making a guess with umask=000, it was the default for an external that I added automatically when I first installed slackware.
so if I changed umask=000 to user=lain, would that mean that a user logged in as lain would have full access and automatically mount, but no other users would? or do I just use " user " without anything else?
Sounds as though you're shooting from the hip again. The man pages make fascinating reading, and they're also factual. Which is probably the origin of the expression "Read The Fantastic/Factual/Fascinating/Free (or whatever) Manual". Also it's often quicker than waiting for someone like me to give you the wrong answer. And if _you_ get it wrong, well, at least it's your own mistake; you can paint it red, and be proud of it.
I suggest you put "user" as option in fstab, and do:
"user" means that the owner can mount the partition - but in any case unless you put "noauto" they should be mounted automagically. I think. (How can you tell if I know what I'm talking about? man impert?)
You would want to mount by uuid. If you search this forum for uuid you should come up with more than enough info.
The reason I'd go with uuid is - you can not guarantee which /dev/sd$ the externals would receive. uuid is a (Universally) Unique IDentifier. Each drive has a different uuid.
Look into gid= and uid= for the mount options.
So after a little research, I came up with the following:
This is for my movie and music harddrive.
-It's UUID is that string
-/external.media is the mountpoint I want it on
-ntfs-3g is its filesystem
-auto,user,rw means that it will automatically mount with full read/write privileges for any user.
Is this right? And if I change all the /dev/xxx entries for my internal partitions over to UUID=xxxxxxxxxxx, will it function exactly the same?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.