How to Mount NTFS partitions in Windows using a NTFS-3G in CentOS6.5

Source: Internet
Author: User
By default, CentOS6.3 does not support WidowsNTFS hard disk partition read and write, to mount the NTFS format disk to CentOS6.3 need to install a third-party plug-in NTFS-3G, here we use compile to install plug-ins. 1. install the compiler. otherwise, compilation fails. Yuminstallgcc follow the prompts to install by Y completed 2. install ntfs-3gcd/ho By default, CentOS 6.3 does not support reading and writing Widows NTFS hard disk partitions. to mount an NTFS-format disk to CentOS6.3
Third-party plug-in NTFS-3G needs to be installed, here we use compile to install the plug-in.

1. install the compiler. otherwise, compilation fails.
Yum install gcc
Follow the prompts to complete Y installation

2. install ntfs-3gcd

/Home # go to the/home directory and download the software to this directory.

Wgethttp: // tuxera.com/opensource/ntfs-rj_ntfsprogs-2011.4.12.tgz.pdf download

Tar zxvf ntfs-3g_ntfsprogs-2011.4.12.tgz # extract

Cd ntfs-3g_ntfsprogs-2011.4.12 # go to the Directory

./Configure # compile

Make # installation

Make install # install

Cd .. # return to the upper-level Directory

Rm-r-f ntfs-3g_ntfsprogs * # delete installation package

3. view and use
Fdisk-l # display Widows NTFS hard disk partition information
######################################## #############################

Disk/dev/sda: 160.0 GB, 160041885696 bytes
240 heads, 63 sectors/track, 20673 cylinders
Units = cylinders of 15120*512 = 7741440 bytes
Sector size (logical/physical): 512 bytes/512 bytes
I/O size (minimum/optimal): 512 bytes/512 bytes
Disk identifier: 0x18fd18ff

Device Boot Start End Blocks Id System
/Dev/sda1*1 5093 38503048 + 7 HPFS/NTFS
/Dev/sda2 5094 20673 117784800 f W95 Ext 'd (LBA)
/Dev/sda5 5094 9357 32234496 7 HPFS/NTFS
/Dev/sda6 9358 13621 32235520 7 HPFS/NTFS
/Dev/sda7 13622 17885 32233472 7 HPFS/NTFS
/Dev/sda8 17885 17899 102400 83 Linux
/Dev/sda9 17899 18731 6291456 83 Linux
/Dev/sda10 18731 19009 2097152 82 Linuxswap/Solaris
/Dev/sda11 19009 19286 2097152 83 Linux
/Dev/sda12 19287 20673 10484736 83 Linux

######################################## ###########################
The above information shows my Widows NTFS hard disk partition information, a total of 160 GB, with four NTFS partitions

4. mount the partition.
Mount the/dev/sda1 partition to/mnt/winC
Mount the/dev/sda5 partition to/mnt/winD
Mount the/dev/sda6 partition to/mnt/winE
Mount the/dev/sda7 partition to/mnt/winF

Go to the/mnt directory and create four winC winD winE winF Mount directories.
Cd/mnt
Mkdir winC winD winE winF

Mount-t NTFS-3G/dev/sda1/mnt/winC # mount
Mount-t NTFS-3G/dev/sda5/mnt/winD
Mount-t NTFS-3G/dev/sda6/mnt/winE
Mount-t NTFS-3G/dev/sda7/mnt/winF

After the partition is mounted, you can view the corresponding folder under the/mnt Directory, that is, the partition of your mobile hard disk.

To uninstall the SDK, run the following command:

Umount/dev/sda1 # Uninstall
Umount/dev/sda5
Umount/dev/sda6
Umount/dev/sda7

5. edit the/etc/fstab file if you want to enable the system to automatically mount the mobile hard disk.
Cp/etc/fstab/etc/fstabbak # back up before changing
Vi/etc/fstab # Edit

Use the insert command to add the following information at the end to mount the disk in read/write mode.

/Dev/sda1/mnt/winC NTFS-3G defaults 0 0
/Dev/sda5/mnt/winD NTFS-3G defaults 0 0
/Dev/sda6/mnt/winE NTFS-3G defaults 0 0
/Dev/sda7/mnt/winF NTFS-3G defaults 0 0

Run the ESC command to exit.
Http://blog.rekfan.com /? P = 137
: Wq! Save and exit
Now, you only need to restart the machine and the mobile hard disk will be automatically mounted.

Unmount:
The following prompt appears when umount:
# Umount/dev/sda1
Umount:/mnt/upan: device is busy.
(In some cases usefulinfo about processes that use
The device isfound by lsof (8) or fuser (1 ))

Solution:
Root@rekfan.com/] # lsof-w/mnt/upan
Command pid user fd type devicesize/OFF NODE NAME
Bash 31761 root cwd DIR 8192 2316326 120526/mnt/upan/rekfan.com _
Root@rekfan.com/] #

Using lsof-w/mnt/upan, we can see that there is a command window in the/mnt/upan/rekfan.com _ 120526 Directory, close this window, or exit this Mount directory, you can use umount to safely exit the mounted device!

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.