OMP: Red Hat: A quick way to enable NTFS Support
一種讓紅帽子7.3能支持ntfs的快速方法
Red Hat: A quick way to enable NTFS Support (text only version)
文本版
Created: June 9, 2002
Modified: June 20, 2002
Author: Jim Hayward
Author E-mail: jimhayward@earthlink.net
Copyright 2002, Jim Hayward. All Rights Reserved.
Distro Specific: Red Hat Linux
Relevant Links:
http://www.redhat.com
http://linux-ntfs.sourceforge.net
Title: Red Hat: A quick way to enable NTFS Support
Section: Distribution Specific
Sub-Section: Red Hat Linux
What is NTFS?
什么是NTFS
NTFS is the filesystem used by Windows NT, Windows 2000, and Windows XP.
NTFS是Windows NT, Windows 2000, 和 Windows XP所使用的文件系統(tǒng)
Why didn't Red Hat enable NTFS support in their kernels?
為什么紅帽子不在其內(nèi)核中直接支持NTFS?
Editors note: Anton Altaparmakov, the ntfs maintainer, took offense to my stating
that read only support can cause data corruption problems. You can read his e-mail
to me here
編者按:安東 艾爾塔帕馬科夫,ntfs的維護(hù)人員,對(duì)我關(guān)于只讀支持能造成數(shù)據(jù)損壞問題的說法感
到憤怒。這里你可以讀到他給我的妹兒。
My prior statement was not in any way meant to be 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, WILL EAT YOUR DATA!
我先前的陳述沒以任何方式激怒他,所以我刪了他反對(duì)的一段。可是,在過去一段時(shí)間,ntfs模塊甚至
在使用只讀模式時(shí)也曾造成文件系統(tǒng)的崩潰。如果打開它的寫支持,將吃掉你的數(shù)據(jù)!
Why is NTFS support poor under Linux?
為什么NTFS在linux中支持得這么差?
Microsoft chooses not to release the 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.
微軟不發(fā)布在windows以外的其他系統(tǒng)中支持ntfs的驅(qū)動(dòng)程序所必需的信息。這是使為其寫的驅(qū)動(dòng)容易造成
很多錯(cuò)誤的最根本的原因。
This may lead you to ask the question, "Then why is 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.
你可能因此問到:為什么linux支持FAT和FAT32很好呢?NTFS文件系統(tǒng)比FAT和FAT32要復(fù)雜得多,所以使得給
它寫驅(qū)動(dòng)要復(fù)雜得多。
Alternatives to using NTFS support
使用NTFS的替代方法。
Create an FAT32 (vfat) partition and store the data you need to access from Linux on it.
建立一個(gè)FAT32分區(qū)。把你需要從linux訪問的數(shù)據(jù)放在這個(gè)分區(qū)里。
Is your system up to date?
你的系統(tǒng)是最新的了嗎?
I am going to assume you 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
我打算假定你已經(jīng)把你的紅帽子7.3升級(jí)到目前所能得到的最新的內(nèi)核。目前最新的是2.4.18-5(譯者注:
不升級(jí)也完全可以這樣做,我在自己機(jī)器測(cè)試過了,而且目前最新版為2.4.18-10)
Installing the kernel sources.
安裝內(nèi)核源文件
First check and see what kernel you are running. You must use the kernel source for the
same kernel you are running.
首先檢查看看你在用什么內(nèi)核在運(yùn)行你的系統(tǒng),你必須用和你的內(nèi)核相同的源文件。
[jimh@garfield jimh]$ uname -r
2.4.18-5
Check to see if you already have the kernel source installed with:
檢查看看你的內(nèi)核源文件的版本:
[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 will see:
如果你沒裝內(nèi)核原文件你將看到這樣的:
[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 not installed, download the source from your favorite Red Hat mirror
site. You will need to be logged in as root to install the kernel source. Install the kernel
source with:
如果內(nèi)核源文件沒裝,從Redhat的站點(diǎn)下載一個(gè),你需要用root權(quán)限裝它。用如下命令:
rpm -ivh kernel-source-2.4.18-5.i386.rpm
If you are registered with The Red Hat Network you can also use up2date to install the kernel.
This will download and then install the kernel-source for you.
如果你已經(jīng)是redhat網(wǎng)的注冊(cè)用戶,你可以用up2date命令來安裝kernel,這樣的命令將下載并安裝kernel source
up2date kernel-source
Preparing the kernel source
準(zhǔn)備內(nèi)核源文件
Login as the root user.
以root用戶登錄
Change to the /usr/src/linux-2.4.18-5 directory
換到/usr/src/linux-2.4.18-5目錄
[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 was used to compile the kernel you have installed.
載入RedHat用于編譯你所安裝的內(nèi)核的內(nèi)核配置文件(作者這個(gè)是athlon速龍)
[root@garfield linux-2.4]# rpm -q --qf '%{ARCH}\n' kernel-2.4.18-5
athlon
Click "Load Configuration from file"
點(diǎn)擊"Load Configuration from file"
Side note: Red Hat did not ship an i586 uniprocessor kernel with 7.3. If you have a uniprocessor
i586 system the command above will probably return i386. Use the i386.config if it does.
旁記:RedHat沒發(fā)行7.3的i586 uniprocessor內(nèi)核,如果你用了i586 uniprocessor上面的系統(tǒng)將返回i386.這種情況
下就用i386.config
You can look in /usr/src/linux-2.4.18-5/configs to see what the default kernel configs Red Hat
uses to compile their kernels.
你可以看看/usr/src/linux-2.4.18-5/configs來看看紅帽子都有哪些缺省的內(nèi)核配置
[jimh@garfield jimh]$ ll /usr/src/linux-2.4.18-5/configs
total 564
-rw-r--r-- 1 root root 39830 May 2 14:36 kernel-2.4.18-athlon.config
-rw-r--r-- 1 root root 39858 May 2 14:36 kernel-2.4.18-athlon-smp.config
-rw-r--r-- 1 root root 49146 May 2 14:36 kernel-2.4.18-i386-BOOT.config
-rw-r--r-- 1 root root 40020 May 2 14:36 kernel-2.4.18-i386.config
-rw-r--r-- 1 root root 39960 May 2 14:36 kernel-2.4.18-i386-smp.config
-rw-r--r-- 1 root root 39957 May 2 14:36 kernel-2.4.18-i586.config
-rw-r--r-- 1 root root 39897 May 2 14:36 kernel-2.4.18-i586-smp.config
-rw-r--r-- 1 root root 40021 May 2 14:36 kernel-2.4.18-i686-bigmem.config
-rw-r--r-- 1 root root 39968 May 2 14:36 kernel-2.4.18-i686.config
-rw-r--r-- 1 root root 40414 May 2 14:36 kernel-2.4.18-i686-debug.config
-rw-r--r-- 1 root root 39966 May 2 14:36 kernel-2.4.18-i686-smp.config
-rw-r--r-- 1 root root 35944 May 2 14:36 kernel-2.4.18-i686-uml.config
-rw-r--r-- 1 root root 40170 May 2 14:36 kernel-2.4.18-x86_64.config
-rw-r--r-- 1 root 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
在對(duì)話框輸入你要用的全路徑文件名,
比如:/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.
點(diǎn)"Ok"來載入配置并退出對(duì)話框。
Click "File Systems"
Scroll down and find "NTFS filesystem support (read only)"
點(diǎn)"File Systems"然后找到"NTFS filesystem support (read only)"
Click "m" to build NTFS support as a module.
點(diǎn)m來把NTFS支持編譯成一個(gè)模塊。<