LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 08-14-2003, 09:17 PM   #1
narinder31
LQ Newbie
 
Registered: Aug 2003
Posts: 5

Rep: Reputation: 0
Question /etc/fstab incorrect


Hi,
I mount as follows in /etc/fstab

/dev/hda2 /opt/oracle ext2 auto,uid=501,gid=501,umask=000 0 0

But it fails with following message
mount: wrong fs type, bad option, bad superblock on /dev/hda2, or too many mounted file systems

I want the uid=501 of gid=501 to be the owner of this partition and I dont want to set this manually everytime I restart my PC.

I am able to do this manually, first running mount and then chown. But how to do it in fstab???

Any help appreciated
Regards,
Narinder
 
Old 08-14-2003, 09:30 PM   #2
Azmeen
Senior Member
 
Registered: May 2003
Location: Malaysia
Distribution: Slackware, LFS, CentOS
Posts: 1,307

Rep: Reputation: 46
You might wanna check out one of MasterC's replies on a similar subject here.
 
Old 08-14-2003, 11:45 PM   #3
narinder31
LQ Newbie
 
Registered: Aug 2003
Posts: 5

Original Poster
Rep: Reputation: 0
Hi,
Thanks for your reply. I checked the link you gave, but still this thing is not working. Still the same error

When we install RH, we get /opt. In this I create a directory oracle. so the structure is /opt/oracle.
Now I have another harddisk, with partition. Partition A is NTFS windows XP and for partition B I want to mount /opt/oracle. and I want my user oracle(uid=501) belonging to group oinstall(gid=501) be the owner.
I did
mkfs.ext3 /dev/hda2 but still same error even after restart
then I did
mke2fs /dev/hda2 but still same error after restart.
Even if I try mount -a after making changes, same error as above.
I also tried mke2fs with -c, no errors were reported.
I am able to mount this thing manually and chown to oracle.
I tried with many options in fstab, but can't get it working.
The present one in fstab is as below:
/dev/hda2 /opt/oracle ext3 auto,uid=501,gid=501,mask=000 0 0
Instead of auto, I tried default, and instead of mask I also did umask.
I dont know the correct significance of using mask/umask, but just tried as it was mentioned on various newsgroup.
Regards,
Narinder
 
Old 08-14-2003, 11:51 PM   #4
Zb7
Member
 
Registered: Jul 2003
Location: Cincinnati, Ohio
Distribution: Slackware 9 (current), Gentoo 1.4, Redhat shrike
Posts: 86

Rep: Reputation: 15
Since you're using the /etc/fstab entry as a ext filesystem the command for that (i think) is


mke2fs -j /dev/hda2


I'm fairly certain this will work. If you're going to make it a ext2 partition you should probably mount it as such in fstab.




By the way, the significance of umask is to set permissions basically on the drive when it is mounted. The numbering system is the reverse of CHMOD, so beware. a umask=000 will give all users complete access over that drive.
 
Old 08-15-2003, 12:23 AM   #5
narinder31
LQ Newbie
 
Registered: Aug 2003
Posts: 5

Original Poster
Rep: Reputation: 0
Hi,
I did
mkfs -t ext2 -j /dev/hda2 and this formats it to ext3
but still same error,
So now I changed my entry in fstab to
/dev/hda2 /opt/oracle ext3 defaults 0 0
and this thing works.
But when I insert uid, gid etc, it fails with the same error, how can I do it.

Regards,
Narinder
 
Old 08-15-2003, 02:52 AM   #6
narinder31
LQ Newbie
 
Registered: Aug 2003
Posts: 5

Original Poster
Rep: Reputation: 0
Hi,
I got it working
mkfs -t ext2 -j /dev/hda2 formats partition to ext3.
Add following to /etc/fstab file
/dev/hda2 /opt/oracle ext3 defaults 0 0
And then change owner
chown -R oracle.oinstaller /opt/oracle
And it will be done.
Thanks
Narinder
 
  


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 problem: mount: can't find dvd in /etc/fstab or /etc/mtab Nikon01 Slackware 5 11-17-2006 06:15 AM
Incorrect Mouse, Incorrect Keymap, and Trapped in X Kenji Miyamoto Debian 8 08-24-2005 02:42 PM
newbie vs fstab. fstab wins :( blop Linux - Newbie 3 01-07-2005 05:54 AM
Is there anything incorrect or "dangerous" in my fstab? Underhill Debian 6 09-30-2004 07:47 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 - Newbie

All times are GMT -5. The time now is 08:51 AM.

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