QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1807|回复: 1

再贴一个ntfs的解决之道

[复制链接]
发表于 2002-10-30 12:16:30 | 显示全部楼层 |阅读模式
最近浏览sourceforge.net,发现
http://linux-ntfs.sourceforge.net/index.html
介绍了一个新的ntfs的解决办法for rh8.0:
下载http://linux-ntfs.sourceforge.net/info/redhat.html里面提供的对应的kernel-ntfs*.o
cp kernel-ntfs*.o /src/2.4.*/kernel/fs/ntfs/ntfs.o
depmod -A
ok,可以mount了。
如果嫌麻烦,直接下载对应的rpm包,安装就可以了。
 楼主| 发表于 2002-11-10 22:33:36 | 显示全部楼层
这个网站上不了了。大家从这个地方下rpm包吧:
http://fr2.rpmfind.net/linux/rpm2html/search.php?query=kernel-ntfs

下面是E文说明:

Linux NTFS Project
This page is part of the Linux NTFS Project. For more information about NTFS, please read the FAQ (Frequently Asked Questions).

About RedHat
Disclaimer
Instructions I
Downloads
Instructions II
When things go wrong
How was it done?
About RedHat
Due to the uncertain legal status of using the NTFS driver, RedHat have chosen to leave the driver out of their kernels.

To read an NTFS partition, you can either install the RPM below, or Compile your own kernel.

Disclaimer
While I have taken care compiling these modules, I cannot guarantee that they will work for you. If they do, great. If not, then sorry, you will either have to compile the kernel yourself or consider a different Linux Distribution.

SMP Users: Please read this.
(If your computer only has one CPU, then you can ignore the rest of this section).

The original NTFS driver (the one in these modules) was written long before SMP processors and pre-emptive kernels became popular. The driver is not SMP safe. That said, it won't crash the minute you use it and even if it did crash, or hang, it will not damage your partition. The only reported problems where when the driver was under a heavy load.

If you need a stable, SMP-safe kernel, then I recommend you download the new driver (as a patch against 2.4.19) and compile your own kernel.

Instructions I
If you know what you are doing, you should be able to install the RPM and mount an NTFS volume immediately. No reboot, no fuss. Below is a set of instructions that explain every step of the way.

First we need to decide which RedHat release you have. Run this command:

    cat /etc/redhat-release
   
and you should see one of the following response:

    Red Hat Linux release 7.3 (Valhalla)
    Red Hat Linux release 8.0 (Psyche)
   
Next find out your kernel version:

    uname -r
   
You should see one of these following responses:

    2.4.18-3
    2.4.18-10
    2.4.18-14
    2.4.18-17.7.x
    2.4.18-17.8.0
   
Finaly we need to see what sort of processor you have and possibly how many. Then look at the table below to decide which file to download.

    cat /proc/cpuinfo
   
If you have a Use this RPM Notes
Athlon, Duron, K7. athlon   
Pentium-Pro, Pentium-II, Pentium-III, Pentium-4, Celeron, Crusoe. i686 Most people will want this one.
586, K5, 5x86, 6x86, 6x86MX, Pentium-Classic, Pentium-MMX, Winchip-2, Winchip-C6, Winchip-2A, Winchip-3, K6, K6-II, K6-III. i586   
386, 486, CyrixIII, VIA-C3, VIA-C5. i386 It is unlikely you will need this unless you are running Windows on some very old hardware.

Next download the RPM. The instructions continue after the download section.

Downloads
This list of downloads should cover the main kernel versions, for RedHat 7.3 and RedHat 8.0. If you aren't certain which one to use, then read the instructions, above.

I haven't managed to test all of these combinations, so I would appreciate an email telling me which version you used and if it worked.
Cheers,
    FlatCap (Rich) [email protected]

N.B. Please click on the links and you will be redirected to SourceForge's mirror page.

RedHat 8.0 - Single Processor
Kernel Version Processor
i386 i586 i686 athlon
2.4.18-14 RPM Module RPM Module RPM Module RPM Module
2.4.18-17.8.0 RPM Module RPM Module RPM Module RPM Module

