设为首页 收藏本站
查看: 629|回复: 0

[经验分享] redhat7.1 ntfs 挂载

[复制链接]

尚未签到

发表于 2018-5-10 08:05:54 | 显示全部楼层 |阅读模式
  最近给redhat7.1挂载ntfs文件系统时失败了好几次,提示是没有安装C贬义环境,然后安装了gcc,就成功挂载了,下面是详细步骤
[root@foundation59 Desktop]# fdisk -l  ###查看所有磁盘信息

  

  Disk /dev/sdb: 750.2 GB, 750156374016 bytes, 1465149168 sectors
  Units = sectors of 1 * 512 = 512 bytes
  Sector size (logical/physical): 512 bytes / 512 bytes
  I/O size (minimum/optimal): 512 bytes / 512 bytes
  Disk label type: dos
  Disk identifier: 0x3c488b69
  

  Device Boot      Start         End      Blocks   Id  System
  /dev/sdb1            2048  1465145343   732571648    7  HPFS/NTFS/exFAT   ###看到有一个750G的ntfs文件系统硬盘,这就是将要挂载的硬盘
  

  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    ###1、执行此编译命令

  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    ####2、执行此命令

  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    ###3、执行此命令,后面一大堆提示信息,就不写了

[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
  

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-457840-1-1.html 上篇帖子: redhat linux 访问控制 下篇帖子: linux redhat 虚拟机
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表