In linux (taking Ubuntu12.04 as an example), apart from using the disk code (/dev/sd *), you can also directly use the disk label as the disk mount point. Advantage: No matter how the disk code changes, no matter which IDE interface you insert the disk into, because the disk is mounted through the label, which interface the disk is inserted will not be affected! Disadvantage: how to insert two disks, just because the labels of the two disks are repeated, is a tragedy, because the system cannot determine which disk is divided.
Preface
In linux (this document uses Ubuntu 12.04 as an example), apart from using the disk code (/dev/sd *), you can also directly use the disk label as the disk mount point.
Advantage: No matter how the disk code changes, no matter which IDE interface you insert the disk into, because the disk is mounted through the label, which interface the disk is inserted will not be affected!
Disadvantage: how to insert two disks, just because the labels of the two disks are repeated, This is a tragedy, because the system cannot determine which disk partition slot is correct!
View the System Disk code:
System Mount restrictions
The root directory/must be mounted and must be mounted before other mount points.
Other mount points must be created directories.
View the UUID of the disk partition
Command
Sudo blkid
Effect
Note: You can obtain the uuid Based on the label of the windows partition.
Modify the automatically mounted configuration file
Command
Sudo vim/etc/fstab
Configuration instructions
For details, take mounting/dev/sda3 as an example (my windows System D disk ):
:
Partition location, which can be UUID or LABEL, for example, UUID = 6E9ADAC29ADA85CD or LABEL = software
: The location of the specific mount point, for example:/home/wzy/
: Disk Mounting type. linux partitions are generally ext4 and windows partitions are generally ntfs.
: Mount parameter, which is generally ults
: Disk check. The default value is 0.
: Disk check. The default value is 0. Check is not required.
Configure an instance
Postscript
Do not mount the partition to the root directory of the current user. Otherwise, the partition will overwrite the content of the current partition!
After saving the file and restarting the machine, you can see that the partition is automatically mounted! Hey, I hope it will help you!
For more information about Ubuntu, see Ubuntu special page http://www.linuxidc.com/topicnews.aspx? Tid = 2