RedHat 8.0 - Multi-Processor (SMP)
Kernel Version Processor
i386 i586 i686 athlon
2.4.18-14 RPM Module RPM Module RPM Module RPM Module
2.4.18-17.8.0 RPM Module RPM Module RPM Module RPM Module

RedHat 7.3 - Single Processor
Kernel Version Processor
i386 i586 i686 athlon
2.4.18-3 RPM Module RPM Module RPM Module RPM Module
2.4.18-10 RPM Module RPM Module RPM Module RPM Module
2.4.18-17.7.x RPM Module RPM Module RPM Module RPM Module

RedHat 7.3 - Multi-Processor (SMP)
Kernel Version Processor
i386 i586 i686 athlon
2.4.18-3 RPM Module RPM Module RPM Module RPM Module
2.4.18-10 RPM Module RPM Module RPM Module RPM Module
2.4.18-17.7.x RPM Module RPM Module RPM Module RPM Module

Instructions II
You must be root for the rest of the commands. The examples will continue as if you downloaded kernel-ntfs-2.4.18-14.i686.rpm. Next install the rpm:

    rpm -Uhv kernel-ntfs-2.4.18-14.i686.rpm

    Preparing...                ########################################### [100%]
       1:kernel-ntfs            ########################################### [100%]
   
There should be no errors, just #'s.

This is the only command we actually needed, but we'll go on and test what we have done. Remember, you may have to change the commands slightly for your kernel version.

Next load the kernel module

    modprobe ntfs
   
There should be no output. If there are a lot of error messages see the when things go wrong section.

    dmesg | grep NTFS

    NTFS driver v1.1.22 [Flags: R/O MODULE]
   
We can now check that the kernel really understands NTFS. The output may vary slightly, but you are looking for the entry ntfs.

    cat /proc/filesystems

    nodev   rootfs
    nodev   bdev
    nodev   proc
    nodev   sockfs
    nodev   tmpfs
    nodev   shm
    nodev   pipefs
            ext3
            ext2
    nodev   ramfs
    nodev   devpts
            ntfs
   
Finally, let's mount a filesytem. First you need to know which device is your NTFS Volume and you need to create a directory as a mount point. Have a look at Section 4 of the FAQ for more help.

    mkdir /mnt/windows
    mount /dev/hda1 /mnt/windows -t ntfs -r -o umask=0222
    ls -l /mnt/windows

    ...
    -r-xr--r-- 1 root root  9719 Aug 24 1996 ansi.sys
    -r-xr--r-- 1 root root 15252 Aug 24 1996 attrib.exe
    -r-xr--r-- 1 root root 28096 Aug 24 1996 chkdsk.exe
    -r-xr--r-- 1 root root  5175 Aug 24 1996 choice.com
    ...
   
Hopefully everything is working for you now. Most common questions from are answered in the Linux NTFS FAQ.

When things go wrong
Unresolved externals in ntfs.o
This is most commonly caused by downloading the wrong RPM. Very few people will need the i386. Have a read through the instructions and check that you used the correct RPM.
not an rpm package (or package manifest)
This has been caused by SourceForge's download mirror. You have actually saved an HTML page. Go back to the download section and click on the link instead. You will then see a choice of mirrors.
modprobe: command not found
Simply tell the shell where to find modprobe: /sbin/modprobe ...
Remember, to run modprobe you must be logged in as the root user.
If this hasn't helped you sort out the problem, please email me at: [email protected] Please tell me which stage you got to in the instructions and what error messages you got. I'll try to help you, but I cannot promise anything (my time is limited).

How was it done?
Download the kernel-source RPM from RedHat and install it. The only necessary change to make to the source is to remove the custom tag from the top of the main Makefile. Then use this script and this spec file.

Copyright © 2002 flatcap (Richard Russon)
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-11-2 02:30 , Processed in 0.059992 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表