/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 |
You might wanna check out one of MasterC's replies on a similar subject here.
|
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 |
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. |
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 |
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 06:29 PM. |