How to automatically mount Windows partitions in Ubuntu

Source: Internet
Author: User
The following describes how to automatically mount windows partitions under ubuntu5.10: after each boot, the system automatically mounts windows partitions. (Take my system as an example) first, run the command on the terminal: sudomkdir/mnt/winCsudomkdir/mnt/winDsudomkdir/mnt/winE to create three Mount directories to Mount CDE disks separately. Run sudofdisk-l to view the disk

The following describes how to automatically mount windows partitions under ubuntu5.10: after each boot, the system automatically mounts windows partitions. (Take my system as an example)

Run the following command on the terminal: sudo mkdir/mnt/winC
Sudo mkdir/mnt/winD
Sudo mkdir/mnt/winE

Create three Mount directories to mount the c d and E disks respectively.

Run

Sudo fdisk-l

View the disk partition information:

Disk/dev/hdb: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065*512 = 8225280 bytes

Device Boot Start End Blocks Id System
/Dev/hdb1*1 1275 10241406 7 HPFS/NTFS
/Dev/hdb2 1276 3872 20860402 + f W95 Ext 'd (LBA)
/Dev/hdb3 3873 4865 7976272 + 83 Linux
/Dev/hdb5 1276 2550 10241406 7 HPFS/NTFS
/Dev/hdb6 2551 3825 10241406 B W95 FAT32
/Dev/hdb7 3826 3872 377496 82 Linux swap/Solaris

You can see from the above information

Hdb1 is a drive C under my windows
Hdb5 is my D drive in windows
Hdb6 is an E drive under my windows

Then run sudogedit/etc/fstab

Open the configuration file and enter the following red content in the original content:

#/Etc/fstab: static file system information .#
Proc/proc defaults 0 0
/Dev/hdb3/ext3 defaults, errors = remount-ro0 1
/Dev/hdb7 none swap sw 0 0
/Dev/hdc/media/cdrom0 udf, iso9660user, noauto 0 0 0
/Dev/fd0/media/floppy0auto rw, user, noauto0 0
/Dev/hdb6/mnt/winE vfat utf8, umask = 0000 0
/Dev/hdb5/mnt/winD ntfs nls = utf8, umask = 000 0 0
/Dev/hdb1/mnt/winC ntfs nls = utf8, umask = 000 0 0

Save the file reboot.

Note:/dev/hdbx is the partition under windows to be mounted. Note that I am using hdb, you may also be using hda, where/mnt/winx is the directory to be mounted. here I use it to mount the windows C D edisk. Vfat indicates the fat32 file format. ntfs indicates utf8 after ntfs format. umask indicates the permission of the file directory. In short, there are three 0 s, and the latter two are both 0.

Attachment: manual mounting

Fat format:

Mount-t vfat-o iocharset = utf8/dev/hdb6/mnt/winE

NTFS format:

Mount-t ntfs-o nls = utf8/dev/hdb5/mnt/winD

Uuid is currently used.

Obtain the UUID of the specified device:

If you know a device name and want to confirm its UUID, for example, if you want to confirm that your/etc/fstab UUID is correct, you can use the vol_id command:

Ubuntu # vol_id-u/dev/sdb1

C73a37c8-ef7f-40e4-b9de-8b2f81038441

List UUID of devices in the system

If you use the latest ubuntu, you can use the blkid command to list the UUID of all storage devices in the system.

Ubuntu # blkid

/Dev/sda1: UUID = "2220CF8220CF5B83" TYPE = "ntfs"

/Dev/sda2: UUID = "48E81F29E81F14B2" LABEL = "DRIVE-D" TYPE = "ntfs"

/Dev/sdb1: UUID = "c73a37c8-ef7f-40e4-b9de-8b2f81038441" SEC_TYPE = "ext2" TYPE = "ext3 ″

/Dev/sdb5: TYPE = "swap" UUID = "abe7529e-dcd5-4afc-b714-05569dbcd30b"

/Dev/sdb6: UUID = "f34c8c7c-a020-4a14-8c97-257180240250" SEC_TYPE = "ext2" TYPE = "ext3 ″

/Dev/sdb7: UUID = "8fa274ca-5b22-411f-b51277469c1f276da" SEC_TYPE = "ext2" TYPE = "ext3 ″

/Dev/sdc1: UUID = "1e36f323-c4e5-4f55-ba0a-838643550bf9" TYPE = "ext3" SEC_TYPE = "ext2 ″

/Dev/sdc2: UUID = "83aa92e4-4df4-4aab-80f3-9bbb447e0459" TYPE = "ext3" SEC_TYPE = "ext2 ″

Related Article

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.