LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 03-10-2005, 02:15 PM   #1
thales
LQ Newbie
 
Registered: Jun 2002
Distribution: Kubuntu 14.04 LTS
Posts: 15

Rep: Reputation: 1
kernel source tree problem


Hi,
i'm using mdk 10.1 official, and i'm running into problems after a kernel compilation :
when running hsfconfig for my connexant modem i get the following msg :-
----------------------------------
WARNING: the kernel version (2.6.8.1-12mdkcustom) defined in
/lib/modules/2.6.8.1-12mdksmp/build/include/linux/version.h
does not match the currently running kernel (2.6.8.1-12mdksmp)
The cause of this problem is an incorrect kernel source path.
Please check that /lib/modules/2.6.8.1-12mdksmp/build points to the right tree.
The cause of this is usually a missing or unconfigured
kernel source tree (and sometimes an incorrect directory or symbolic link).
----------------
and now an identical problem when trying to config vmware 5.0 :
---------------
The directory of kernel headers (version 2.6.8.1-12mdkcustom) does not match
your running kernel (version 2.6.8.1-12mdksmp). Even if the module were to
compile successfully, it would not load into the running kernel.
---------------------
how can i configure that? i tried to some modifications on
/usr/src/linux-2.6.8.1-12mdk/include/linux/version.h
which contains :
#define UTS_RELEASE "2.6.8.1-12mdkcustom"
#define LINUX_VERSION_CODE 132616
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
replacing 2.6.8.1-12mdkcustom with 2.6.1.-12smp with no success
 
Old 03-10-2005, 03:23 PM   #2
opjose
Senior Member
 
Registered: Sep 2004
Location: Outlying D.C.
Distribution: Mandriva
Posts: 2,090

Rep: Reputation: 46
First make -SURE- that the kernel source you are installing is the SAME as your current kernel.

e.g.

uname -r

should match

rpm -qa | grep kernel-source

If not UNINSTALL the existing kernel-source

rpm -e kernel-source

And then re-install the correct source using RPM.

It is VERY important -NOT- to touch, or reconfigure the installed kernel tree for a lot of applications.

Running make clean; make dep; make xmenu, etc. will create a custom configuration and your driver installations MAY fail, as they do more often then not.

Usually this is all that is required, but on occasion (as with SMP) you may need to rebuild things...

In this case edit the /usr/src/linux/Makefile

And at the top you'll find a line which reads

EXTRAVERSION=-xxxmdkcustom

Change ONLY the suffix to match your kernel version

e.g.

EXTRAVERSION = -12mdksmp

NOW try to recompile your module.

If it fails, go back into the /usr/src/linux directory and type

make bZimage modules

And go watch a movie...

After it's FINALLY done, build your module again.
 
Old 03-18-2005, 08:54 AM   #3
thales
LQ Newbie
 
Registered: Jun 2002
Distribution: Kubuntu 14.04 LTS
Posts: 15

Original Poster
Rep: Reputation: 1
Hi,
i'm sorry for this so late reply, as you can guess i have broken my system, no modules were loaded at startup even vfat so cannot access my windows partitions. i don't know what happened, and all the stuff was caused by the smp version of kernel and source that doesn't mach it.
i decided to download the latest stable version of kernel from kernel.org, which is 2.6.11.2.
after successsfull config and compilation now i cannot boot with this new kernel, the system hangs at startup :
-------
VFS: cannot open root device "805" or unknmown block (8,5)
Please append a correct "root=" boot option.
kernel panic not syncing: VFS : unable to mount root fs on unknown-block(8,5).
--------------
i found with some search that it was due to a wrong initrd file used, i tried to create one that matches the new kernel but with no success :

[root@localhost boot]# mkinitrd /boot/initrd-2.6.11.2.img 2.6.11.2
No module ata_piix found for kernel 2.6.11.2, aborting.

[root@localhost boot]# mkinitrd /boot/initrd-2.6.11.2.img /lib/modules/2.6.11.2
/sbin/mkinitrd: line 75: /lib/modules/2: syntax error: operand expected (error token is "/lib/modules/2")
/lib/modules//lib/modules/2.6.11.2 is not a directory.
[root@localhost boot]#

[root@localhost linux]# make install
CHK include/linux/version.h
make[1]: « arch/i386/kernel/asm-offsets.s » est à jour.
CHK include/asm-i386/asm_offsets.h
CHK include/linux/compile.h
CHK usr/initramfs_list
Kernel: arch/i386/boot/bzImage is ready
sh /usr/src/linux-2.6.11.2/arch/i386/boot/install.sh 2.6.11.2 arch/i386/boot/bzImage System.map ""
Looking for deps of module ata_piix
No module ata_piix found for kernel 2.6.11.2, aborting.
mkinitrd failed:
(mkinitrd -v -f /boot/initrd-2.6.11.2.img --ifneeded 2.6.11.2)) at /usr/lib/libDrakX/bootloader.pm line 121.
make[1]: *** [install] Erreur 2
make: *** [install] Erreur 2
[root@localhost linux]#
------------------------------
here is a sample of my lilo.conf :
boot=/dev/fd0
map=/boot/map
keytable=/boot/fr-latin1.klt
prompt
nowarn
timeout=100
message=/boot/message
menu-scheme=wb:bw:wb:bw
image=/boot/vmlinuz
label="linux"
root=/dev/sda5
initrd=/boot/initrd.img
append="acpi=ht resume=/dev/sda6 splash=silent"
vga=788
read-only
image=/boot/vmlinuz-2.6.11.2
label="2.6.11.2"
root=/dev/sda5
append="acpi=ht resume=/dev/sda6 splash=silent"
vga=788
read-only
image=/boot/vmlinuz
label="linux-nonfb"
root=/dev/sda5
initrd=/boot/initrd.img
append="acpi=ht resume=/dev/sda6"
read-only
image=/boot/vmlinuz-2.6.8.1-12mdk
label="2681-12"
root=/dev/sda5
initrd=/boot/initrd-2.6.8.1-12mdk.img
append="acpi=ht resume=/dev/sda6 splash=silent"
vga=788
read-only
image=/boot/vmlinuz-2.4.27-0.pre2.1mdk
label="2427-0pre21"
root=/dev/sda5
initrd=/boot/initrd-2.4.27-0.pre2.1mdk.img
append="devfs=nomount acpi=ht resume=/dev/sda6 splash=silent"
vga=788
read-only
image=/boot/vmlinuz
label="failsafe"
root=/dev/sda5
initrd=/boot/initrd.img
append="failsafe acpi=ht resume=/dev/sda6"
read-only
other=/dev/sda1
label="windows"
table=/dev/sda
other=/dev/sda3
label="windows1"
table=/dev/sda
-----------
note that i have removed the line initrd=/boot/initrd.img from the 2.6.11.2 entry and that changes nothing.
how can i create this initrd-2.6.11.2.img ? is there a specific option to add when running xconfig to add this module ata_piix
?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to integrate driver source into kernel source tree zhchang Linux - Software 5 11-23-2005 12:34 AM
Kernel Source Tree? raxxal Fedora 1 04-07-2005 05:14 PM
Kernel source tree ... Solstice Mandriva 6 10-05-2004 12:30 PM
where is linux source build directory/kernel source tree? webazoid Linux - Software 2 07-01-2004 08:37 PM
No kernel source tree? rhuntley12 Debian 3 04-14-2004 10:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva

All times are GMT -5. The time now is 10:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration