LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 11-05-2008, 06:36 PM   #1
xmzhu
LQ Newbie
 
Registered: Nov 2008
Posts: 1

Rep: Reputation: 0
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

How to fix it?
Thank you
 
Old 11-09-2008, 04:04 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by xmzhu View Post
How to fix it?
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.
 
Old 10-07-2009, 11:45 AM   #3
ttessier
LQ Newbie
 
Registered: Oct 2009
Posts: 4

Rep: Reputation: 0
Thumbs up Details Missing

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 )
 
Old 10-12-2010, 08:02 PM   #4
darthaxul
Member
 
Registered: Aug 2008
Distribution: Devuan; Gentoo; FreeBSD
Posts: 236

Rep: Reputation: 19
same problem

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.
 
Old 10-12-2010, 08:45 PM   #5
quanta
Member
 
Registered: Aug 2007
Location: Vietnam
Distribution: RedHat based, Debian based, Slackware, Gentoo
Posts: 724

Rep: Reputation: 101Reputation: 101
Did you read the suggest below:
Quote:
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
 
Old 11-13-2010, 09:39 PM   #6
Richard.Yang
Member
 
Registered: Sep 2008
Posts: 106

Rep: Reputation: 16
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?
 
Old 12-05-2010, 11:02 PM   #7
sriram87
LQ Newbie
 
Registered: Jan 2008
Posts: 11

Rep: Reputation: 1
Custom kernel building issue

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.


Thanks and regards
 
Old 12-08-2010, 02:03 AM   #8
Richard.Yang
Member
 
Registered: Sep 2008
Posts: 106

Rep: Reputation: 16
Quote:
Originally Posted by sriram87 View Post
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.


Thanks and regards
I think you can rename it.
Use grub?
 
Old 12-08-2010, 11:10 PM   #9
sriram87
LQ Newbie
 
Registered: Jan 2008
Posts: 11

Rep: Reputation: 1
Quote:
Originally Posted by Richard.Yang View Post
I think you can rename it.
Use grub?
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

I'll see if it works.

Regards
Sriram
 
Old 04-29-2011, 02:14 AM   #10
ragnaroktomorrow
LQ Newbie
 
Registered: Apr 2011
Posts: 1

Rep: Reputation: 0
Quote:
Originally Posted by sriram87 View Post
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.
 
  


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
What is a kernel section mismatch C-Sniper Linux - Kernel 4 08-10-2008 12:09 AM
can't compile kernel 2.6.23.8 ERROR: no /sbin/init found on rootdev tommcd Slackware 18 11-24-2007 09:32 PM
WARNING: drivers/... - Section mismatch: dasoberdick Slackware 1 06-15-2007 01:55 PM
Problem of Linux kernel version mismatch while running the compile program Nishant Desai Linux - Kernel 8 03-12-2007 08:22 AM
gcc not found error when trying to compile a new kernel sofocle Linux - Software 2 12-31-2006 12:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 12:06 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