@torresdyl
2016-10-17T04:54:29.000000Z
字数 3338
阅读 2640
nhel
ntfs
linux
blkid
http://www.techbrown.com/mount-ntfs-file-system-centos-7-rhel-7.shtml
And this tutorial is always helpful:
https://help.ubuntu.com/community/MountingWindowsPartitions
(for ubuntu, but also applies for RedHat)
root
sudo -i
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -ivh epel-release-latest-7.noarch.rpm
Or,
yum install epel-release
yum clean all
yum update
yum install ntfs-3g -y
yum install ntfsprogs -y
Edit the /etc/fstab
file with vi
, vim
or gedit
.
Add this line at last:
UUID=<your partition's UUID> /dev/sda3 ntfs-3g defaults,windows_names,locale=en_US.utf8 0 0
Your partitions's UUID can be checked with:
sudo blkid
Here you can get the filesystems and according to their labels/volumen you tell which is everyone's mount point, which you can substitue the /dev/sda3
part.
The locale setting can vary, of course. You can check the current locale with locale
, or locale -a
to get a full list of supported locale.
Save the file and quit with :wq
or ZZ
. To mount them now, you can
sudo mount -a
If you get this message:
Windows is hibernated, refused to mount.
Failed to mount '/dev/sda3': 不允许的操作
The NTFS partition is in an unsafe state. Please resume and shutdown
Windows fully (no hibernation or fast restarting), or mount the volume
read-only with the 'ro' mount option.
It is because Windows 7+ has enabled the Hibenation mode. In the Hibernation mode, you cannot boot NTFS partitions. According to the second link at the beginning:
General Considerations
Ubuntu will show files and folders in NTFS/FAT32 filesystems which are hidden in Windows. Consequently, important hidden system files in the WindowsC:\
partition will show up if this is mounted. Since it is all-too-easy to accidentally modify or delete files which are essential for Windows, it is advisable to mount your WindowsC:\
partition as seldom as possible, preferably not at all, or read-only by configuring/etc/fstab
(see below). [1]If you have data which you want to access regularly from both Windows and Ubuntu, it is better to create a separate data partition for this, formatted NTFS.
Whether you write to your Windows
C:\
partition or a shared NTFS data partition, be aware that if you are using Windows 7, and Windows 7 is in a hibernated state when you write to the NTFS partition from Ubuntu, you will lose all your changes. This is because when Windows 7 is hibernated it writes the system state to a file stored on disk and restores from that file when the system is re-awakened, thus restoring the whole fileystem to a state before any changes made from Ubuntu. In Windows 7 you must avoid using hibernation. With Windows 8, the situation is more complex in that, by default, it uses a hybrid hibernation/shutdown when you shut the system down. Any changes made by Ubuntu will be lost when you reboot into Ubuntu. [2]With both Windows 7 and Windows 8 (when installed to a legacy mbr partition table) there is usually a 100-200MB boot partition labelled "SYSTEM". Do not mount it - you do not need to. Similarly it is highly advisable to leave any recovery partitions unmounted.
If the system fails when rebooting and you enter recovery mode, you can use vi
/vim
to edit this file again. If it's read-only, just remount /
filesystem with read-write permission.
mount -o remount,rw /
If you are confused at first sight, just commend the line that boots NTFS partition with #
, and save & quit & reboot. Now you can enter Linux as usual.