Compile linux kernel error: WARNING: modpost: Found 1 section mismatch(es)
Linux - KernelThis forum is for all discussion relating to the Linux kernel.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Compile linux kernel error: WARNING: modpost: Found 1 section mismatch(es)
HI
I am compiling linux-2.6.26.5 on my machine (ubuntu 8.04). I use the config file under /boot/.And make , it prints
WARNING: modpost: Found 1 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
Root device is (8, 1)
Setup is 10636 bytes (padded to 10752 bytes).
System is 2340 kB
CRC b2c7881
And stops.
I restart and try to boot with this kernel. But it prints out
VFS: unable to mount root fs via NFS, trying floppy
I don't know what's there to fix but it literally says what command to run if you would like to see what's *really* going on. If you make that read 'make CONFIG_DEBUG_SECTION_MISMATCH=y > ./mylogfile.$$ 2>&1' you'll have all output in a file to read later on.
I restart and try to boot with this kernel. But it prints out
VFS: unable to mount root fs via NFS, trying floppy
This is unrelated to the warning you recieved. If you are trying to boot from an unrecognised sata or pata or other device, then you will need to include that in the kernel ( not as a module ). You may need to look for the controller driver from your motherboard if onboard or if you are using an pci card or other addon card, you will need to add that into the kernel. Make sure to add the proper fs support as well if not standard ( ie if using ext2, or reiser or ext4 and only ext3 is supported in the kernel it also won't boot )
Be sure to go through the options when you are using make menuconfig, there are a lot of them ( options )
I had same issue where it says WARNING: modpost: Found 41 section mismatch(es)
turns out I kept using my .config from previous kernel versions without doing "make oldconfig", so the new kernel options(41 in my case) were never built into kernel.
Wow, I see this prompt too, when I building 2.6.36 on my Ubuntu 9.10.
I tried "make CONFIG_DEBUG_SECTION_MISMATCH=y", seems work.
But
1. I am not sure this is really the kernel I built.
2. When I try to build it with some change, it seems to rebuild all the kernel source, not just what I changed.Why?
I had the same issue. I modified the kernel with some minor changes. There are totally 4 .c files changed and a couple of .h files. When I do this operation, I am compiling the whole kernel.
Reason: the header files.. If you modify them, you will have to compile all the related .c files.
My question is:
Can I rename the kernel to some new name which I want. "linux-2.6.32.16-xen-custom1". I want this, because I want to be able to boot into both the kernels linux-2.6.32.16-xen and linux-2.6.32.16-xen-custom1 at any point of time.
I had the same issue. I modified the kernel with some minor changes. There are totally 4 .c files changed and a couple of .h files. When I do this operation, I am compiling the whole kernel.
Reason: the header files.. If you modify them, you will have to compile all the related .c files.
My question is:
Can I rename the kernel to some new name which I want. "linux-2.6.32.16-xen-custom1". I want this, because I want to be able to boot into both the kernels linux-2.6.32.16-xen and linux-2.6.32.16-xen-custom1 at any point of time.
Oh I know that
I wanted to change the kernel's name.. That should reflect on vmlinuz-2.6.32.16-xen-custom1 and initrd.img-2.6.32.16-xen-custom1...
There is a directory called buildconfigs that has files called mklinux-2.6 mklinux-2.6-xen etc. I guess I should have something similar to that for my case.. i.e. mklinux-2.6-xen-custom1, and compile it using
# make KERNELS="linux-2.6-XYZ"
# make KERNELS="linux-2.6-XYZ" install
Oh I know that
I wanted to change the kernel's name.. That should reflect on vmlinuz-2.6.32.16-xen-custom1 and initrd.img-2.6.32.16-xen-custom1...
This was many months ago so you may have solved this by now but I think you want to look in the Makefile for your kernel (/usr/src/<insert kernel folder here>/Makefile). Look for EXTRAVERSION.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.