Ubuntu12.04 automatically mount Windows partitions upon startup

Source: Internet
Author: User
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

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

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.