LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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-18-2013, 06: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, 07: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, 07: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, 07: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 07:51 AM.
 
Old 01-18-2013, 09: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, 09:38 AM   #6
ukiuki
Senior Member
 
Registered: May 2010
Location: Planet Earth
Distribution: Debian
Posts: 1,030

Rep: Reputation: 385Reputation: 385Reputation: 385Reputation: 385
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, 11:06 AM   #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-18-2013, 11:35 PM   #8
ukiuki
Senior Member
 
Registered: May 2010
Location: Planet Earth
Distribution: Debian
Posts: 1,030

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

Regards
 
  


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

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

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