Linux system mount NTFS file system __linux

Source: Internet
Author: User
Tags mkdir
Today it is gratifying to try and successfully mount a 500G mobile hard drive onto the RHEL5 system. Thought that perhaps later oneself or other schoolmates will have the similar experience, then as far as possible meticulously records in this.

Either a hard drive with a windows/linux dual system, or a mobile hard drive/U disk that is connected via USB, can be mounted on a Linux system. However, because the file systems used by Windows themselves include FAT32 and NTFS, they need to be differentiated. Cut the crap and get to the point.

The system environment is as follows:
Operating system--rhel5, detailed version: Red Hat Enterprise Linux Server release 5.2 (Tikanga)
Kernel version--2.6.18-92.el5 for x86_64
Removable hard disk--500g,ntfs file system

Application target:
If you do not affect the current data on the mobile hard disk, mount the hard drive, you can read and write operations.

Programme A: Using LINUX-NTFS
Features: This scheme is easy to use and easy to operate, but it is only read after successful mount

Realize:
1. Download the Linux-ntfs RPM package
# wget http://prdownloads.sourceforge.net/linux-ntfs/kernel-module-ntfs-2.6.18-92.el5-2.1.27-0.rr.10.11.x86_64.rpm

2. Install the downloaded RPM package
# RPM-IVH kernel-module-ntfs-2.6.18-92.el5-2.1.27-0.rr.10.11.x86_64.rpm

3. Check if the NTFS module is loaded into the system
#/sbin/modprobe NTFS
[No output is present; otherwise there will be an error message reported]
# Cat/proc/filesystems
Nodev SELINUXFS
Ext3
Nodev Rpc_pipefs
Nodev AutoFS
Ntfs
[NTFS should appear in the list]

4. View the number of the NTFS system
#/sbin/fdisk-l |grep NTFS
/DEV/SDC1 1 60801 488384001 7 hpfs/ntfs

5. Mount the NTFS file system
# mkdir-p/mnt/ntfs/
# mount-t ntfs/dev/sdc1/mnt/ntfs/

End. You should have successfully mounted a read-only NTFS system at this point, and you can use the Mount command to view it.

Programme B: Use of fuse and ntfs-3g
Features: This program needs to download 2 packages, to its source code installation; Mount after successful loading partition

Realize:
1. Download Source installation package
# wget Http://downloads.sourceforge.net/project/fuse/fuse-2.X/2.7.4/fuse-2.7.4.tar.gz?use_mirror=ncu
# wget Http://www.ntfs-3g.org/ntfs-3g-2009.4.4.tgz

2. Install the downloaded Source pack
# TAR-ZXF Fuse-2.7.4.tar.gz
#./configure--prefix=/usr/local/fuse-2.7.4
# make
# make Install

# TAR-ZXF Ntfs-3g-2009.4.4.tgz
#./configure--prefix=/usr/local/ntfs-3
# make
# make Install

3. Check if the fuse module is loaded into the system
#/sbin/modprobe Fuse
[No output is present; otherwise there will be an error message reported]
# Cat/proc/filesystems
Nodev SELINUXFS
Ext3
Nodev Rpc_pipefs
Nodev AutoFS
Ntfs
Nodev Fuse
Fuseblk
Nodev Fusectl
[Fuse should appear in the list]

4. View the number of the NTFS system
#/sbin/fdisk-l |grep NTFS
/DEV/SDC1 1 60801 488384001 7 hpfs/ntfs

5. Mount the NTFS file system
# mkdir-p/mnt/ntfs/
# mount-t ntfs-3g/dev/sdc1/mnt/ntfs/

End. An NTFS system that should have been successfully mounted for all users to read and write at this time can be viewed using the Mount command.

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.