Use fstab to automatically mount the FAT and NTFS partitions of Win in linux.
Source: Internet
Author: User
Use fstab to automatically mount the FAT and NTFS partitions of Win in linux-general Linux technology-Linux technology and application information. For more information, see the following. Author: felonwan
This is a section of the page written on archLinux wiki Based on the NTFS partition mounted on your computer and the online information.
For a better understanding of fstab usage, refer to the page:
1. first obtain the hard disk information table using fdisk-l (which may require root permission), for example:
# Device Boot Start End Blocks Id System
/Dev/sda1*1 2397 19253871 B W95 FAT32
/Dev/sda2 2398 3144 6000277 + 83 Linux
/Dev/sda3 3145 9729 52894012 + 5 Extended
/Dev/sda5 3145 3152 64228 + 83 Linux
/Dev/sda6 3153 3276 995998 + 82 Linux swap/Solaris
/Dev/sda7 3277 7340 32644048 + 83 Linux
/Dev/sda8 7341 9729 19189611 7 HPFS/NTFS
From the above, we know that there is only one hard disk on this computer. The partition sda1 is in fat32 format, sda8 is in NTFS format, and sda1 is able to be started, so it may be the disk of the Windows system. The system disk is mounted in read-only mode, and the non-system disk sda8 is mounted in read/write mode (it cannot be mounted in any directory "/" or below ).
2. Use your favorite editor to open/etc/fstab in the terminal, for example:
You should be able to find the content of your system partition sda1 under/home/username/WindowsC, and find the content of sda8 in/home/username/WindowsD (username indicates the user name ).
All of my win partitions are ntfs. I tested ntfs partitions:
No Chinese garbled characters are available when nls = utf8 is used!
Iocharset = utf8 is used only, and garbled characters are displayed!
WindowsC can only perform read operations with umask = 022. After using, it can perform normal read and write, and WindowsD can perform normal file read and write.
Note: I have mounted all partitions to the "/home" sub-directory. If the sub-directory is "/", umask = 000 cannot be written, this is a problem with the Linux system's "File System" permissions. For double insurance, you can mount win's system partition, drive C, under "/" and Its subdirectories. But if you want to write a file, you 'd better put it under/home.
Here, nls is used for mounting fat32, and codepage and iocharset are used on the Internet. I don't know if nls can be used! (Haha, fake taste)
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.