LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-15-2010, 03:56 PM   #1
Cultist
Member
 
Registered: Feb 2010
Location: Georgia
Distribution: Slackware64 14.2
Posts: 779

Rep: Reputation: 107Reputation: 107
are these valid /etc/fstab changes?


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

Last edited by Cultist; 12-15-2010 at 03:58 PM.
 
Old 12-15-2010, 04:22 PM   #2
impert
Member
 
Registered: Feb 2009
Posts: 282

Rep: Reputation: 54
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.
 
Old 12-15-2010, 04:27 PM   #3
Cultist
Member
 
Registered: Feb 2010
Location: Georgia
Distribution: Slackware64 14.2
Posts: 779

Original Poster
Rep: Reputation: 107Reputation: 107
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?
 
Old 12-15-2010, 04:58 PM   #4
disturbed1
Senior Member
 
Registered: Mar 2005
Location: USA
Distribution: Slackware
Posts: 1,133
Blog Entries: 6

Rep: Reputation: 224Reputation: 224Reputation: 224
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.
 
Old 12-15-2010, 05:57 PM   #5
Cultist
Member
 
Registered: Feb 2010
Location: Georgia
Distribution: Slackware64 14.2
Posts: 779

Original Poster
Rep: Reputation: 107Reputation: 107
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.
 
Old 12-16-2010, 06:26 PM   #6
impert
Member
 
Registered: Feb 2009
Posts: 282

Rep: Reputation: 54
Quote:
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:
Code:
su
chown -R lain:lain /external1 /external2 /external3 /external4
chmod -R 755 /external1 /external2 /external3 /external4
exit
"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?)
 
Old 12-19-2010, 08:05 PM   #7
Cultist
Member
 
Registered: Feb 2010
Location: Georgia
Distribution: Slackware64 14.2
Posts: 779

Original Poster
Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by disturbed1 View Post
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:
Code:
UUID=F8D8CF61D8CF1D2E   /external.media ntfs-3g auto,user,rw      0       0
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?
 
Old 12-20-2010, 02:01 AM   #8
chickenjoy
Member
 
Registered: Apr 2007
Distribution: centos,rhel, solaris
Posts: 239

Rep: Reputation: 30
Quote:
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?
Those internal partitions don't change address often... if not ever; so we usually don't recommend changing what already works.
 
Old 12-20-2010, 02:53 AM   #9
disturbed1
Senior Member
 
Registered: Mar 2005
Location: USA
Distribution: Slackware
Posts: 1,133
Blog Entries: 6

Rep: Reputation: 224Reputation: 224Reputation: 224
Quote:
Originally Posted by chickenjoy View Post
Those internal partitions don't change address often... if not ever; so we usually don't recommend changing what already works.
Agreed, no real reason to use UUID on your internal drives. Be sure to set the proper permissions on /external.media as well.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
HAL, and fstab, I want my old fstab back thllgo Linux - Server 2 08-10-2007 10:11 AM
Suse won't boot after fstab changes - fstab not editable baking-a-77 Linux - Newbie 10 06-02-2007 10:51 AM
fstab problem: mount: can't find dvd in /etc/fstab or /etc/mtab Nikon01 Slackware 5 11-17-2006 06:15 AM
(version 5.1 chapter 08 fstab) vs (man fstab) rgiggs Linux From Scratch 2 06-03-2004 05:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration