PDA

View Full Version : NTFS-module for FC2 Test2 .ko generation


yaekee
2nd May 2004, 11:01 AM
as http://fedoranews.org/contributors/hernan_fernandez/ntfs/
compile result in a lot of errors.
when I make modules, it always generate the .o modules file not .ko modules file. so I can not install it.
I am eager to compile the ntfs module, I use ntfs file system in windows
Help Me!

Bana
3rd May 2004, 02:28 AM
yaekee: I split your thread to here as it will probably be better answered here. For some reason (I haven't done this before) it only moved your one post so I will recopy the posts pertinent:
MacLeod: When i compiled my modules it genereted both .o and .ko.
And if i am getting it alright the *.o is used in 2.4.x but in 2.6.x they changed so kernelmodules called *.ko insted.

Correct me if i wrong.

But if you compiled new modules with a 2.6-kernel you should have gotten both *.o and *.ko.

Please post the errors and someone should be able to help you.yaekee: the only thing I did was as below

The platform is FC2T3.
I had installed the default kernel source code linux-2.6.5-1.327, I just make mrporper; make menuconfig;
and chose the ntfs module;
make modules(I not make bzImage because I think that is not necessary), but to my surprise, it only compile the .o modules not the .ko modules which I want to install.
I think maybe i will post my .config, but it is too long.
Is that detailed?

Bana
3rd May 2004, 02:32 AM
I am having this problem to (with FC2 Test3) It is only generating the .o file and renaming it to .ko just makes modprobe angry. Any ideas?

LordMorgul
3rd May 2004, 11:47 AM
Actually, it may be necessary to build the kernel image first in the 2.6 structure. If you build the code externally from the tree it should work without compiling the kernel first, but that should be done referencing to /lib/modules/2.6.5-1.327/build rather than the source tree.

First thing to try would be building the whole kernel and modules in one swoop...

And, before building them, edit the Makefile to remove the custom addition to the EXTRAVERSION.

yaekee
7th May 2004, 03:07 PM
I just change the directory in /lib/modules/2.6.5-1.327/ and make mrproper; it fails, make xconfig, it succeed but when I make bzImage or modules, it fails,
CHK include/asm-i386/asm_offsets.h
/bin/sh: line 1: arch/i386/kernel/asm-offsets.s: No such file or directory
UPD include/asm-i386/asm_offsets.h
mv: cannot stat `include/asm-i386/asm_offsets.h.tmp': No such file or directory
make: *** [include/asm-i386/asm_offsets.h] Error 1
So I can not Know how to do, I am only a fresh man of linux kernel programing.
I only want to get the ntfs module for my computer to visit the windows partion.
thanks for your more detailed explaination

LordMorgul
7th May 2004, 06:41 PM
/lib/modules/2.6.5-1.327/ does not contain sourcecode, it only contains headers and files that are generated during the compile (to give information required for compiling external modules).

The sourcecode will be found in /usr/src/linux-2.6.5-1.327

If you want to compile the NTFS module, you have to install the sourcecode... either install the matching kernel-source RPM or the kernel-<version>.src.rpm (which would need rebuilding with the rpmbuild -bs command).

Once you have the source you can follow a typical kernel compilation how-to... but in the source directory. The configs will be found in the configs directory in the source. Start with the default, and just add the NTFS options you need for your first rebuild experience.

LordMorgul
7th May 2004, 06:46 PM
Originally posted by Bana
I am having this problem to (with FC2 Test3) It is only generating the .o file and renaming it to .ko just makes modprobe angry. Any ideas?

Are you guys sure you aren't building the module INTO the kernel.. rather than making it a module? The sourcecode 'intermediate' step when compiling into the kernel will leave behind a .o file.. but the .ko will not be created or necessary.

CONFIG_NTFS_FS=m
# CONFIG_NTFS_DEBUG is not set
# CONFIG_NTFS_RW is not set

The second two options can be turned on with =y, but don't do that. :)

yaekee
8th May 2004, 02:25 AM
I am surprise to see when someone told me compile the kernel in /lib/modules/.../build, I also install the sourcecode.
But the biggest problem I met is not compiling the kernel and modules.
I find the modules compile is .o not .ko. I do not want to compile ntfs support in bzImage, I want to compile a ntfs.ko.
When I make gconfig, it copy the original config from /boot.
I find this config and /usr/src/.../.config also set CONFIG_KMOD=y, why they do not compile the ko modules, I think I can just remark this or copy a config from directory config to compile the kernel again.

yaekee
8th May 2004, 02:27 AM
Originally posted by LordMorgul
Are you guys sure you aren't building the module INTO the kernel.. rather than making it a module? The sourcecode 'intermediate' step when compiling into the kernel will leave behind a .o file.. but the .ko will not be created or necessary.

CONFIG_NTFS_FS=m
# CONFIG_NTFS_DEBUG is not set
# CONFIG_NTFS_RW is not set

The second two options can be turned on with =y, but don't do that. :)
I am sorry that I am careful enough to compile the kernel and modules, all the modules I compile only generate the .o modules.

edgheury
22nd May 2004, 11:01 PM
Well I got the same problem: no way to get NTFS working on FC2.......... Here's how I solve it (all the steps even the dumbest ones":

1. install the kernel source that come with the distro

2. log as root and change to your /usr/srcf/linux-`uname -r` directory

where `uname -r` stands for your kernel version

3. To be sure: go to your kernel source dir and do a "make clean" + "make mrproper" -> this will clean all your custom configuration files

4. copy the /boot/config-`uname -r` into /usr/src/linux-`uname -r`/.config

5. open the /usr/src/linux-`name -r`/Makefile and change the EXTRAVERSION to match your real kernel version (that's `uname -r`)

(before doing this my EXTRAVERSION was 2.6.5-1.358custom and I experienced problem loading the module with "Invalid module format" since the kernel version is 2.6.5-1.358 and NOT 2.6.5-1.358custom)

6. make gconfig

-> select NTFS support in "Filesystems tab"

7. make prepare

8. make SUBDIRS=fs/ntfs modules

-> here you'll get "ntfs.ko"

9. cp fs/ntfs.ko /lib/modules/`uname -r`/kernel/fs/ntfs/ntfs.ko

10. /sbin/depmod (to be sure)

11. /sbin/modprobe ntfs

HERE IT IS !!!!!!!!!!!!

=> HINT: when you mount your NTFS partition with fstab, use to options ro,umask=0222 instead of defaults to allow non-root users to access the NTFS partition.

------------------------------------------------------
Edmond Gheury
edgheury@flashmail.com

LordMorgul
22nd May 2004, 11:58 PM
FC2 release kernels now have NTFS modules available at http://linux-ntfs.sourceforge.net

yaekee
23rd May 2004, 01:59 AM
thank edgheury for your detail tutorial, thank LordMorgul for you information although I have download that already.