

CentOS 7 挂载NTFS磁盘
source link: https://blog.51cto.com/u_2510220/5111730
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

CentOS 7 挂载NTFS磁盘
原创本文记录在CentOS7服务器上挂载NTFS格式磁盘所遇到的问题及解决方法
CentOS7系统中默认的文件系统格式为XFS,无法直接挂载NTFS格式的磁盘,提示如下:
[root@localhost ~]# fdisk -l /dev/sdb
……省略部分输出……
10 1825409024 1953521663 61.1G Microsoft basic Basic data partition
[root@localhost ~]# mount -t ntfs /dev/sdb10 /mnt
mount: 未知的文件系统类型“ntfs”
CentOS无法直接识别NTFS文件系统,需要手动下载安装NTFS文件系统的驱动,通过使用yum来下载并安装ntfs-3g组件。
1、通过yum安装ntfs-3g组件。
[root@localhost ~]# yum install -y ntfs-3g
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
没有可用软件包 ntfs-3g。
错误:无须任何处理
安装报错是因为这些软件包没有正式获得任何的CentOS的支持,CentOS是RedHat企业版编译过来的,去掉了所有关于版权问题的东西,EPEL(Extra Packages for Enterprise Linux )即企业版Linux的扩展包,提供了很多可共Centos使用的组件。
2、通过如下命令添加aliyun的epel源。
[root@localhost ~]# wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
--2022-03-17 09:58:15-- http://mirrors.aliyun.com/repo/epel-7.repo
正在解析主机 mirrors.aliyun.com (mirrors.aliyun.com)... 221.204.195.21, 221.204.195.27, 221.204.195.22, ...
正在连接 mirrors.aliyun.com (mirrors.aliyun.com)|221.204.195.21|:80... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:664 [application/octet-stream]
正在保存至: “/etc/yum.repos.d/epel.repo”
100%[==========================================================>] 664 --.-K/s 用时 0.002s
2022-03-17 09:58:15 (341 KB/s) - 已保存 “/etc/yum.repos.d/epel.repo” [664/664])
[root@localhost ~]# ll /etc/yum.repos.d/
总用量 40
……省略部分输出……
-rw-r--r--. 1 root root 664 12月 26 2020 epel.repo
[root@localhost ~]#
3、安装ntfs-3g组件
[root@localhost ~]# yum install -y ntfs-3g
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
……省略部分输出……
已安装:
ntfs-3g.x86_64 2:2021.8.22-2.el7
作为依赖被安装:
ntfs-3g-libs.x86_64 2:2021.8.22-2.el7
完毕!
4、挂载NTFS磁盘,成功
[root@localhost ~]# mount -t ntfs /dev/sdb10 /mnt
[root@localhost ~]# ll /mnt
总用量 0
drwxrwxrwx. 1 root root 0 3月 16 11:43 $RECYCLE.BIN
drwxrwxrwx. 1 root root 0 3月 16 11:41 System Volume Information
drwxrwxrwx. 1 root root 0 3月 16 11:34 WindowsImageBackup
[root@localhost ~]#
通过安装epel-release组件,代替下载repo源
注意:
(1)、rpm安装完后,rpm -ql epel*,确提示未安装,此时要导入rpm的签名信息
#rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7(root身份执行)
(2)、对ntfs格式的磁盘分区应使用-t ntfs 参数,对fat32格式的磁盘分区应使用-t vfat参数。若汉字文件名显示为乱码或不显示,可以使用下面的命令格式。
- 赞
- 1收藏
- 评论
- 分享
- 举报
Recommend
-
91
yum install wget -y && wget -O auto_disk.sh http://download.bt.cn/tools/auto_disk.sh && bash auto_disk.sh &nbs...
-
114
磁盘格式化磁盘在格式化时会预先规定好每个块的大小,然后再把所有空间分割成一个一个的小块(指定块大小:1024B、2048B、4096B)Centos7支持的文件系统有?命令:#cat/etc/filesystems可以查看centos7在我们装系统时默认的文件系统就是xfs怎么查看一个分区的文件...
-
86
有了分区以后,我们还要格式化,如果不格式化,那么磁盘就无法使用,这个windows是一样的。windows支持NTFS格式和fat格式,那么linu支持什么样的分区格式呢?我们输入如下命令[root@localhost~]#cat/etc/filesystemsxfsext4ext3ext2nodevprocnodevdevptsiso9660vfa...
-
12
在archlinux上挂载virtualbox磁盘镜像文件 安装QEMU pacman -S --noconfirm qemu 安装nbd(network block device) pacman -S --noconfirm nbd 加载...
-
10
Mac读取、写入外置移动硬盘的解决方案 在Mac OS X中完全读写、修改、访问Windows NTFS硬盘、U盘等外接设备的文件。
-
4
19 March 2021 / vmware #VMWare #ESXi 遇到挂载的磁盘格式不正确怎么办? 在VMWare ESXi虚拟机上安装openwrt系统时,通常是用直接挂载openwrt磁...
-
11
Linux 使用 ntfs-3g 挂载 NTFS 最佳实践Linux 和 Mac OS X 因为某些原因本身不支持读写 NTFS 文件系统,大多数人平时也不需要与 NTFS 做数据文件的交互,只是有时候 Windows 用户应急状态下需要使用大容量移动硬盘拷贝数据,必须实现 Linux 下挂载 NTFS,而 Tux...
-
6
离线centos上挂载ntfs硬盘 作者: 邹成卓 2022-06-07 12:43:58 分类:
-
3
Centos挂载fat32格式的u盘和ntfs格式的移动硬盘 精选 原创 爱草坪 2022-08-30 20:...
-
5
macos原生挂载NTFS功能 2022-10-10 macOS ...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK