LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-04-2010, 07:48 PM   #1
OzzyBlood
LQ Newbie
 
Registered: Nov 2009
Distribution: Fedora 12
Posts: 23

Rep: Reputation: 16
compiling kernel 2.6.32.2 error


I'm currently using Fedora 12 with kernel 2.6.31.9 and I was trying to upgrade to 2.6.32.2. These are the steps I followed. After rebooting and choosing this kernel from the Grub menu, I'm just greeted with a black screen with a blinking cursor and it won't proceed beyond that.

These are the commands I issued. I received an error on the first make modules about the mismatch. I then ran CONFIG_DEBUG_SECTION_MISMATCH=y and once finished I ran make modules again and it completed successfully.
Code:
Downloaded kernel package 2.6.32.2 from www.kernel.org
untar archive
make menuconfig (no changes made, saved config file)
make
make modules (received following error)
WARNING: modpost: Found 2 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y
make CONFIG_DEBUG_SECTION_MISMATCH=y
make modules
make modules_install
make install
cd /boot
mkinitrd -o initrd.img-2.6.32.2 1.6.32.2
Grub.conf
Code:
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,2)
#          kernel /vmlinuz-version ro root=/dev/mapper/vg_ozzylinux-lv_root
#          initrd /initrd-[generic-]version.img
#boot=/dev/sda
default=1
timeout=5
splashimage=(hd0,2)/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.32.2)
	root (hd0,2)
	kernel /vmlinuz-2.6.32.2 ro root=/dev/mapper/vg_ozzylinux-lv_root noiswmd LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us rhgb quiet
	initrd /initramfs-2.6.32.2.img
title Fedora (2.6.31.9-174.fc12.i686)
	root (hd0,2)
	kernel /vmlinuz-2.6.31.9-174.fc12.i686 ro root=/dev/mapper/vg_ozzylinux-lv_root noiswmd LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us rhgb quiet
	initrd /initramfs-2.6.31.9-174.fc12.i686.img
title Windows 7 Home Premium
	rootnoverify (hd0,0)
	chainloader +1
Let me know if there's other info I can provide that would be useful.

Thanks,
 
Old 01-04-2010, 09:48 PM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Did you read though the menuconfig to see if you needed to make changes?
If not then it is certain that you you not have the right options to boot your system.

The first time you do this it takes all day, and then another day, because there is a lot of reading to do. Each option has a help file. Most important is to compile in the modules you expect to need at boot time. Everything else can be a loadable module.

You won't get it right first time.

After a while you will be familiar with the layout and you will have old config files around as a shortcut.

http://theos.in/desktop-linux/tip-th...-linux-kernel/
 
Old 01-04-2010, 10:29 PM   #3
OzzyBlood
LQ Newbie
 
Registered: Nov 2009
Distribution: Fedora 12
Posts: 23

Original Poster
Rep: Reputation: 16
hmm no actually I just looked through it but wasn't sure on a lot of the options so I didn't change it. I guess that makes sense, but I guess I figured during the compile it would do a lot of that automatically. A second question though, how long would it be before fedora releases this kernel through yum update?

Thanks for the help though, I'll be sure to read through the link you posted.
 
Old 01-05-2010, 12:35 AM   #4
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
You have seen that compiling a new kernel is not normally done lightly. You do it if you happen to know there is some functionality in the new kernel not available in your current one. (Or if you want to learn to compile a kernel - maybe you want to be a kernel hacker?) Some people do it to tight-fit their kernel to their system

Distro kernels are usually patched so you seldom miss out on anything.

A shortcut is to recompile your distro kernel, making a config file from your existing install, then using that to jump-start your vanilla kernel compile. You'll find make gconfig or make xconfig better for this ... gui.

fedora will release the kernel update when it is done - basically. It usually takes less than a month. A specific feature may take longer to arrive in the package. If there is a bug report associated with the feature you want, you'll also find out if the next update will have a fix.

Oh lookie:
http://fedoraproject.org/wiki/Docs/CustomKernel
... fedora distro kernel sources come with configuration files.
 
Old 01-05-2010, 02:23 AM   #5
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,627

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
everything from above
and adding WHY build it ???
if doing this for FUN fedora might NOT be the best to do this on .There are kernel updates -- almost every week .
think about learning kernel building using CentOS , this would be a bit less stressful .


if for a very specific function then what it that .
 
Old 01-05-2010, 02:25 PM   #6
OzzyBlood
LQ Newbie
 
Registered: Nov 2009
Distribution: Fedora 12
Posts: 23

Original Poster
Rep: Reputation: 16
I'm building it from where I read my broadcom wireless adapter will have b43 driver support in this new kernel version.
Also, yes a little bit of learning experience. This isn't a corporate firewall or file server I'm playing on. It's just my laptop that is dual booting Win 7. If I happen to brick it, a reinstall is only moments away.
 
