centos7挂载ntfs或exFAT分区的磁盘
一、挂载nfts格式硬盘
新安装的硬盘是ntfs文件格式的,都是从windows系统拆下来的。
由于linux系统是ext4格式的硬盘,需要下载ntfs-3g软件,才能挂载。
1、查看硬盘分配的盘符sda或sdb
fdisk -l
2、安装ntfs-3g软件
yum -y install ntfs-3g
3、挂载磁盘
mount -t ntfs-3g /dev/sda1 /mnt
注:如果提示
The disk contains an unclean file system (0, 0).
Metadata kept in Windows cache, refused to mount.
Falling back to read-only mount because the NTFS partition is in an
unsafe state. Please resume and shutdown Windows fully (no hibernation
or fast restarting.)
Could not mount read-write, trying read-only
需要执行
yum install ntfsprogs
ntfsfix /dev/sda1
4、设置开机启动挂载
vi /etc/fstab
/dev/sda1 /mnt ntfs-3g rw,umask=0000,defaults 0 05、卸载磁盘(如果需要)
umount /dev/sdb1
二、挂载exfat格式的磁盘
新安装的硬盘是exFAT文件格式的,是从移动硬盘上拆下来的。
由于linux系统是ext4格式的硬盘,需要下载exfat工具,才能挂载。
1、安装nux-dextop.repo库
需要从库中安装exfat工具
yum install -y http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm2、安装exfat工具
yum install exfat-utils fuse-exfat3、挂载exfat格式磁盘
- #把sdb1磁盘挂在mnt目录下
- mount -t exfat /dev/sdb1 /mnt
4、卸载磁盘(如果需要)
umount /dev/sdb1注意:如果安装新硬盘后,系统启动失败,自动进入应急模式。
则输入密码进入系统后
1、journalctl -xb(查看系统引导日志)
注意里面有今天日志时间。红色的字体挂载失败的目录可以看到。例如/home
然后到/etc/fstab文件里注释掉此挂载项
2、reboot
