A quick way to enable Red Hat 7.3 to support NTFS

Source: Internet
Author: User
Tags add date exit config copy file system access linux
What is NTFS?
What is NTFS
NTFS is the filesystem used by Windows NT, Windows xp-based, and Windows XP.
NTFS is the file system used by Windows NT, Windows 2000, and Windows XP
Why didn ' t Red Hat enable NTFS support in their kernels?
Why isn't a red hat directly supporting NTFS in its kernel?
Editors Note:anton Altaparmakov, the NTFS maintainer, took offense to my stating
This read only support can cause data corruption problems. Can read his e-mail
To me
Editor's note: Andon Airta Pamakov, an NTFS maintenance person, has a sense of my assertion that read-only support can cause data corruption issues
Into anger. Here you can read him to my sister.
My prior statement is not in the way meant to is offensive to him, so I have removed
The passage he objected too. However, in the past even while using read only support
The NTFS module has been known to cause filesystem corruption. Enabling write support
For the NTFS module, would EAT YOUR data!
My previous statement did not provoke him in any way, so I deleted a paragraph of his objections. However, in the past some time, the NTFS module even
File system crashes are also caused when using read-only mode. If you open its write support, it will eat your data!

Why is NTFS support poor under Linux?
Why is NTFS so poorly supported in Linux?

Microsoft chooses information necessary to write a driver to access
The NTFS filesystem for operating systems other then Windows. This basically makes
Writing a driver a case of trial and error.
Microsoft does not publish information that is necessary to support NTFS-enabled drivers in systems other than Windows. This is made for its written drive easy to cause
The most fundamental reason for many mistakes.
This may leads to ask the question, "Then Why are Linux support for FAT and FAT32
Filesystems any good? ". The NTFS filesystem is a lot more complex then FAT and FAT32,
Thus making it harder to write a driver.
You might ask: Why does Linux support fat and FAT32 very well? The NTFS file system is much more complex than fat and FAT32, so it makes
It is much more complicated to write a drive.

Alternatives to using NTFS support
An alternative method of using NTFS.
Create an FAT32 (VFAT) partition and store the data for your need to access from Linux on it.
Create a FAT32 partition. Put the data you need to access from Linux in this section.

Is your system up to date?
Is your system up to date?

I am going to assume your have updated your Red Hat 7.3 Install with all of the currently
Available updates. Kernel version 2.4.18-5 is the latest official Kernel available for
Red Hat 7.3
I'm going to assume that you've upgraded your Red Hat 7.3 to the latest kernel available today. The latest is 2.4.18-5 (translator Note:
Do not upgrade also completely can do so, I tested in my own machine, and currently the latest version of 2.4.18-10)

Installing the kernel sources.
Install kernel source files

The I check and the what kernel you are running. Must use the kernel source for the
Same kernel you are running.
First check to see what kernel you are using to run your system, and you must use the same source files as your kernel.

[Jimh@garfield jimh]$ Uname-r
2.4.18-5

Check to already have the kernel source installed with:
Check to see the version of your kernel source file:

[Jimh@garfield jimh]$ rpm-q kernel-source-2.4.18-5
Kernel-source-2.4.18-5

If you don ' t have the Kernel-source installed you'll be:
If you do not install the original kernel file you will see this:

[Jimh@garfield jimh]$ rpm-q kernel-source-2.4.18-5
Package kernel-source-2.4.18-5 is not installed

If The kernel source is isn't installed, download the source from your favorite Red Hat Mirror
Site. You'll need to is logged in as root to install the kernel source. Install the kernel
SOURCE with:
If the kernel source file is not installed, download one from the Redhat site, you need to install it with root permissions. Use the following command:
RPM-IVH kernel-source-2.4.18-5.i386.rpm

If you are are registered with the Red Hat network can also use Up2date to install the kernel.
This would download and then install the Kernel-source for you.
If you are already a registered user of the Redhat network, you can use the up2date command to install kernel, which will download and install kernel source
Up2date Kernel-source

Preparing the kernel source
Preparing kernel source files
Login as the root user.
Log in as root user
Change to the/usr/src/linux-2.4.18-5 directory
Change to/usr/src/linux-2.4.18-5 directory
[Root@garfield root]# cd/usr/src/linux-2.4.18-5

"Make Mrproper"
[Root@garfield linux-2.4]# make Mrproper

"Make Xconfig"
[Root@garfield linux-2.4]# make Xconfig

Load the default Red Hat kernel config that is used to compile the kernel for you have installed.
Load Redhat The kernel configuration file used to compile your installed kernel (this is Athlon)
[Root@garfield linux-2.4]# rpm-q--qf '%{arch}\n ' kernel-2.4.18-5
Athlon

