can't find /usr/src/linux/2.4.20-30.9
Im trying to mount my fuji finepix A303 Running Redhat 9.2 With kernel
2.4.20-30.9 I googled and found a How-To . But I can't find kernel source directory /usr/src/linux get bash: cd: /usr/src/linux No such file or directory Help please :(daniel31 |
Maybe you don't have the kernel source installed. What do you have in /usr/src?
|
up2date kernel-source
then link /usr/src/linux to /usr/src/linux-2.4 which is a link to the top of the source tree. Only old kernel module add-ons look for /usr/src/linux. They should look for /lib/modules/$(uname -r)/build instead. |
download the files as follows.
Hi You can get them off the 3rd disk or download them. i've written a little how-to below which may be of assistance. First you have to find your kernel version so as we can match up the right source code files (as you ahve already done). So type in: $ uname -r <enter> This should print on the screen the kernel version number. My system returned kernel-2.4.20-6 Write this number down somewhere. Next you have to determine if you have the source files installed. Type in: $ rpm -qa | fgrep kernel <enter> This should give you amongst other things the following 2 lines: kernel-source-2.4.20-6 kernel-2.4.20-6 Obviously the numbers should match your kernel, as in the previous section. Beware that some Red Hat 9 distributions come with the ‘kernel-2.4.20-8’. If the "kernel-source-2.4.20-6" is there it means that you don’t need the kernel source package as it’s already installed. If the kernel-source-2.4.20-6 line isn’t there, it means you’re going to have to download, unpack and install it. You will need the following rpm: "kernel-source-2.4.20-6.i386.rpm" (again ajust numbers to suit your version) Which you might find on the 3rd cd if you have it, otherwise you can download it from http://rpm.pbone.net/index.php3/sta...6.i386.rpm.html This will probably take a while as its 35mb big. If you have access to a broadband connected computer from a friend or work, use it, otherwise it takes about 3 hours to download over a winModem. I didn’t have access to broadband so had to take the long road. The thing is, this file is crucial. Obviously change the 2.4.20-6 numbers if yours differ. Once downloaded this should give you a file called. kernel-source-2.4.20-6.i386.rpm Place this rpm into a new directory/folder in your home directory, then enter the directory and run the following command from the command line, as root: # rpm –ivh kernel-source-2.4.20-6.i386.rpm <enter> This may take a while before the command prompt is returned to you depending on your system. Basically it is creating two directories called linux-2.4.20-6 and linux-2.4 in your /usr/src directory. linux-2.4 is a symbolic link to linux-2.4.20-6. Don’t concern yourself with this fact just yet. Once the command line is returned to you, type in # cd /usr/src <enter> # ls <enter> Several directories should be printed back to the screen. The ones we are concerned with are. linux-2.4.20-6 linux-2.4 You now need to make a symbolic link to a directory called "linux". Some older software packages need this apparently. To make this link, simply type in : # ln -s linux-2.4.20-6 linux <enter> Now type in: # ls <enter> You should now see the following files in the list linux-2.4.20-6 linux-2.4 linux Don’t be concerned if they appear as different colours, this just means they are links. What is relevant is that the files are there. You should now have the appropriate kernel source files to re-build your driver. if you update your kernel down the track, also update the source file. regards GT |
Thanks all for the help, But I am still having problems. My kernel is
2.4.20-30.9.i586 and i can't locate a kernel-source-2.4.2030.9.i586.rpm would it be named something else Daniel31:newbie: dist. redhat 9.2 |
It should be called linux-2.4.20 And unless RH puts it in a different spot which I dont think it does you should find it in /usr/src If it's not there you can always dl the kernel and unpack it to /usr/src.
http://kernel.org/ edit: or it might be on one of the install cds |
scroll down the URL page below for the i386 source file. i've done some digging, but can't find a i586 source file, although i reckon it should work. i used the i386 source file on a i686 system without any dramas.
https://rhn.redhat.com/errata/RHSA-2004-065.html regards GT |
Redhat only has the source for i386. I have also used this source on an i686, with no ill effects.
Regards, John :) |
hello,
i have done compiling and installing my kernel almost a week ago using the 2.4.20-30.9 ive got from redhat mirrors.. here --->(http://www.redhat.com/download/mirror.html), just click the "updates links", and try to go to red-hat/updates/OS/en/9/srcrpms (or something) and find "(your)kernel-source(newest version)" after you have got that, run a command prompt/terminal and type "rpm -Uvh (yourkerne)l.rpm",, all seems well... but wait!!!you have an error.. like "err:: usr/src/redhat/SOURCE not found" !!!! well check first if you have a "redhat" folder inside /usr/src/ . if you do'nt have one, make folder/directory named redhat inside /usr/src/. if still not working, try to make SOURCES(case sensitive) directory inside redhat folder... if it doesn't work. try to have "kernel-develepment-tools" installed by using the "add/remove" from the panel. and then try "rpm -Uvh (yourkerne)l.rpm" again. if it is successful, try going to /usr/src/redhat/SOURCES/ try to find "linux-4.20-30.9.tar.gz" and gzunzip it.... after that cd into the linux\linux-2.4.20-30.9\, if you see files like "makefiles" and alotta folders (arch,configs), this is were you build the kernel.... well i hope this works, works for me though... gudluck!!! :) |
All times are GMT -5. The time now is 02:21 AM. |