LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-15-2006, 12:54 AM   #1
brokenmaize
LQ Newbie
 
Registered: Oct 2006
Posts: 22

Rep: Reputation: 15
Kernel Compiling Errors!!!!


Hi All,

Am running Fedora core 3, Kernel 2.6.9-1667. Want to upgrade to Kernel 2.6.17.
The Errors that i get are after i run make_modules install are the following:
a) Cant find /lib/modules/2.6.17
b) mkinitrd failed Error 1....

What am i missing here?

The commands am using are as follows

a) tar xvjf linux-2.6.17.tar.bz2 (To Unpack Kernel)
b) cd /usr/src/linux-2.6.17
c) make menuconfig
d) make_modules_install (Errors Occuring at this phase)

Thanx for any help, that will point in the right direction.
 
Old 11-15-2006, 01:51 AM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
There's a make missing between c & d, and d is "make modules_install"


Cheers,
Tink
 
Old 11-15-2006, 07:39 AM   #3
brokenmaize
LQ Newbie
 
Registered: Oct 2006
Posts: 22

Original Poster
Rep: Reputation: 15
Hi tinkster
i also run the make command. its only that i forgot to include it here.
what else could i be missing, or should i do to have my new kernel up and running.
 
Old 11-15-2006, 11:15 AM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
I'm confused as to how/why "make modules_install" should be complaining
about missing modules, or failing on mkinitrd ... are you sure your list
up there is complete?


Cheers,
Tink
 
Old 11-15-2006, 11:56 PM   #5
brokenmaize
LQ Newbie
 
Registered: Oct 2006
Posts: 22

Original Poster
Rep: Reputation: 15
Hi Tink,

I got the commands correct this time. I was missing the (_) on the make modules_install command. Everything works out fine and mkinitrd completes successfully.
Howeever upon rebooting the box, i get the follwing error message.
Error loading policy...
Kernel panic error. Attempting to Kill init

I cant log into my new 2.6.17 Kernel.
What am i missing here?

Thanx
Broken Maize.
 
Old 11-16-2006, 01:50 AM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Not an export on FC by any stretch, but I guess it might have
to do with SELinux or the like?


Cheers,
Tink
 
Old 11-16-2006, 02:51 AM   #7
brokenmaize
LQ Newbie
 
Registered: Oct 2006
Posts: 22

Original Poster
Rep: Reputation: 15
The Current Kernel was on Fedora 3. What could be causing the problem and how can i solve it.

Thanx mate
 
Old 11-16-2006, 03:07 AM   #8
ajosephantony
LQ Newbie
 
Registered: Jun 2006
Location: Chennai
Distribution: Fedora
Posts: 4

Rep: Reputation: 0
Hi,

I did the following sequence and ended successfully booting mine
go to /usr/src/<ur-linux-src>/

1. make menuconfig
2. make bzImage
3. make modules
4. make modules_install
5. mkinitrd /boot/initrd-2.6.17.img 2.6.17
6. From /usr/src/<kernel-src>/linux directory, copy the kernel and System.map file to /boot
7. Add the following to grub (i have grub) (the second line depends on the partition u r in)

title Test Kernel (2.6.17)
root (hd0,1)
kernel /boot/bzImage-2.6.17 ro root=LABEL=/
initrd /boot/initrd-2.6.17.img

Cheers
Joe
 
Old 11-16-2006, 09:06 AM   #9
brokenmaize
LQ Newbie
 
Registered: Oct 2006
Posts: 22

Original Poster
Rep: Reputation: 15
Hi Joe,
Thanx for the direction. I will run the commands as per your instruction and see the results.
One Question though, i read that the 2.6 kernel dont need the following commands
a) make modules
b) make bzImage

The make modules_install seems to create the necessary files and kernel image.

What's the right direction? The Kernel errors seem to be a big issue with most users.

Thanx all.
 
Old 11-16-2006, 11:17 AM   #10
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
That's correct - 2.6 doesn't require those two steps.

The make creates the files, make modules_install merely
copies them across to /lib/modules/<VERSION>


Can you remember the lines before the policy and the kernel
panic, how much output (and what) is there beforehand? As a
guide to avoiding these things: did you copy the .config file
of your current to the new kernel source directory? It always
helps to use the existing (working) kernel as a template.



Cheers,
Tink
 
Old 11-20-2006, 03:55 AM   #11
brokenmaize
LQ Newbie
 
Registered: Oct 2006
Posts: 22

Original Poster
Rep: Reputation: 15
Hi Tink,

I thonk you got it. The complete Error is

{Error Loading Module Policy.}
The Kernel is uncompressed succesfully. What .config am i supposed to copy, and where is it located and where do i paste it???

Thanx
 
Old 11-20-2006, 08:29 AM   #12
brokenmaize
LQ Newbie
 
Registered: Oct 2006
Posts: 22

Original Poster
Rep: Reputation: 15
Hi All,

after a frantic search for a solution to the Kernel Error, on compiliation i realize a couple of things.
a) typo's are bad (even a simple underscore can result in sleepless nights.. so make sure you type the command correctly)
b) linux is such a powerfull system only if u can use it well

now i finally manage to get my new kernel 2.6.17 to work. Solution was to pass the following kernel option

enforcing=0

finanlly i log in to my new kernel and my 3-Com card finally work.
one thing though is that my SElinux is disabled. So my solution is half baked as i have something else that is entiely broken, my SElinux.

Thanx for the help, especailly to Tink for pointing me to the right direction.

Any ideas on SElinux
 
Old 11-20-2006, 08:30 AM   #13
brokenmaize
LQ Newbie
 
Registered: Oct 2006
Posts: 22

Original Poster
Rep: Reputation: 15
Hi All,

after a frantic search for a solution to the Kernel Error, on compiliation i realize a couple of things.
a) typo's are bad (even a simple underscore can result in sleepless nights.. so make sure you type the command correctly)
b) linux is such a powerfull system only if u can use it well

now i finally manage to get my new kernel 2.6.17 to work. Solution was to pass the following kernel option

enforcing=0

finanlly i log in to my new kernel and my 3-Com card finally work.
one thing though is that my SElinux is disabled. So my solution is half baked as i have something else that is entiely broken, my SElinux.

Thanx for the help, especailly to Tink for pointing me to the right direction.

Any ideas on SElinux
 
Old 11-20-2006, 11:04 AM   #14
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
Originally Posted by brokenmaize
Hi Tink,

I thonk you got it. The complete Error is

{Error Loading Module Policy.}
The Kernel is uncompressed succesfully. What .config am i supposed to copy, and where is it located and where do i paste it???

Thanx
Commonly it will live in /boot, with the kernel and the System.map.
Look for a file called config-<kernel-version> (or similar) and copy
it to the root of your new kernels source-tree as .config


Cheers,
Tink
 
Old 11-21-2006, 04:13 AM   #15
brokenmaize
LQ Newbie
 
Registered: Oct 2006
Posts: 22

Original Poster
Rep: Reputation: 15
The Linux kernel 2.6.17 now works with the kernel option enforcing=0
As a result, my SElinux is disabled. How can i have the SElinux running?
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Errors compiling kernel Zmyrgel Slackware 2 08-13-2006 11:45 PM
errors while compiling kernel Drone4four Slackware 19 07-09-2006 03:18 AM
Errors Compiling Kernel 2.6 on Slackware 10.2 - Old kernel headers required? Dave S. Slackware 8 03-04-2006 12:15 AM
Errors when compiling kernel bornhj Slackware 18 04-14-2005 12:50 AM
Errors Compiling 2.6.10 Kernel! Please Help! Jonescity Slackware 12 02-26-2005 06:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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