Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
/etc/fstab no such file or directory
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
theplatypus
n00b
n00b


Joined: 03 Sep 2002
Posts: 44

PostPosted: Sat Sep 07, 2002 5:35 pm    Post subject: /etc/fstab no such file or directory Reply with quote

Hey,
When I try to configure /etc/fstab it returns with
Bash: /etc/fstab:: no such file or directory.

Do I need to make a file or directory? To make a /etc/fstab directory would it look like this?

Code:
 # mkdir /etc/fstab


Or if I need to make a /etc/fstab file would it look like this?

Code:
 mkfile /etc/fstab


If the above is correct. I would then edit it with

Code:
#  nano -w /etc/fstab


Please tell me I'm on the right track.
Back to top
View user's profile Send private message
RK
n00b
n00b


Joined: 07 Sep 2002
Posts: 8
Location: Zurich, Switzerland

PostPosted: Sat Sep 07, 2002 6:17 pm    Post subject: Reply with quote

/dev/fstab is an ASCII text file. It contains a list of all of the filesystems you want mounted, whether or not this should be done automatically, where to mount them (mount point), what to mount (block device), how to mount it (filesystem to use) and any options that should be used when mounting it.

Use 'touch /dev/fstab' to create it. Make sure it belongs to root, and it has the permissions u+rw go+r (that's 644). Then you can edit it.
Back to top
View user's profile Send private message
theplatypus
n00b
n00b


Joined: 03 Sep 2002
Posts: 44

PostPosted: Sat Sep 07, 2002 6:35 pm    Post subject: Reply with quote

Quote:
dev/fstab is an ASCII text file. It contains a list of all of the filesystems you want mounted, whether or not this should be done automatically, where to mount them (mount point), what to mount (block device), how to mount it (filesystem to use) and any options that should be used when mounting it.

Use 'touch /dev/fstab' to create it. Make sure it belongs to root, and it has the permissions u+rw go+r (that's 644). Then you can edit it.


Since this no user has been added would it already belong to root? How would I go about giving it permissions?
Back to top
View user's profile Send private message
Iturbide
n00b
n00b


Joined: 28 Jun 2002
Posts: 27

PostPosted: Sat Sep 07, 2002 6:43 pm    Post subject: Reply with quote

Hi,

Yes, it's a simple ascii file. Here are the permissions.
-rw-r--r-- 1 root root 1237 Sep 7 17:38 /etc/fstab

To give you an idea, this is what mine looks like:

/dev/hda6 /boot ext3 noatime 1 1
/dev/hdc5 / ext3 noatime 1 1
/dev/hda7 /home ext3 noatime 1 1
/dev/hda4 none swap sw
/dev/cdroms/cdrom0 /mnt/cdrom iso9660 noauto,ro,user 0 0
proc /proc proc defaults 0 0
/dev/hda1 /mnt/win-c vfat uid=500,gid=500
/dev/hdc1 /mnt/win-d vfat uid=500,gid=500
# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for
#rojo:/music /nfs/music nfs nfsvers=3,rsize=32768,wsize=32768
#rojo:/home /nfs/home nfs nfsvers=3,rsize=32768,wsize=32768
# POSIX shared memory (shm_open, shm_unlink). Adding the following
# line to /etc/fstab should take care of this:
# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will use almost no
# memory if not populated with files)

tmpfs /dev/shm tmpfs defaults 0 0

For starters, I think the simplest thing would be to look at what you've got in /etc/mtab. That's the file with info on what you've got mounted, and how:
ene@beppie rene $ cat /etc/mtab
/dev/hdc5 / ext3 rw,noatime 0 0
proc /proc proc rw 0 0
none /dev devfs rw 0 0
tmpfs /mnt/.init.d tmpfs rw,mode=0644,size=1024k 0 0
/dev/hda6 /boot ext3 rw,noatime 0 0
/dev/hda7 /home ext3 rw,noatime 0 0
/dev/hda1 /mnt/win-c vfat rw,uid=500,gid=500 0 0
/dev/hdc1 /mnt/win-d vfat rw,uid=500,gid=500 0 0
tmpfs /dev/shm tmpfs rw 0 0
automount(pid5642) /misc autofs rw,fd=4,pgrp=5642,minproto=2,maxproto=3 0 0
automount(pid5658) /net autofs rw,fd=4,pgrp=5658,minproto=2,maxproto=3 0 0
rojo:/var /net/var nfs rw,nfsvers=3,rsize=8192,wsize=8192,hard,addr=192.168.150.1 0 0
rojo:/music /net/music nfs rw,nfsvers=2,rsize=8192,wsize=8192,hard,addr=192.168.150.1 0 0

You see the similarities? Don't bother with my automounts and nfs stuff. You can look into that later.

So once you're up and running, just become root, and do a:
cat /etc/mtab >/etc/fstab

and you should have a working copy.
Back to top
View user's profile Send private message
simcop2387
Apprentice
Apprentice


Joined: 14 Aug 2002
Posts: 200
Location: Galactic Sector ZZ9 Plural Z Alpha

PostPosted: Sat Sep 07, 2002 6:46 pm    Post subject: Reply with quote

you would change the permissions by first logging in as root and type this

Code:
chown root:root /etc/fstab
chmod 0644 /etc/fstab


what this first command does, is make sure that root owns the file
the second command changes the permissions to be correct (644) as RK said
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum