Basically all Linux
When starting the system, the release mounts partitions according to the configuration of the/etc/fstab file. In/etc/fstab, the mount parameters are also different for partitions in different formats, and the results are different for different parameters, including the user's read and write permissions.
1. For FAT32 format partitions, add the following content to/etc/fstab:
/Dev/sdax/Media/y vfat user, RW, utf8, umask = 000 0 0
Note:/dev/sdax can run the fdisk command as an administrator.
-L find the partition you want to mount. /Media/y this is a folder and should be created in advance ." User, RW "indicates that users can perform read and write operations. Utf8
It can be said that it is necessary, because some Windows folders are often named in Chinese, while the GBK encoding method is used in windows. If it is mounted in Linux, garbled characters are displayed.
The utf8 parameter automatically converts Chinese characters to utf8 display, which can effectively avoid garbled characters. Umask = 000 indicates that all users are granted read/write operations, that is, after mounting, the common user can
. At last, two zeros are separated by spaces. The latter of the two zeros determines whether to check the power-on. If yes, change it to 1.
2. For LINUX partition formats such as ext3 and ext4, you can add the following content to/etc/fstab:
/Dev/sdax/Media/y ext3 defaults 0 1/dev/sdax/Media/y ext4 defaults 0 1/dev/sdax/Media/y JFS defaults 0 1 ......
The above lines correspond to the mounting statements of ext3, ext4, and JFS respectively. Modify the statements based on your own partition conditions. In these statements, the meaning of X and Y is the same as that of Y. The default parameter is mounted in the default format, and the following 0 and 1 indicate that the system should be checked upon startup.
3, NTFS format partition, more trouble, first install ntfs-3g this software, if you do not install this software will not be able to read and write NTFS format partition. After installation, add the following content to/etc/fstab:
/Dev/sdax/Media/y ntfs-3g defaults 0 0
Here the meaning of X and Y is the same as above, it is worth noting that the parameters after the ntfs-3g are as follows:
- Users
-If SUID root is set in the ntfs-3g Executable File(Command:Ntfs-3g/chmod U + S/bin/
)
Allows anyone to mount/detach an NTFS partition. Note:Users
InsteadUser
- UID
-Specify the owner of the files and directories in the NTFS partition (expressed in decimal number)
- GID
-Specify the user group of files and directories in the NTFS partition (expressed in decimal number)
- Fmask
-File Permission (octal mask)
- Dmask
-Directory permission (octal mask)
- Locale
-Used to make files using international character sets visible. It is no longer required in ntfs-3g 2009.1.1 and the updated version.
- Noauto
-Do not automatically mount partitions when starting.