LinuxQuestions.org
Register a domain and help support LQ
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-18-2013, 07:47 AM   #1
jayeshsharma52
Member
 
Registered: Jul 2012
Posts: 54

Rep: Reputation: Disabled
kernel compilation


I am compiling kernel for first time .I have created kernel image (bzImage by installing modules ) but grub is unable to fetch it.Means its not showing at boot time.Please help me.
Thanks.
 
Old 01-18-2013, 08:16 AM   #2
bijo505
Member
 
Registered: Nov 2012
Location: Bangalore
Distribution: Fedora & Ubuntu
Posts: 77

Rep: Reputation: 18
Hi Jayesh,
I think you manually compile the new custom kernel from source. In that case you need to update the grub.conf manually and add the kernel and initrd image entry there. After that you can see and select the new os (If everything is file) while booting the system. If the grub version is 2, the following URL will help you to add the menu entry in grub.conf.
http://www.dedoimedo.com/computers/grub-2.html
http://ubuntuforums.org/showthread.php?t=1195275
 
Old 01-18-2013, 08:30 AM   #3
jayeshsharma52
Member
 
Registered: Jul 2012
Posts: 54

Original Poster
Rep: Reputation: Disabled
In grub.cfg I have to make two entries one of them is is "initrd =*****.img" but I dont have any " .img" file after compilation.
Thanks.
 
Old 01-18-2013, 08:46 AM   #4
bijo505
Member
 
Registered: Nov 2012
Location: Bangalore
Distribution: Fedora & Ubuntu
Posts: 77

Rep: Reputation: 18
Hi Jayesh,

Just have a look at the following links, You can create the initial ram disk image using mkinitrd
http://www.tldp.org/LDP/lame/LAME/li...el-custom.html
http://www.linuxquestions.org/questi...g-file-605779/

Code:
/sbin/mkinitrd -v /boot/<new-kernel>.img <new-kernel-version>
eg
/sbin/mkinitrd -v /boot/initrd-2.0.36-3.img 2.0.36-3

Last edited by bijo505; 01-18-2013 at 08:51 AM.
 
Old 01-18-2013, 10:28 AM   #5
jayeshsharma52
Member
 
Registered: Jul 2012
Posts: 54

Original Poster
Rep: Reputation: Disabled
Somehow I manage to load the kernel but still unable get it run .
While running it at boot time it returns an error message :"invalid magic number"(I have no idea what I need to do further)
 
Old 01-18-2013, 10:38 AM   #6
ukiuki
Senior Member
 
Registered: May 2010
Location: Planet Earth
Distribution: Debian
Posts: 1,030

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Which distribution are you running on that machine? Also what kind of hardware do you have, processor, RAM, etc?
And what is the kernel version are you triying to compile?

Regards
 
Old 01-18-2013, 12:06 PM   #7
jayeshsharma52
Member
 
Registered: Jul 2012
Posts: 54

Original Poster
Rep: Reputation: Disabled
fedora 17,kernel 3.8-rc3 (source code from kernel.org),4 gb ram.(by hardware if you mean processor then it intel i3)
 
Old 01-19-2013, 12:35 AM   #8
ukiuki
Senior Member
 
Registered: May 2010
Location: Planet Earth
Distribution: Debian
Posts: 1,030

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Here the instructions for Fedora kernel compilation https://fedoraproject.org/wiki/Building_a_custom_kernel

Regards
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] Non-smp kernel not sane - problems with a compilation of the kernel modules igadoter Slackware 2 09-05-2012 05:45 PM
Module compilation needs kernel header files or kernel sources? baxzius Linux - Newbie 2 08-04-2011 05:12 PM
NO /usr/src/kernel directory & Kernel Compilation PankajDS Linux - Kernel 5 01-24-2008 02:48 AM
Kernel compilation problems, distorted video and kernel panic shamrock_uk Linux - Laptop and Netbook 5 08-12-2005 11:53 PM
does kernel-source installs with the compilation cum installtion of a new kernel? luqman Linux - General 18 03-04-2005 08:33 AM


All times are GMT -5. The time now is 11:04 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration