LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Kernel Sources required for NFTS support (https://www.linuxquestions.org/questions/linux-newbie-8/kernel-sources-required-for-nfts-support-290146/)

darkblane 02-14-2005 01:12 PM

Kernel Sources required for NFTS support
 
Linux version: Fedroa Core 3, kernel 2.6.10-1.760

Hi, I have been using Linux on and off for a while and always seem to hit a brick wall with the same problem.
On this occasion I was trying to install Paragon NTFS for Linux (Demo) under Fedroa Core. The shell script keeps prompting me that it cannot find the Kernel Sources (I have had similar errors under RedHat,Suse etc). Logic dictates that I download the Kernel source rpms and install, which I did.
Once again, running the ./install.sh file gives the same error. When the install.sh file is viewed, the script is looking to /usr/src/linux for the kernel headers. This doesn't match the dir structure in Fedora which appears to be /usr/scr/redhat/SOURCES. I tried creating the required dir structure and copied the contents of the /usr/scr/redhat/SOURCES folder to it but then got another error message saying it couldn't determin which kernel I was running
Has anyone attempted to install the Paragon NTFS driver in Fedroa or RedHat and if so did you get similar problem???
I have got read access working using another driver, but the retail paragon product offers write access which I need. I would gladly buy it if I can get the demo product working.

Any advice??

Thanks in advance.

ArthurDent 02-14-2005 01:34 PM

Make sure you know what version of the kernel you are running. In a terminal (as root) type uname -v and see what the output is.

You might also want to do the following to what kernel related stuff you have installed:
rpm -qa | grep kernel

Be careful to make sure that you don't install something called "kernel<somenumber>.src.rpm" because this is not the kernel source but the sourcecode for the rpm (a different thing altogether).

You need to look for something that looks like "kernel-sourcecode-2.6.10-????_FC3.noarch.rpm" where 2.6.10-??? is the same version number as you got from the "uname" command.

Once you have found and installed this you will have the sources to go with your kernel.

Hope that helps

Mark

darkblane 02-14-2005 04:21 PM

Mark, thanks for the reply.

The Kernel running is 2.6.10-1.760 (should have been at the start of my post)

"You might also want to do the following to what kernel related stuff you have installed:
rpm -qa | grep kernel"

[root@localhost ~]# rpm -qa | grep kernel
kernel-2.6.10-1.760_FC3
kernel-module-ntfs-2.6.10-1.760_FC3-2.1.22-0.rr.4.3
kernel-utils-2.4-13.1.49_FC3
kernel-2.6.9-1.667
[root@localhost ~]#


"Be careful to make sure that you don't install something called "kernel<somenumber>.src.rpm" because this is not the kernel source but the sourcecode for the rpm (a different thing altogether)."

Ok, you've him the nail on the head here. I have been trying for months using Suse, RedHat,Mandrake,Debain to get a grip of the "Kernel headers" & "kernel source" meaning. Despite countless searchs, queries amonst peers, no-one has clarified it for me.
As it turns out, you are exactly right, I installed the kernel-source.rpm.
It is at this point that my experiences with Linux in general show a common theme. No matter what distro I try, and I have tried LOTS, I always get stuck with this "kernel headers" or "kernel sources" problem. It's clear from your reply that I have mis-understood this and would greatly appreciate it if you could clarify how I would go about obtaining the correct files and installing then to the correct location to satisfy the dependencies of not only the Paragon NTFS problem, but other apps that fail to install due to the same dependency.
I now realise my problem is a generic one that applies to all distros, so if you could give me any advice that is not distro specific I woulld really appreciate it.
What I'm striving to learn is;
1) How do I know if the Kernel Headers/Source is installed?
2) How do I install the Kernel Headers?
3) Once installed, do I need to compile anything?

Thanks in advance,

Karl.

ArthurDent 02-14-2005 05:12 PM

Karl,

I'm sorry I seem to have led you astray. I am still running FC2 and I didn't realise that as of FC3 Red Hat no longer supply "sourcecode" rpms. You can, however use the .src.rpm file as descibed here....

I reproduce the relevant section below :

Code:

In order to eliminate the redundancy inherent in providing a separate package for the kernel source code when that source code already exists in the kernel's .src.rpm file, Fedora Core 3 no longer includes the kernel-source package. Users that require access to the kernel sources can find them in the kernel .src.rpm file. To create an exploded source tree from this file, perform the following steps (note that <version>  refers to the version specification for your currently-running kernel):

  1.

      Obtain the kernel-<version>.src.rpm file from one of the following sources:
          *

            The SRPMS directory on the appropriate "SRPMS" CD iso image
          *

            The FTP site where you got the kernel package
          *

            By running the following command:

            up2date --get-source kernel
  2.

      Install kernel-<version>.src.rpm (given the default RPM configuration, the files this package contains will be written to /usr/src/redhat/)
  3.

      Change directory to /usr/src/redhat/SPECS/, and issue the following command:

      rpmbuild -bp --target=<arch> kernel.spec

      (Where <arch> is the desired target architecture.)

      On a default RPM configuration, the kernel tree will be located in /usr/src/redhat/BUILD/.
  4.

      In resulting tree, the configurations for the specific kernels shipped in Fedora Core 3 are in the /configs/ directory. For example, the i686 SMP configuration file is named /configs/kernel-<version>-i686-smp.config. Issue the following command to place the desired configuration file in the proper place for building:

      cp <desired-file> ./.config
  5.

      Issue the following command:

      make oldconfig

You can then proceed as usual.

You can find the rpm (the answer to step 1) here...

Having downloaded that to a location of your choice you can do step 2 with the command
Code:

cd /path_to_directory_where_you_downloaded_the_file
rpm -Uvh kernel-2.6.10-1.760_FC3.src.rpm

After that I'm afraid you will have to hope that someone else here can help you with the next steps. It's not something I've done - or needed to do as yet.

Sorry to have misled you...

Best regards

Mark

darkblane 02-15-2005 03:57 AM

Mark, thanks for the info.
I'll have a look into that when I get home from work. I did try using VNC to access my PC but unfortunately I've set grub to boot to XP by default so I can only access XP from work, unless these is a way I can edit the boot loader via Windows to change the default OS!
Will post the results of your post this evening.

regards,

Karl


All times are GMT -5. The time now is 01:50 PM.