系统环境:Oracle Enterprise Linux 6.4
挂载移动硬盘(NTFS系统)时,系统显示不识别'NTFS'文件系统,说明操作系统内核不支持 NTFS 文件系统。
用下面方法挂载 NTFS 移动硬盘。
一.下载所需源码
1.下载 fuse (本例中不需要安装它)
fuse官网新版本参考下载地址:
http://sourceforge.net/projects/fuse/files/fuse-2.X/2.8.3/fuse-2.8.3.tar.gz/download
2.下载 ntfs-3g_ntfsprogs
ntfs-3g官网新版本参考下载地址:
http://www.tuxera.com/opensource/ntfs-3g_ntfsprogs-2014.2.15.tgz
二.安装源码
建议先阅读REDEME、INSTALL文档,内有详细的安装方法和参数说明。
1.安装 fuse(本例中不需要)
[root@localhost ~]# tar -zxvf fuse-2.8.3.tar.gz
[root@localhost ~]# cd fuse-2.8.3
[root@localhost ~]# ./configure
[root@localhost ~]# make && make install
[root@localhost ~]# modprobe fuse
2.安装 ntfs-3g
[root@localhost ~]# tar -zxvf ntfs-3g-2010.3.6.tgz
[root@localhost ~]# cd ./ntfs-3g-2010.3.6
[root@localhost ~]# ./configure
[root@localhost ~]# make
[root@localhost ~]# make install
三.挂载NTFS分区
把移动硬盘插入服务器的usb端口,然后输入命令扫描磁盘:
# fdisk -l
# ls -l /dev/sd*
如果没扫描到 ntfs 格式的磁盘,说明系统没认到该磁盘,要重启机器系统。
扫描到 ntfs 格式磁盘后,可用下面命令挂载它:
# ntfs-3g /dev/sda1 /mnt
# ls -l /mnt
参考:http://www.tuxera.com/community/ntfs-3g-download/
附录:安装命令的显示记录:
[root@testol2 ntfs-3g_ntfsprogs-2014.2.15]# ./configure
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking whether ln -s works... yes
checking whether gcc and cc understand -c and -o together... yes
checking for a sed that does not truncate output... /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for mv... /bin/mv
checking for rm... /bin/rm
checking for sed... (cached) /bin/sed
checking for ldconfig... /sbin/ldconfig
checking Windows OS... no
checking fuse compatibility... internal
checking for pthread_create in -lpthread... yes
checking Solaris OS... no
checking uuid/uuid.h usability... no
checking uuid/uuid.h presence... no
checking for uuid/uuid.h... no
configure: WARNING: ntfsprogs DCE compliant UUID generation code requires the uuid library.
checking hd.h usability... no
checking hd.h presence... no
checking for hd.h... no
configure: WARNING: ntfsprogs Windows compliant geometry code requires the hd library.
checking for ANSI C header files... (cached) yes
checking ctype.h usability... yes
checking ctype.h presence... yes
checking for ctype.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking libgen.h usability... yes
checking libgen.h presence... yes
checking for libgen.h... yes
checking libintl.h usability... yes
checking libintl.h presence... yes
checking for libintl.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking mntent.h usability... yes
checking mntent.h presence... yes
checking for mntent.h... yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking for stdint.h... (cached) yes
checking for stdlib.h... (cached) yes
checking stdio.h usability... yes
checking stdio.h presence... yes
checking for stdio.h... yes
checking stdarg.h usability... yes
checking stdarg.h presence... yes
checking for stdarg.h... yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking time.h usability... yes
checking time.h presence... yes
checking for time.h... yes
checking for unistd.h... (cached) yes
checking utime.h usability... yes
checking utime.h presence... yes
checking for utime.h... yes
checking wchar.h usability... yes
checking wchar.h presence... yes
checking for wchar.h... yes
checking getopt.h usability... yes
checking getopt.h presence... yes
checking for getopt.h... yes
checking features.h usability... yes
checking features.h presence... yes
checking for features.h... yes
checking regex.h usability... yes
checking regex.h presence... yes
checking for regex.h... yes
checking endian.h usability... yes
checking endian.h presence... yes
checking for endian.h... yes
checking byteswap.h usability... yes
checking byteswap.h presence... yes
checking for byteswap.h... yes
checking sys/byteorder.h usability... no
checking sys/byteorder.h presence... no
checking for sys/byteorder.h... no
checking sys/disk.h usability... no
checking sys/disk.h presence... no
checking for sys/disk.h... no
checking sys/endian.h usability... no
checking sys/endian.h presence... no
checking for sys/endian.h... no
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/mkdev.h usability... no
checking sys/mkdev.h presence... no
checking for sys/mkdev.h... no
checking sys/mount.h usability... yes
checking sys/mount.h presence... yes
checking for sys/mount.h... yes
checking for sys/stat.h... (cached) yes
checking for sys/types.h... (cached) yes
checking sys/vfs.h usability... yes
checking sys/vfs.h presence... yes
checking for sys/vfs.h... yes
checking sys/statvfs.h usability... yes
checking sys/statvfs.h presence... yes
checking for sys/statvfs.h... yes
checking sys/sysmacros.h usability... yes
checking sys/sysmacros.h presence... yes
checking for sys/sysmacros.h... yes
checking linux/major.h usability... yes
checking linux/major.h presence... yes
checking for linux/major.h... yes
checking linux/fd.h usability... yes
checking linux/fd.h presence... yes
checking for linux/fd.h... yes
checking linux/hdreg.h usability... yes
checking linux/hdreg.h presence... yes
checking for linux/hdreg.h... yes
checking machine/endian.h usability... no
checking machine/endian.h presence... no
checking for machine/endian.h... no
checking windows.h usability... no
checking windows.h presence... no
checking for windows.h... no
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking pwd.h usability... yes
checking pwd.h presence... yes
checking for pwd.h... yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking whether byte ordering is bigendian... no
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for off_t... yes
checking for size_t... yes
checking for struct stat.st_blocks... yes
checking for struct stat.st_rdev... yes
checking for struct stat.st_atim... yes
checking for struct stat.st_atimespec... no
checking for struct stat.st_atimensec... no
checking for library containing getmntent... none required
checking whether mbrtowc and mbstate_t are properly declared... yes
checking for working memcmp... yes
checking whether lstat correctly handles trailing slash... yes
checking whether stat accepts an empty string... no
checking for strftime... yes
checking for utime.h... (cached) yes
checking whether utime accepts a null argument... yes
checking for vprintf... yes
checking for _doprnt... no
checking for atexit... yes
check