Results 1 to 6 of 6
I came across this strange looking file in /etc called fstab. There are different enteries in which i understand partially. Could anyone please explain the last three coloums and whar ...
- 04-04-2009 #1
Entries in fstab
I came across this strange looking file in /etc called fstab. There are different enteries in which i understand partially. Could anyone please explain the last three coloums and whar different values can be set in them ( like auto,noauto,user etc....)
- 04-04-2009 #2Linux Guru
- Join Date
- Nov 2007
- Location
- Córdoba (Spain)
- Posts
- 1,513
In this file you can define how and where to mount your drives.
There are six fields, not three, on each line. First, read the man page for fstab, there are explained those six fields and many more things. Then, come back here and ask what you don't understand.
You should also read the man page for "mount", because the options you said are options for this command, for mount, and some of them depend on the fs you are using.
- 04-04-2009 #3
ok i'll look at the man pages right away....
- 04-04-2009 #4Linux Guru
- Join Date
- Nov 2007
- Location
- Córdoba (Spain)
- Posts
- 1,513
Nice. Don't hesitate to ask here as much as you need while you read it. At the beginning it might seem a bit cryptic until you become familiar with all the terminology, but it's a short and clear man page.
- 04-04-2009 #5
ok I just went through the man pages understood most of the part but I didn't embibe the last coloum. It says the file system order is checked at reboot time and default value is given as zero. What is the use of this col and where to use it?
- 04-04-2009 #6Linux Guru
- Join Date
- Nov 2007
- Location
- Córdoba (Spain)
- Posts
- 1,513
This is the last column/field in every line on your fstab file, and it has a numeric value, which usually is 0, 1 or 2. A line ending in 1 means that the drive should be checked as soon as possible, the first. This is usually reserved for the root partition, and it is this way because that partition is the first one you need to be able to boot, hence it needs to be sane.
The rest of partitions are assigned usually a 2, unless you don't want to check them, in that case, they are assigned a 0.
For example:
This means: mount /dev/sda1 as the root fs (in /), type ext3, with the default mount options, and check it the first one. Mount /dev/sda2 in /home, as ext3, with the noatime option and check it after / has been checked. Mount /dev/sda3 in /tmp, as ext2 and don't check it when booting at all.Code:/dev/sda1 / ext3 defaults 0 1 /dev/sda2 /home ext3 noatime 0 2 /dev/sda3 /tmp ext2 defaults 0 0


Reply With Quote
