NTFS Driver for Linux system-installation and configuration of NTFS-3g-Method Synthesis

Source: Internet
Author: User

 

NTFS-3g is an open source software that supports reading and writing NTFS format partitions under Linux. It is fast and secure. It supports Windows 2000, XP, 2003, and Vista, and supports all POSIX-compliant disk operations. Ntfs-3g is designed for continuous development, users of various hardware platforms and operating systems need reliable intercommunication and support NTFS Driver, ntfs-3g provides a trusted, functional, high-performance solution. After more than 12 years of development, ntfs-3g has gradually stabilized.

Method 1:

One use instance of the NTFS-3g

Problem:

    # mount –t ntfs /dev/sdb1 /mnt/     mount: unknown filesystem type ‘ntfs’

This is because partitions in NTFS format cannot be identified on centos 5.5 (final.

Solution: solve by using the ntfs-3g driver.
Download Page: http://www.tuxera.com/community/ntfs-3g-download/
Latest Version: ntfs-3g_ntfsprogs-2012.1.15

# Wget http://tuxera.com/opensource/ntfs-3g_ntfsprogs-2012.1.15.tgz

Compile and install ntfs-3g

(1) install the compiler before installing the ntfs-3g, if GCC is not installed after the ntfs-3g compilation will fail.

# Yum install GCC // install the compiler, always press Y. If GCC is not installed, it will fail to compile the ntfs-3g. GCC is a language programming compiler in lonux system,

# Mkdir/usr/local/ntfs3g // create the folder ntfs3g for subsequent compilation and installation of NTFS-3g

# Cd/usr/local/src // default source code package storage location in Linux; source code package compilation and installation location:/usr/local/software name

(2) Installation of ntfs-3g

# Tar zxvf ntfs-3g_ntfsprogs-2011.4.12.tgz

# Cd ntfs-3g_ntfsprogs-2011.4.12

#./Configure -- prefix =/usr/local/ntf3g // compile, specify the installation directory/usr/local/ntf3g, and do not specify

# Make

# Make install

Installation complete!

# Rm-r-F ntfs-3g_ntfsprogs * // remove all files headed by the ntfs-3g_ntfsprogs don't notice, '*' indicates matching all,-r recursive processing, processes all files and subdirectories under the specified directory, and-F forces the deletion of files or directories. You can choose not to delete it.

Disk mount: mount command

Mount-T file format-O option parameter disk partition mount point directory name

For example, Mount-T vfat-oiocharset = utf8, umask = 000/dev/hda5/mnt/win1

For example, Mount-t ntfs-onls = utf8, umask = 000/dev/hdd1/mnt/win1

Ntfs-3g/dev/sdb1/mnt/win1-O locale = ar_SA.UTF-8 // The red part can also be changed to zh_cn.gbk, it is obvious that some encoding is used for mounting to prevent garbled; do not add the following parts.

Simple mount command:

Mount ntfs-3g/dev/sdb1/mnt/usb1

Determine which partition is in NTFS format and load the NTFS partition;

# Fdisk-l

Note: When "fdisk-L" is used to view hard disk partition information, the error "-Bash: fdisk: commandnot found" appears. The solution is as follows:

1. Log on as an administrator.

2. Run the command # ln-S/sbin/fdisk/usr/bin

OK!

/Dev/sda5 5223 14593 75272526 7 HPFs/NTFS

Now we enter the NTFS partition loading process. From the above view, we know that/dev/sda5 is in NTFS format.

1. Create a directory for the mount point. For example, create a win1 directory under the/mnt/directory:

# Mkdir/mnt/win1

2. Mount/dev/sda5 to/mnt/win1, so that if we view the/dev/sda5 disk content, we will find it in/mnt/win1.

# Mount-T ntfs-3g-onls = utf8, umask = 000/dev/sda5/mnt/win1

Note:-t ntfs indicates that the file system format is NTFS;-O is the option, NLS = utf8, meaning Native Language Support (supported by local language) is utf8, that is, the commonly used language encoding can also be changed to iocharset = utf8; the default language encoding of Fedora core4.0 is utf8, which can display Chinese characters; umask = 000 indicates that all user groups can read and write data. However, because NTFS is not secure in Linux, it can only be read but cannot be written. Is it mounted?

Command to view disk usage

# DF-lH

File System capacity used available % mount point

/Dev/mapper/VolGroup00-LogVol00

286g 25g 246g 10%/

/Dev/sda1 99 m 13 m 82 m 14%/boot

Tmpfs 879 M 0 879 M 0%/dev/SHM

It indicates that the disk has been mounted. You can check it on CD, MNT, win1, or later.

Automatic mounting of boot partitions

Put the following command in/etc/fstab.

/Dev/sda5/mnt/win1 ntfs-3g umask = 000, iocharset = utf8 0 0

Other methods:

// Edit/etc/fstab

CP/etc/fstab/etc/fstabbak // back up data before editing.

VI/etc/fstab // edit the file, add the following information at the end of the file, and press g (SHIFT + G) at the end of the jump file)

/Dev/sdb1/mnt/usb1 ntfs-3gdefaults 00

/Dev/sdb2/mnt/usb2 ntfs-3gdefaults 00

/Dev/sdb3/mnt/usb3 ntfs-3gdefaults 00

/Dev/sdb4/mnt/usb4ntfs-3gdefaults 00

: WQ! // Save and exit. After restart, the system will automatically mount the mobile hard disk.

Copy and delete a directory file:

# Cp-RF srcdir dstdir // copy the directory file.

# Rm-RF dstdir // Delete the directory file.

Unmount a disk: umount command

# Umount/mnt/win1

The above main content from: http://www.linuxde.net/2011/07/178.html

Method 2:

Many customers who come to the IDC for maintenance asked me howLinuxMount the NTFS partition of the mobile hard disk they bring, they can not format the hard disk into ext format, I told them that they can useNTFS-3GThe following describes how to install and use this open-source program.

1. Introduction

NTFS-3G is an open source software that supportsLinux, FreeBSD, Mac OS X, NetBSD, and haiku read and write NTFS partitions. It can quickly and securely operate Windows XP, Windows Server 2003, Windows 2000, and Windows 2008 file systems, except for full file ownership and access permissions, it supports all POSIX-compliant disk operations.

NTFS-3GThe objective is to provide users with high-performance, trusted and functional solutions for hardware platforms and operating systems that require reliable intercommunication with NTFS.

2. Install NTFS-3G

Download NTFS-3G

Because the latest version of Linux systems are integrated with the ntfs-3G function, can be used directly, and centos5.7/rhel5.7 versions earlier than all need to compile and install, download the latest version of the ntfs-3G

[Root @ vtest ~] # Wgethttp: // tuxera.com/opensource/ntfs-rj_ntfsprogs-2012.1.15.tgz

Extract

[Root @ vtest ~] # Tar zxvf ntfs-3g_ntfsprogs-2012.1.15.tgz

Compile and install

[Root @ vtest ~] # Cd ntfs-3g_ntfsprogs-2012.1.15

 

[Root @ vtest ~] #./Configure

 

[Root @ vtest ~] # Make

 

[Root @ vtest ~] # Makeinstall

3. Usage

Connect the mobile hard disk to the server and check which device is partitioned by NTFS.

[Root @ vtest ~] # Fdisk-l

 

/Dev/sde1 1 24593 135272526 16 HPFs/NTFS ### one row

From the above output, we can see that/dev/sde1 is an NTFS device, and we mount it.

[Root @ vtest ~] # Mkdir/mnt/NTFS

 

[Root @ vtest ~] # Mount-T ntfs-3g/dev/sde1/mnt/NTFS

Parameter:-T indicates the type of the partition to be mounted.

Now you can use the mount point/mnt/NTFS to back up data from the server to the mobile hard disk. Isn't it hard for Linux to recognize mobile hard drives? After reading this article, try it.

Method 2 content from: http://www.lampbo.org/linux-xuexi/linux-base/linux-ntfs-3g.html

 

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.