Old 01-05-2010, 06:37 PM   #7
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Right - so if you use gnome, do make gconfig, if you use xde, do make xconfig. This will provide a gui with buttons and a tree view and so on. It is easier to see what is going on. You will certainly have to find the b43x driver in the tree and compile it as a module (m) - unless you need some sort of network boot through this device: I'm guessing not.

I'd recommend getting the source for a kernel you have already and examining its settings as a quick way to familiarise yourself. You want to pay special attention to which modules get compiled in to the kernel - that will be a short list, usually including the file system driver. It is not unusual for a first compile to add every other driver as a module rather than learn the exact set you need - this will make it feel a little bloated but it will work.

You may be wondering: if the installers do autodetection and stuff why cannot there be an autodetect method for kernel compile?

There sort-of is - if you use a distro like gentoo - however the kernel devs have no way of anticipating what a particular person wants to compile a kernel for or in what environment: a phone kernel is unlikely to be compiled on the device it is intended for. A distro kernel usually comes with restrictions on the environment it can be used in, making autodetection of the environment economic. Even so, you will see that it is not always successful. The most common install problems come from an installer misreading the hardware.
 
Old 01-05-2010, 07:19 PM   #8
OzzyBlood
LQ Newbie
 
Registered: Nov 2009
Distribution: Fedora 12
Posts: 23

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by Simon Bridge View Post
Right - so if you use gnome, do make gconfig, if you use xde, do make xconfig. This will provide a gui with buttons and a tree view and so on. It is easier to see what is going on. You will certainly have to find the b43x driver in the tree and compile it as a module (m) - unless you need some sort of network boot through this device: I'm guessing not.

I'd recommend getting the source for a kernel you have already and examining its settings as a quick way to familiarise yourself. You want to pay special attention to which modules get compiled in to the kernel - that will be a short list, usually including the file system driver. It is not unusual for a first compile to add every other driver as a module rather than learn the exact set you need - this will make it feel a little bloated but it will work.

You may be wondering: if the installers do autodetection and stuff why cannot there be an autodetect method for kernel compile?

There sort-of is - if you use a distro like gentoo - however the kernel devs have no way of anticipating what a particular person wants to compile a kernel for or in what environment: a phone kernel is unlikely to be compiled on the device it is intended for. A distro kernel usually comes with restrictions on the environment it can be used in, making autodetection of the environment economic. Even so, you will see that it is not always successful. The most common install problems come from an installer misreading the hardware.
Thank you, well said.
And yes, I was actually curious about the installers doing autodetection but then when compiling the kernel it doesn't. I went ahead and tried to recompile using the config file from my current kernel version but I still received the same problem - blinking cursor when choosing to load that kernel. Must be something I'm not doing correctly. I'm ready to leave it be for a while until I can learn a bit more - I'm sure I'll get the new kernel version through yum update soon enough.

Thanks again for your help!
 
Old 01-05-2010, 07:40 PM   #9
damgar
Senior Member
 
Registered: Sep 2009
Location: dallas, tx
Distribution: Slackware - current multilib/gsb Arch
Posts: 1,949
Blog Entries: 8

Rep: Reputation: 203Reputation: 203Reputation: 203
There IS the make localmodconfig, which will look at your currently loaded modules and leave out the modules that you aren't using presently from the kernel build conifguration. I tried it out on 2.6.32.2 and it worked reasonably well. There are some caveats and landmines to sidestep which are discussed in a good thread on LQ. It's probably a good idea to make gconfig/menuconfig afterwards for proofreading so there aren't any surprises.
 
Old 07-02-2010, 03:59 PM   #10
landersohn
LQ Newbie
 
Registered: Jul 2010
Posts: 1

Rep: Reputation: 0
OzzyBlood,

I am not sure your blinking cursor problem is your configuration. I just installed Ubuntu 10.04 which features the 2.6.32-23 and the 2.6.32.2 kernel in its official released distro. When I try to boot the .2 kernel I get exactly the same behavior you describe. My guess is it's not configuration of your custom kernel but some bug in some driver.
 
  


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
Error when compiling kernel linux-2.6.22 : make: ***[_modinst_post] Error 137 ngoclan.it Linux - General 1 12-11-2007 06:54 AM
Error when compiling kernel linux-2.6.22 : make: ***[_modinst_post] Error 137 ngoclan.it Linux - Newbie 0 12-11-2007 06:49 AM
Error compiling NVIDIA kernel module on 2.6.23.1 kernel Slaco Linux - Hardware 6 10-31-2007 07:57 PM
Error :While Compiling Kernel 2.4.18-14 cjagdish69 Linux - Kernel 3 07-16-2007 08:03 PM
Error in Kernel.h file, while compiling the kernel Nishant Desai Linux - Kernel 0 11-13-2006 11:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:25 PM.

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