How to configure the/etc/fstab file

Source: Internet
Author: User
Some programs use the/etc/fstab file to determine which file systems are loaded by default, the loading order, and which must be checked (integrity error verification ). Create a new file system table as follows: cat/etc/fstabEOF # Begin/etc/fstab # filesystemmount-pointtypeoptionsdumpfsck # order/de

Some program/Etc/fstabFile to determine which file systems are loaded by default, the loading order, and which must be checked (integrity error verification ). Create a new file system table as follows:


Cat>/etc/fstab <"EOF"
# Begin/etc/fstab

# File system mount-point type options dump fsck
# Order

/Dev/ "Replaceable"> / "Replaceable"> Defaults 1 1
/Dev/ "Replaceable"> Swap pri = 1 0 0
Proc/proc defaults 0 0
Sysfs/sys sysfs defaults 0 0
Devpts/dev/pts devpts gid = 4, mode = 620 0 0
Shm/dev/shm tmpfs defaults 0 0
# End/etc/fstab
EOF

Replace on your system , , And Is an appropriate value, for example,Hda2,Hda5, AndExt3. For more information about the six fields in the file, seeMan 5 fstab.

This/Dev/shmThe Mount point isTmpfs(Virtual memory file system) can include enabling POSIX Shared memory. This requires the kernel to support this option during build (more information is available in the next chapter ). Note that currently, few software use POSIX Shared memory. Therefore, I think/Dev/shmThe mount point option is optional. For more information, seeDocumentation/filesystems/tmpfs.txt.

The file system has MS-DOS or Windows lineage (I. e.: vfat, ntfs, smbfs, cifs, iso9660, udf) requires "iocharset" loading option to make the file name non-ASCII (US information exchange standard code) the features are properly interpreted. This option is the same as your location feature. you can use this method to adjust the kernel to support it. If you need to operate on the relevant feature definitions (which can be found under File systems> Native Language Support), you can compile them into the kernel or into modules. The "codepage" option is also required for vfat and smbfs file systems. it should be set to the codepage number that the MS-DOS uses in your country. For example, to mount a USB flash device, the ru_RU.KOI8-R user needs/Etc/fstabThe following lines:


/Dev/sda1/media/flash vfat
Noauto, user, quiet, showexec, iocharset = koi8r, codepage = 866 0 0

The corresponding line of the ru_RU.UTF-8 User:


/Dev/sda1/media/flash vfat
Noauto, user, quiet, showexec, iocharset = utf8, codepage = 866 0 0

Note:

In the following example, the kernel sends the following information:


"Computeroutput"> FAT: utf8 is not a recommended IO charset for FAT filesystems,
Filesystem will be case sensitive!

This negative suggestion should be ignored because all other "iocharset" value options cause incorrect display of the UTF-8locales file name.

It may also specify the default codepage and iocharset for Some file systems during kernel construction. Related parameters are the specified "default NLS option" (CONFIG_NLS_DEFAULT), "default remote NLS option" (CONFIG_SMB_NLS_DEFAULT), and "default FAT codepage" (CONFIG_FAT_DEFAULT_CODEPAGE ), and "default FAT iocharset" (CONFIG_FAT_DEFAULT_IOCHARSET ). The system settings for ntfs files during Kernel Compilation are not described here.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.