Recently the ThinkPad E490 notebook CentOS8.0 newly installed operating system, found that does not support NTFS file system.
After insertion of mobile hard disk USB, using df -h look and found not automatically mount.
[root@client ~]# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 7.8G 0 7.8G 0% /dev
tmpfs 7.8G 53M 7.8G 1% /dev/shm
tmpfs 7.8G 18M 7.8G 1% /run
tmpfs 7.8G 0 7.8G 0% /sys/fs/cgroup
/dev/nvme0n1p4 50G 8.1G 42G 17% /
/dev/nvme0n1p1 256M 46M 211M 18% /boot/efi
tmpfs 1.6G 12K 1.6G 1% /run/user/42
tmpfs 1.6G 32K 1.6G 1% /run/user/6666
Use fdisk -l / dev / sda view the hard disk device (note:. Sda is clear that the author has a removable hard disk system is generally known, is a device name sd prefix, suffix 1 to 4 according to the first plate, a press , b, c, d ... in the order named), was previously found to be partitioned in a Windows environment, using the NTFS file system.
[root@client ~]# fdisk -l /dev/sda
Disk /dev/sda: 477 GiB, 512110190592 bytes, 1000215216 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 33553920 bytes
Disklabel type: dos
Disk identifier: 0xdcb8085c
Device Boot Start End Sectors Size Id Type
/dev/sda1 2048 209717247 209715200 100G 7 HPFS/NTFS/exFAT
/dev/sda2 209717248 419432447 209715200 100G 7 HPFS/NTFS/exFAT
/dev/sda3 419432448 629147647 209715200 100G 7 HPFS/NTFS/exFAT
/dev/sda4 629147648 1000212479 371064832 177G f W95 Ext'd (LBA)
/dev/sda5 629149696 838864895 209715200 100G 7 HPFS/NTFS/exFAT
/dev/sda6 838866944 1000212479 161345536 77G 7 HPFS/NTFS/exFAT
CentOS8.0 current lack of driver support NTFS file system, you need to install ntfs-3g.
As is unclear whether the system already supports the NTFS file system, you can try to manually mount. Copy data from the first partition, execute the command after discovery does not support NTFS file system.
[root@client ~]# mount /dev/sda1 /mnt/
mount: /mnt: unknown filesystem type 'ntfs'.
Earlier I wrote an article about how CentOS7.6 support NTFS file system. Epel need to add the source, but CentOS8 just released soon, a lot of software not enough time to complete production.
Here we describe another installation can download ntfs-3g, (https://www.tuxera.com/community/open-source-ntfs-3g/) from here to download, install compiled.
Official website provides the latest version is ntfs-3g_ntfsprogs-2017.3.23, click on the download file ntfs-3g_ntfsprogs-2017.3.23.tgz
Unzip the file directory:
[root@client ntfs-3g_ntfsprogs-2017.3.23]# ls
aclocal.m4 autogen.sh compile config.h.in configure COPYING CREDITS include install-sh libntfs-3g m4 Makefile.in NEWS README TODO.ntfsprogs
AUTHORS ChangeLog config.guess config.sub configure.ac COPYING.LIB depcomp INSTALL libfuse-lite ltmain.sh Makefile.am missing ntfsprogs src
Compile, install:
./configure
make
make install
After the installation is complete, you can enter ntfs-3g View:
[root@client ntfs-3g_ntfsprogs-2017.3.23]# ntfs-3g
ntfs-3g: No device is specified.
ntfs-3g 2017.3.23 integrated FUSE 27 - Third Generation NTFS Driver
Configuration type 1, XATTRS are on, POSIX ACLS are off
Copyright (C) 2005-2007 Yura Pakhuchiy
Copyright (C) 2006-2009 Szabolcs Szakacsits
Copyright (C) 2007-2017 Jean-Pierre Andre
Copyright (C) 2009 Erik Larsson
Usage: ntfs-3g [-o option[,...]] <device|image_file> <mount_point>
Options: ro (read-only mount), windows_names, uid=, gid=,
umask=, fmask=, dmask=, streams_interface=.
Please see the details in the manual (type: man ntfs-3g).
Example: ntfs-3g /dev/sda1 /mnt/windows
News, support and information: http://tuxera.com
Try to mount mobile hard disk partition 1 (if not an error, then mount successful):
[root@client ~]# ntfs-3g /dev/sda1 /mnt/
执行df -lhT,可以查看到最新挂载的分区)。
[root@client ~]# df -hlT
Filesystem Type Size Used Avail Use% Mounted on
devtmpfs devtmpfs 7.8G 0 7.8G 0% /dev
tmpfs tmpfs 7.8G 55M 7.8G 1% /dev/shm
tmpfs tmpfs 7.8G 18M 7.8G 1% /run
tmpfs tmpfs 7.8G 0 7.8G 0% /sys/fs/cgroup
/dev/nvme0n1p4 xfs 50G 8.1G 42G 17% /
/dev/nvme0n1p1 vfat 256M 46M 211M 18% /boot/efi
tmpfs tmpfs 1.6G 12K 1.6G 1% /run/user/42
tmpfs tmpfs 1.6G 40K 1.6G 1% /run/user/6666
/dev/sda1 fuseblk 100G 92M 100G 1% /mnt
接下来就可以进行数据读写了。
使用完要卸载设备,可执行:
[root@client ~]# umount /mnt
本文所述只是描述NTFS文件系统支持的方法,其他更多功能用法,可以查看ntfs-3g 用户手册。
如有兴趣了解CentOS7支持NTFS的方法,可查看以往文章:
注:本文为Toyo Lau原创,未经许可不得在任何平台转载,侵权必究。如需转载,可关注公众号,在后台留言,与作者联系,取得许可才能转载~
欢迎加入Linux操作系统交流群:734638086