Click "Load Configuration from File"
Click "Load Configuration from File"
Side note:red Hat did not ship a i586 uniprocessor kernel with 7.3. If you have a uniprocessor
i586 System The command above would probably return i386. Use the I386.config if it does.
Next note: Redhat did not issue 7.3 of the i586 uniprocessor kernel, if you use the i586 uniprocessor the system above will return i386. This situation
I'll use the i386.config.
Can look in/usr/src/linux-2.4.18-5/configs to what the default kernel configs Red Hat
uses to compile their kernels.
You can look at/usr/src/linux-2.4.18-5/configs to see what the Red Hat has. Default kernel configuration
[Jimh@garfield jimh]$ Ll/usr/src/linux-2.4.18-5/configs
Total 564
-rw-r--r--1 root 39830 May 2 14:36 kernel-2.4.18-athlon.config
-rw-r--r--1 root 39858 May 2 14:36 kernel-2.4.18-athlon-smp.config
-rw-r--r--1 root 49146 May 2 14:36 kernel-2.4.18-i386-boot.config
-rw-r--r--1 root 40020 May 2 14:36 kernel-2.4.18-i386.config
-rw-r--r--1 root 39960 May 2 14:36 kernel-2.4.18-i386-smp.config
-rw-r--r--1 root 39957 May 2 14:36 kernel-2.4.18-i586.config
-rw-r--r--1 root 39897 May 2 14:36 kernel-2.4.18-i586-smp.config
-rw-r--r--1 root 40021 May 2 14:36 kernel-2.4.18-i686-bigmem.config
-rw-r--r--1 root 39968 May 2 14:36 kernel-2.4.18-i686.config
-rw-r--r--1 root 40414 May 2 14:36 kernel-2.4.18-i686-debug.config
-rw-r--r--1 root 39966 May 2 14:36 kernel-2.4.18-i686-smp.config
-rw-r--r--1 root 35944 May 2 14:36 kernel-2.4.18-i686-uml.config
-rw-r--r--1 root 40170 May 2 14:36 kernel-2.4.18-x86_64.config
-rw-r--r--1 root 40170 May 2 14:36 kernel-2.4.18-x86_64-smp.config

In the dialog box type, the full path to the config file, you want to use.
Example:/usr/src/linux-2.4.18-5/configs/kernel-2.4.18-i686.config
In the dialog box, enter the full path file name you want to use.
For example:/usr/src/linux-2.4.18-5/configs/kernel-2.4.18-i686.config
Click "OK" to load the Config and exit the dialog box.
Click OK to load the configuration and exit the dialog box.
Click "File Systems"
Scroll down and find "NTFS filesystem support (read only)"
Point "File Systems" and then find "NTFS filesystem support (read only)"
Click ' m ' to ' build NTFS support as a module.
Point m to compile the NTFS support into a module.
Click "Main Menu"
Point "Main Menu"
Click "Save & Exit"
Point "Save & Exit"
An informational dialog box'll popup telling you to run ' make DEP '
Click "OK"
An information dialog box will pop up and tell you to run "make DEP" and click "OK".
Open the TopLevel Makefile in a text editor. This would be/usr/src/linux-2.4.18-5/makefile
Look at the "the" four lines in the Makefile.
Open the topmost makefile with a text editor. It's/usr/src/linux-2.4.18-5/makefile.

VERSION = 2
Patchlevel = 4
Sublevel = 18
Extraversion = -5custom

Remove the word "custom" from the ' End of the ' extraversion line.
Save the changes and exit
Can see as the content, the extraversion this line of "custom" deleted "Into extraversion = -5". "

"Make DEP"
[Root@garfield linux-2.4]# make DEP


Compile the NTFS module.
Compile the NTFS module.
"Make Modules Subdirs=fs/ntfs"
[Root@garfield linux-2.4]# make modules Subdirs=fs/ntfs


Create a directory for the NTFS module
Creates a directory of NTFS modules.
Mkdir/lib/modules/2.4.18-5/kernel/fs/ntfs


Copy the NTFS.O module to the directory for you just created.
Copy the NTFS.O module to the newly created directory.
Cp/usr/src/linux-2.4.18-5/fs/ntfs/ntfs.o/lib/modules/2.4.18-5/kernel/fs/ntfs


Set the permissions on the NTFS.O module to make sure they are correct.
Plus access permission.
chmod 0644/LIB/MODULES/2.4.18-5/KERNEL/FS/NTFS/NTFS.O


Update your MODULES.DEP
Update your MODULES.DEP.
/sbin/depmod-a


Thats it. You are are now ready the new NTFS.O module.
It's over, you can use the new NTFS.O module now.

Accessing your NTFS partitions
Access to your NTFS partitions
You'll have to create a mount point and add a entry to/etc/fstab for the NTFS partitions you want to access.
You should create a mount point, which is actually a directory, and add a record to the/etc/fstab to access the NTFS partition you want to access

There are many different options can use to mount the partition depending the upon.
You can decide your options for accessing NTFS according to your needs.
If you are have a single user system or don ' t need to give others access to the partition, your can use this.
Replace "xxx" on the UID and GID with your UserID and group IDs.
If you are a single-user system you do not need to give access to other people: you can:
/dev/hdc2/mnt/windows NTFS noauto,user,uid=xxx,gid=xxx,umask=007 0 0


You can find out what your UserID and GroupID are with:
You can use the following command to find your User ID and group ID

$ CAT/ETC/PASSWD | grep username
Username:x:500:500:realname:/home/username:/bin/bash

If you are were using the above user, The/etc/fstab entry would be:
If you are using the user as above, the command is as follows:
/dev/hdc2/mnt/windows NTFS noauto,user,uid=500,gid=500,umask=007 0 0

"It doesn't matter if I don't translate, I test the discovery can use the iocharset=cp936 option, but
codepage=936 is not good to make "

Description of the options above.

Noauto = Don ' t mount at boot

user = Allow An ordinary user to mount, but only the user who mounted it can unmount the drive.

UID = sets owner for the partition and the files on it.

GID = Sets group for the partition and the files on it.

Umask = Sets the permissions on the partition.


The above mount options won't be correct to all situations. This is just an example.

For more information your should read the manpage for the "Mount" command. This manpage explains
The Mount options available for the NTFS and other filesystems.


-->additional Information
The Linux-ntfs Project http://linux-ntfs.sourceforge.net
All software titles and services are copyrighted by their respective owners.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.