Detailed fstab file

  
                  1 The function file /etc/fstab of the fstab file stores the file system information in the system. When the file is set correctly, you can load a file system by using the mount /directoryname command. Each file system corresponds to a separate line. The fields in each line are separated by spaces or tabs. At the same time, fsck, mount, umount and other commands use this program. 2. The fstab file format The following is an example line of the /etc/fatab file: fs_spec fs_file fs_type fs_options fs_dump fs_pass/dev/hda1 /ext2 defaults 1 1fs_spec - This field defines the device or remote file system where the file system you wish to load is located. In the case of a typical local block device: IDE devices are generally described as /dev/hdaXN, X is the IDE device channel (a, b, or c), N is the partition number; SCSI device is described as /dev/sdaXN. For NFS, the format is generally: for example: `knuth.aeb.nl:/. For procfs, use `proc to define. Fs_file - This field describes the directory point where the desired file system is loaded. For the swap device, this field is none; for the case where the load directory name contains spaces, 40 is used to indicate spaces. Fs_type - defines the file system on the device. Common file types are ext2 (common file type for Linux devices), vfat (fat32 format for Windows systems), NTFS, iso9600, and so on. Codepage national language code page iocharset character set fs_options - specifies the file system to load the device is a specific parameter option, multiple parameters are separated by commas. For most systems, using defaults is sufficient. Other common options include: Option Meaning ro Loads the file system in read-only mode. sync does not buffer writes to the device, which prevents the file system from being corrupted in the event of an abnormal shutdown, but reduces the computer speed. The normal user loads the file system quota to force the disk quota limit on the file system. noauto no longer uses the mount -a command (for example, when the system starts) to load the file system fs_dump - this option is used by the dump command to check that a file system should be How fast to dump, if the dump is not needed, set the field to 0fs_pass - this field is used by the fsck command to determine the order of the file system to be scanned at startup. The value of the root file system/corresponding field should be 1, other file systems should be 2. Set this field to 0 if the file system does not need to be scanned at boot time. 3. Sample file # /etc/fstab/dev/hda8 swap swap defaults 0 0/dev/hda9 /ext2 defaults 1 1/dev/hda6 /wine vfat defaults ,codepage=936,iocharset=cp936 0 0/dev/hda7 /winf vfat defaults,codepage=936,iocharset=cp936 0 0/dev/hdb /cdrom iso9660 noauto,user 0 0none /proc proc defaults 0 0none /dev/pts Devpts gid=5,mode=620 0 0fstab stores important information about partitions, each of which acts as a partition record. Each line can be divided into six parts. Below is /dev/hda7 /ext2 defaults 1 1 For example, one by one: 1. The first item is the physical location of the storage device you want to mount, such as hdb or /dev/hda6. 2. The second item is where you want to add it, such as /home or /, which is actually the point of entry that is prompted during installation. 3. The third item is the so-called local filesystem, which contains the following formats: ext, ext2, msdos, iso9660, nfs, swap, etc., or as ext2, see /prco/filesystems. 4. The fourth item is the state you want to set when you mount, such as ro (read-only) or defaults (including other parameters such as rw, suid, exec, auto, nouser, async). See "mount nfs". 5. The fifth item is to provide the DUMP function. Whether the BACKUP flag is required in the system DUMP, the default value is 0. 6. The sixth item is to set whether the filesystem should do the check operation at boot time. Except for the root filesystem whose necessary check is 1, other settings can be set as required, and the default value is 0.
Copyright © Windows knowledge All Rights Reserved