Find the answer to your Linux question:
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 ...
  1. #1
    Linux User vickey_20's Avatar
    Join Date
    Mar 2009
    Location
    Mumbai, India
    Posts
    493

    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....)

  2. #2
    Linux Guru
    Join Date
    Nov 2007
    Location
    Córdoba (Spain)
    Posts
    1,513
    Quote Originally Posted by vickey_20 View Post
    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....)
    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.

  3. #3
    Linux User vickey_20's Avatar
    Join Date
    Mar 2009
    Location
    Mumbai, India
    Posts
    493
    ok i'll look at the man pages right away....

  4. #4
    Linux 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.

  5. #5
    Linux User vickey_20's Avatar
    Join Date
    Mar 2009
    Location
    Mumbai, India
    Posts
    493
    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?

  6. #6
    Linux Guru
    Join Date
    Nov 2007
    Location
    Córdoba (Spain)
    Posts
    1,513
    Quote Originally Posted by vickey_20 View Post
    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?
    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:

    Code:
    /dev/sda1 /           ext3 defaults 0 1
    /dev/sda2 /home       ext3 noatime  0 2
    /dev/sda3 /tmp        ext2 defaults 0 0
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...