Linux users will certainly not be unfamiliar with the content discussed in this article. in Linux, partitions in Windows file systems are usually not automatically mounted on startup. In Ubuntu, you need to click the Windows partition to mount the disk. in Fedora, you even need to enter the root password. I have summarized two methods for automatic mounting of Windows partitions. First, connect
Linux users will certainly not be unfamiliar with the content discussed in this article. in Linux, partitions in Windows file systems are usually not automatically mounted on startup. In Ubuntu, you need to click the Windows partition to mount the disk. in Fedora, you even need to enter the root password.
I have summarized two methods for automatic mounting of Windows partitions.
First, use the fstab file:
First, you must understand the device code of the Windows partition. The current hard disk of a computer is usually a SCSI hard disk. Here we assume that Windows is installed on drive C, and drive C is D and drive e, in the Windows file system, the device file of drive C in Linux is/dev/sda1, drive D is/dev/sda5, and drive e is dev/sda6. They are automatically mounted to the/media/C,/media/D, and/media/E directories respectively.
Create a Mount Directory:
1 mkdir/media/C
2 mkdir/media/D
3 mkdir/media/E
Use vi to open the/etc/fstab file, for example:
Append the following content to the end (1 \ 2 \ 3 is the row number, do not include ):
1/dev/sda1/media/C ntfs defaults 0 1
2/dev/sda5/media/D ntfs defaults 0 1
3/dev/sda6/media/E ntfs defaults 0 1
The first part is/dev/sda1, that is, the device, that is, the Windows partition. The second part is the mount point. The third part is the file system format of the Windows partition. if it is a Fat file system, here we need to change it to vfat. The fourth part is some parameters. defaults includes auto (auto indicates automatic mounting), the fifth part indicates backup, and the sixth part indicates performing fsck indicates hard disk check.
Save the file and run:
Mount-
Check whether an error is written. Note that if an error is written, the system cannot start up! Then save and restart the machine and it will be automatically mounted. .
Second, run the script at startup:
The/etc directory contains a series of scripts automatically executed at startup, so you only need to add the Mount command to it to achieve automatic mounting, which is effective in the Ubuntu test.
First, create the corresponding directory under/media, and then use vi or Gedit to open/etc/rc. local File. add the following content (remove the row number) after it (exit0 in Ubuntu, you need to add it in front of this sentence ):
1 mount-t ntfs/dev/sda1/media/C
2 mount-t ntfs/dev/sda5/media/D
3 mount-t ntfs/dev/sda6/media/E
Save the file and automatically mount it when you restart the machine.