• How to Mount an NTFS Filesystem


    http://wiki.centos.org/TipsAndTricks/NTFS

    [Note: if you are running a centosplus kernel, see this section]

    Installing required packages

    • <!> While older ntfs drivers were prone to eat your data in r/w-mode, ntfs-3g seems to be r/w safe. See the ntfs-3g QA page for more information.

    Make sure you have the rpmforge repo installed. If not, refer to Repositories.

    Install the following packages.

    yum install fuse fuse-ntfs-3g dkms dkms-fuse 

    (dkms and dkms-fuse install the fuse kernel module)

    If the rpmforge repo is disabled by default,

    yum --enablerepo=rpmforge install fuse fuse-ntfs-3g dkms dkms-fuse 

    If you are using the ATrpms repository there is no need to install dkms and dkms-fuse (you still need fuse-ntfs-3g from rpmforge).

    The line to install from ATrpms then is

    yum install fuse-kmdl fuse
    • <!> Do not mix from both repositories if you have rpmforge and atrpms installed. Choose one to install fuse from. You might want to take a look at the yum priorities plugin to priorize one repository over the other.

      <!> Make sure that you have the correct kernel-devel package installed - especially having one that matches your running kernel. dkms has kernel-devel as a requirement, but that only pulls in the standard kernel-devel package.

    If you are running the xen kernel (kernel-xen), you need to

    yum install kernel-xen-devel 

    If you're running kernel-PAE, you need to install

    yum install kernel-PAE-devel 

    Same goes for kernel-smp and so on.

    • <!> yum will install the latest kernel-*-devel package. Make sure that it fits the kernel you are using. You might have to reboot to run the latest installed kernel after a "yum update". The installed running kernel and the kernel-*-devel package have to match.

    Mounting an NTFS filesystem

    Suppose your ntfs filesystem is /dev/sda1 and you are going to mount it on /mymnt/win, do the following.

    First, create a mount point.

    mkdir /mymnt/win 

    Next, edit /etc/fstab as follows. To mount read-only:

    /dev/sda1       /mymnt/win   ntfs-3g  ro,umask=0222,defaults 0 0 

    To mount read-write:

    /dev/sda1       /mymnt/win   ntfs-3g  rw,umask=0000,defaults 0 0 

    You can now mount it by running:

    mount /mymnt/win 

    Users of the centosplus kernel

    In CentOSPlus (Repositories/CentOSPlus) kernels, both ntfs and fuse kernel modules are enabled. The main difference between ntfs and ntfs-3g is that the former is read-only, whilst the latter is read-write. Therefore, if you do not need write access to a ntfs filesystem, there is no need to install additional packages. Simply add this line to /etc/fstab :

    /dev/sda1       /mymnt/win   ntfs  ro,umask=0222,defaults 0 0 

    If you wish to have read-write access, you would need the fuse-ntfs-3g package. But, because the fuse module is already available in the kernel, you do not need the dkms package:

    yum install fuse fuse-ntfs-3g 
    • <!> However, the fuse kernel module included in CentOS 5 (as of August 2007) produces a message: WARNING: Deficient FUSE kernel module detected. It still works, but it is advised that the fuse module from RPMforge (newer) be used instead. Also, you should update to the latest kernel which does not suffer from this issue.

    Therefore, run:

    yum install fuse fuse-ntfs-3g dkms dkms-fuse 

    to replace the existing fuse kernel module with the one from RPMforge.


    See also:

    http://wiki.linux-ntfs.org/doku.php?id=ntfs-en#can_i_mount_an_ntfs_volume (read-only mounting)


    Written and currently maintained by AkemiYagi. Comments/improvement welcome.
  • 相关阅读:
    JSON Web Token
    Centos 7下编译安装PHP7.2(与Nginx搭配的安装方式)
    Nginx配置详解
    Centos 7下编译安装Nginx
    PHP常用正则验证
    拼手气红包函数
    获取汉字首字母大写
    根据生日计算年龄
    ffmpeg获取视频封面图片
    对象脑图总结
  • 原文地址:https://www.cnblogs.com/xia/p/1475515.html
Copyright © 2020-2023  润新知