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 |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
08-14-2003, 09:17 PM
|
#1
|
LQ Newbie
Registered: Aug 2003
Posts: 5
Rep:
|
/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
|
|
|
08-14-2003, 09:30 PM
|
#2
|
Senior Member
Registered: May 2003
Location: Malaysia
Distribution: Slackware, LFS, CentOS
Posts: 1,307
Rep:
|
You might wanna check out one of MasterC's replies on a similar subject here.
|
|
|
08-14-2003, 11:45 PM
|
#3
|
LQ Newbie
Registered: Aug 2003
Posts: 5
Original Poster
Rep:
|
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
|
|
|
08-14-2003, 11:51 PM
|
#4
|
Member
Registered: Jul 2003
Location: Cincinnati, Ohio
Distribution: Slackware 9 (current), Gentoo 1.4, Redhat shrike
Posts: 86
Rep:
|
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.
|
|
|
08-15-2003, 12:23 AM
|
#5
|
LQ Newbie
Registered: Aug 2003
Posts: 5
Original Poster
Rep:
|
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
|
|
|
08-15-2003, 02:52 AM
|
#6
|
LQ Newbie
Registered: Aug 2003
Posts: 5
Original Poster
Rep:
|
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
|
|
|
All times are GMT -5. The time now is 05:59 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|