LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   kernel compilation (https://www.linuxquestions.org/questions/linux-newbie-8/kernel-compilation-4175446174/)

jayeshsharma52 01-18-2013 06:47 AM

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.

bijo505 01-18-2013 07:16 AM

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

jayeshsharma52 01-18-2013 07:30 AM

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.

bijo505 01-18-2013 07:46 AM

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


jayeshsharma52 01-18-2013 09:28 AM

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)

ukiuki 01-18-2013 09:38 AM

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

jayeshsharma52 01-18-2013 11:06 AM

fedora 17,kernel 3.8-rc3 (source code from kernel.org),4 gb ram.(by hardware if you mean processor then it intel i3)

ukiuki 01-18-2013 11:35 PM

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

Regards


All times are GMT -5. The time now is 06:18 PM.