LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices

Reply
 
Search this Thread
Old 12-01-2006, 01:25 AM   #1
quartslove
LQ Newbie
 
Registered: Nov 2006
Posts: 14

Rep: Reputation: 0
Talking FC5 - Wrong with /etc/fstab


Hi everyone !

How can I mount the data from one of my disk automaticly everytime I turn on my FC5 ? I used the 'mount' command to mount data and used vi to edit /etc/fstab. But it not seem work.
 
Old 12-01-2006, 01:27 AM   #2
nadroj
Senior Member
 
Registered: Jan 2005
Location: Canada
Distribution: ubuntu
Posts: 2,539

Rep: Reputation: 58
how does it 'not work'? error messages during boot? permission problems? list your entire /etc/fstab file and specify which entry you added
 
Old 12-01-2006, 01:39 AM   #3
b0uncer
Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
To mount your second harddrive's (hdb) third partition (number 3) to an existing directory /media/hdb3, detecting the filesystem automatically if possible (auto) and setting it to be auto-mounted during boot (auto), read-write (rw), let normal users unmount it (users) and maybe even let anybody read and write to it (umask=022), you would write this line to your fstab:

Code:
/dev/hdb3 /media/hdb3 auto auto,rw,users,umask=022  0  0
Edit the above example to suit your needs (correct device file, mountpoint and options -- if you know the filesystem, like vfat or ext3, you can specify it instead of the first auto (third column). Remember that without installing special tools (and maybe even then) you cannot write to an NTFS partition (some additional software may enable you to do so, but generally it doesn't work well).

And remember to be root when editing fstab.

EDIT: Using umask=022 to let anybody access the mount point is generally a bad idea, I would only use it for usb sticks or such stuff, but they're usually auto-mounted anyway with new distributions so if ou can, don't use 022. Instead you could umask some specific user account (or use group instead) to let only that user (or group, if done that way) access the mount point.

Last edited by b0uncer; 12-01-2006 at 01:42 AM.
 
Old 12-01-2006, 01:40 AM   #4
quartslove
LQ Newbie
 
Registered: Nov 2006
Posts: 14

Original Poster
Rep: Reputation: 0
Hi nadroj !

I used: #mount /dev/hda5 /mnt/data.
After that I put the info into the fstab file with:
/mnt/data /dev/hda5 vfat defaults 0 0
The system didn't show anything wrong. But when I restart my computer again. I must use mount again to see my file "data". I want the mounted file start automaticly. I did anything wrong here?
 
Old 12-01-2006, 01:45 AM   #5
nadroj
Senior Member
 
Registered: Jan 2005
Location: Canada
Distribution: ubuntu
Posts: 2,539

Rep: Reputation: 58
by referring to b0uncer's post you should be able to solve it! hope it works
 
Old 12-01-2006, 02:05 AM   #6
quartslove
LQ Newbie
 
Registered: Nov 2006
Posts: 14

Original Poster
Rep: Reputation: 0
Thank all !
Finally I did it. I just edit my /etc/fstab with your instructions and restart my computer. And Successful result.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
fstab in FC5? Red Squirrel Linux - Software 6 07-15-2006 10:09 PM
Whats wrong with this line of fstab Boffy Linux - General 4 02-25-2005 04:32 PM
what is wrong with this /etc/fstab entry? d1l2w3 Linux - Hardware 10 01-31-2005 11:15 PM
fstab error in line 11, what's wrong? EPa Linux - Networking 4 03-06-2004 10:46 AM
What am I doing wrong in my Fstab? Mounting for Users jimdaworm Slackware 4 11-07-2003 01:46 PM


All times are GMT -5. The time now is 09:04 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration