Manually set up Windows disk mount points under Linux

Source: Internet
Author: User

Manually set up Windows disk mount points under Linux

My notebook is a Linux system and a Windows system installed at the same time. When the Linux system starts, the Windows disk is automatically mounted in the/media directory, and the name of the mount point is long and hard to remember. For example, the name becomes fe6c0c5c6c0c1257 when the Windows system C disk is mounted. If the Windows system has a total of several disks, then the mount is a bunch of strings and it's hard to tell which disk to match. So I decided to manually modify the disk mount point.

First, execute the command "sudo fdisk-l" to display the various disk partition information that exists in the system as follows:

Device Boot Start End Blocks Id System

/DEV/SDA1 * 1 2150 17269843 7 Hpfs/ntfs

/dev/sda2 2151 14593 99948367 5 Extended

/dev/sda5 2151 4802 21302158+ 7 hpfs/ntfs

/dev/sda6 7414 14593 57673318+ 7 hpfs/ntfs

/dev/sda7 4803 5051 1998848 Linux Swap/solaris

/dev/sda8 5052 7413 18971648 Linux

Since my Windows system has a total of 3 disk: C disk, D disk, E disk, and are all NTFS format, so "/dev/sda1" should correspond to the C disk, "/dev/sda5" should correspond to D disk, "/dev/sda6" should correspond to E disk. The C disk is a Windows operating system and generally does not require access. Only need to mount D and E again. So I used the mkdir command to create the ProgramFiles and MyDocuments two directories in the "/home/cary" (Cary for my username) directory respectively as the mount points for D and E disks (in fact, the names of the two directories are optionally named).

Execute "sudo gedit/etc/fstab" to open the Fstab file. Refer to the format of the prompts in the file and add the following two lines of statements at the end of the file:

/dev/sda5/home/cary/programfiles NTFS DEFAULTS,USER,RW 0 0

/dev/sda6/home/cary/mydocuments NTFS DEFAULTS,USER,RW 0 0

After you save the file, perform the "sudo umount-a" command to uninstall the disks, and then perform "sudo mount-a" to mount all the disks again. Both D and e are mounted under the specified path. Access is available through the "~/programfiles" and "~/mydocuments" two paths.

The following is a brief introduction to the Fstab file.

File/etc/fstab Store file system information in the system. When the file is set correctly, you can load a file system with the Mount/directoryname command, each file system corresponds to a separate row, and the fields in each row are separated by spaces or tab keys.

Examples of fstab file formats are as follows:

Fs_spec fs_file fs_type fs_options fs_dump fs_pass

/DEV/HDA1/EXT2 Defaults 1 1

Fs_spec-This field defines the device or remote file system where the file system you want to load is located, and for a typical local block device scenario: The IDE device is generally described as/dev/hdaxn,x is the IDE device channel (A, B, or C) and n represents the partition number; SCSI devices are described as/DEV/SDAXN.

Fs_file-This field describes the directory points that you want the filesystem to load, none for swap devices, and 40来 for spaces that contain spaces for the loaded directory name.

Fs_type-Defines the file system on the device, typically common file types are ext2 (common file types for Linux devices), VFAT (FAT32 format for Windows systems), NTFS, iso9600, and so on.

Fs_options-Specifies that the file system that loads the device is a specific parameter option that needs to be used, and that multiple parameters are separated by commas. For most systems, defaults can be used to meet the needs. Other common options include RW loading the file system in read-write mode, and user allowing normal users to load the filesystem.

Fs_dump-This option is used by the dump command to check how quickly a file system should be dumped, and set this field to 0 if no dump is required

Fs_pass-This field is used by the fsck command to determine the sequence of file systems that need to be scanned at startup, the value of the root file system/pair should be 1, and the other file system should be 2. Set this field to 0 if the file system does not need to be scanned at boot time

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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: and provide relevant evidence. A staff member will contact you within 5 working days.