[关闭]
@torresdyl 2016-10-16T20:54:29.000000Z 字数 3338 阅读 2487

[Linux][RedHat]在RedHat下加载NTFS系统

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)


0. Enter a login shell and login as root

  1. sudo -i

1. Enable EPEL repository

  1. wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
  2. rpm -ivh epel-release-latest-7.noarch.rpm

Or,

  1. yum install epel-release
  2. yum clean all
  3. yum update

2. Install NTFS-3G packages for enabling support for NTFS file system

  1. yum install ntfs-3g -y

3. Enable NTFS support for file managers

  1. yum install ntfsprogs -y

4. Mount the NTFS filesystem when booting

Edit the /etc/fstab file with vi, vim or gedit.

Add this line at last:

  1. 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:

  1. 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

  1. 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 Windows C:\ 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 Windows C:\ 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.

  1. 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.


[1] Actually, it's just adding the umask=222 to the options (defaults and so on) in the line that boots NTFS in /etc/fstab.
[2] Open the cmd.exe as Administrator, and enter this command to turn off Hibernate mode: powercfg.exe /hibernate off.
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注