redhat7.1 ntfs 掛載

最近給redhat7.1掛載ntfs文件系統時失敗了好幾回,提示是沒有安裝C貶義環境,而後安裝了gcc,就成功掛載了,下面是詳細步驟java

[root@foundation59 Desktop]# fdisk -l  ###查看全部磁盤信息linux


Disk /dev/sdb: 750.2 GB, 750156374016 bytes, 1465149168 sectorswindows

Units = sectors of 1 * 512 = 512 byteside

Sector size (logical/physical): 512 bytes / 512 bytesui

I/O size (minimum/optimal): 512 bytes / 512 bytesorm

Disk label type: dosip

Disk identifier: 0x3c488b69ci


   Device Boot      Start         End      Blocks   Id  Systemrem

/dev/sdb1            2048  1465145343   732571648    7  HPFS/NTFS/exFAT   ###看到有一個750G的ntfs文件系統硬盤,這就是將要掛載的硬盤get


Disk /dev/sda: 120.0 GB, 120034123776 bytes, 234441648 sectors

Units = sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 4096 bytes

I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk label type: dos

Disk identifier: 0x0003c4df


   Device Boot      Start         End      Blocks   Id  System

/dev/sda1   *        2048    73404415    36701184    7  HPFS/NTFS/exFAT    

/dev/sda2        73404416    74428415      512000   83  Linux

/dev/sda3        74428416    82292735     3932160   82  Linux swap / Solaris

/dev/sda4        82292736   234440703    76073984    5  Extended

/dev/sda5        82294784   234440703    76072960   83  Linux

[root@foundation59 Desktop]# ls   ###查看已經解壓以後的ntfs-3g軟件(此軟件很容易百度下載)

ntfs-3g_ntfsprogs-2011.4.12.zip  ntfs-3g_ntfsprogs-2014.2.15.tgz

ntfs-3g_ntfsprogs-2014.2.15

[root@foundation59 Desktop]# cd ntfs-3g_ntfsprogs-2014.2.15   ###進入此軟件的解壓目錄

[root@foundation59 ntfs-3g_ntfsprogs-2014.2.15]# ls

\aclocal.m4    config.h.in   COPYING.LIB  libfuse-lite  missing

AUTHORS       config.log    CREDITS      libntfs-3g    NEWS

autogen.sh    config.sub    depcomp      ltmain.sh     ntfsprogs

ChangeLog     configure     include      m4            README

compile       configure.ac  INSTALL      Makefile.am   src

config.guess  COPYING       install-sh   Makefile.in   TODO.ntfsprogs

[root@foundation59 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... /usr/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

config.status: executing depfiles commands

config.status: executing libtool commands

/usr/bin/rm: cannot remove 'libtoolT': No such file or directory

You can type now 'make' to build ntfs-3g.

[root@foundation59 ntfs-3g_ntfsprogs-2014.2.15]# make    ####二、執行此命令

make  all-recursive

make[1]: Entering directory `/root/Desktop/ntfs-3g_ntfsprogs-2014.2.15'

Making all in include

make[2]: Entering directory `/root/Desktop/ntfs-3g_ntfsprogs-2014.2.15/include'

Making all in ntfs-3g

[root@foundation59 ntfs-3g_ntfsprogs-2014.2.15]# mkn

mknod   mkntfs  

[root@foundation59 ntfs-3g_ntfsprogs-2014.2.15]# make install    ###三、執行此命令,後面一大堆提示信息,就不寫了

[root@foundation59 ntfs-3g_ntfsprogs-2014.2.15]# mount -t ntfs-3g /dev/sdb1 /mnt/windows750   ###而後直接掛載不成功,是由於沒有建立/mnt/windows750目錄

ntfs-3g-mount: failed to access mountpoint /mnt/windows750: No such file or directory

[root@foundation59 ntfs-3g_ntfsprogs-2014.2.15]# mkdir /mnt/windows750   ###先建立目錄

[root@foundation59 ntfs-3g_ntfsprogs-2014.2.15]# mount -t ntfs-3g /dev/sdb1 /mnt/windows750  ###成功掛載(沒有提示信息就是成功了,能夠進入看看)

[root@foundation59 ntfs-3g_ntfsprogs-2014.2.15]# mkdir /mnt/1t

[root@foundation59 ntfs-3g_ntfsprogs-2014.2.15]# mount -t ntfs-3g /dev/sdd1 /mnt/1t

[root@foundation59 ntfs-3g_ntfsprogs-2014.2.15]# cd /mnt/

[root@foundation59 mnt]# ls   ###能夠看到掛在了3個盤

1t  windows750  windowscpan

[root@foundation59 mnt]# cd windows750

[root@foundation59 windows750]# ls   ###能夠看到750G硬盤裏面的文件信息

download   movies  MyDrivers            $RECYCLE.BIN               Youku Files  軟件

java_0924  music   Program Files (x86)  System Volume Information  文件

[root@foundation59 windows750]# 

接下來要實現redhat7.1開機自動掛載ntfs格式硬盤或分區

a、進入/mnt目錄,新建目錄名爲cpan,dpan

b、使用fdisk -l命令查看硬盤每一個區對應的地址

c、進入/etc路徑下編輯fstab文件(編輯以前最好先備份cp /etc/fstab /etc/fstab.bak),在文件末尾添加以下代碼

/dev/sdb1 /mnt/windows750 ntfs-3g defaults 0 0  ###這裏個人750G盤對應sdb1

/dev/sdd1 /mnt/1t ntfs-3g defaults 0 0

相關文章
相關標籤/搜索