LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Reply
 
LinkBack Search this Thread
Old 03-27-2012, 12:41 PM   #1
abhishekgit
Member
 
Registered: Jan 2012
Location: India
Distribution: Ubuntu, Gentoo, Fedora, Rhel5,openSUSE
Posts: 132

Rep: Reputation: 12
Add a kernel entry to boot.


Hello everyone,
I have built kernel version 3.2.13, The vmlinux image is ready to boot. According to the book i am referring, the image is to be added to "menu.lst" file to make known to the grub loader a new kernel image is present. The problem is I am not able to find menu.lst in the specified directory which is /boot/grub/menu.lst.
there is no such file. Kindly help me boot it. Thanks...

Regards...
 
Old 03-27-2012, 12:48 PM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Slackware
Posts: 14,872
Blog Entries: 2

Rep: Reputation: 3805Reputation: 3805Reputation: 3805Reputation: 3805Reputation: 3805Reputation: 3805Reputation: 3805Reputation: 3805Reputation: 3805Reputation: 3805Reputation: 3805
We need to know which distribution you are using to help you here. The distribution is essential information that should be mentioned in any thread you open. Most likely your distribution is simply not using the grub bootloader, but the grub2 or lilo bootloader.
 
Old 03-27-2012, 01:00 PM   #3
abhishekgit
Member
 
Registered: Jan 2012
Location: India
Distribution: Ubuntu, Gentoo, Fedora, Rhel5,openSUSE
Posts: 132

Original Poster
Rep: Reputation: 12
Oh..Sorry..
Here is the output of uname -a
Quote:
Linux sabayon 3.2.0-sabayon #1 SMP Sat Feb 11 12:54:37 UTC 2012 i686 Intel(R) Core(TM)2 Duo CPU T6600 @ 2.20GHz GenuineIntel GNU/Linux
Thanks...
 
Old 03-27-2012, 01:37 PM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Slackware
Posts: 14,872
Blog Entries: 2

Rep: Reputation: 3805Reputation: 3805Reputation: 3805Reputation: 3805Reputation: 3805Reputation: 3805Reputation: 3805Reputation: 3805Reputation: 3805Reputation: 3805Reputation: 3805
OK, Sabayon uses Grub2, so
Code:
grub-mkconfig -o /boot/grub/grub.cfg
launched as root should find your kernel automatically and change the configuration. If that doesn't work you can do it manually, this tutorial should be helpful: http://www.dedoimedo.com/computers/grub-2.html
 
Old 03-27-2012, 02:06 PM   #5
abhishekgit
Member
 
Registered: Jan 2012
Location: India
Distribution: Ubuntu, Gentoo, Fedora, Rhel5,openSUSE
Posts: 132

Original Poster
Rep: Reputation: 12
@TobiSGD
Thanks.
Quote:
grub-mkconfig -o /boot/grub/grub.cfg
This worked perfectly..
I am getting the option to choose the new kernel, But after i select it, its just the black screen. And its getting stuck there. I am not able to see nothing. Is it a configuration issue? Also, if i want to undo changes to grub, that is i want to delete the new entry and make it like before. I have windows 7 and sabayon dual booted, I want to see only those two. How to do it?..Thanks for your time.
 
Old 03-27-2012, 02:45 PM   #6
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Slackware
Posts: 14,872
Blog Entries: 2

Rep: Reputation: 3805Reputation: 3805Reputation: 3805Reputation: 3805Reputation: 3805Reputation: 3805Reputation: 3805Reputation: 3805Reputation: 3805Reputation: 3805Reputation: 3805
Quote:
Originally Posted by abhishekgit View Post
I am getting the option to choose the new kernel, But after i select it, its just the black screen. And its getting stuck there. I am not able to see nothing. Is it a configuration issue?
Possible.

Quote:
Also, if i want to undo changes to grub, that is i want to delete the new entry and make it like before. I have windows 7 and sabayon dual booted, I want to see only those two. How to do it?..Thanks for your time.
Just remove the new kernel and run the command again.
 
Old 03-28-2012, 08:23 AM   #7
abhishekgit
Member
 
Registered: Jan 2012
Location: India
Distribution: Ubuntu, Gentoo, Fedora, Rhel5,openSUSE
Posts: 132

Original Poster
Rep: Reputation: 12
Alright now i have a list of doubts,
If i change the configuration, Do i have to run make again?
If yes, will the changes be over written in that image?
And do i have to run grub-mkconfig command again to enter the changed image in the grub-loader?
 
Old 03-28-2012, 09:21 AM   #8
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Slackware
Posts: 14,872
Blog Entries: 2

Rep: Reputation: 3805Reputation: 3805Reputation: 3805Reputation: 3805Reputation: 3805Reputation: 3805Reputation: 3805Reputation: 3805Reputation: 3805Reputation: 3805Reputation: 3805
Yes to the first and third question, I don't understand your second question.
 
Old 03-28-2012, 10:36 AM   #9
bsat
Member
 
Registered: Feb 2009
Posts: 346

Rep: Reputation: 72
@abhishek a new image will be formed with the changes which will replace your previous image but you will have to run mkconfig again for changes to take effect.
 
Old 03-29-2012, 05:59 AM   #10
abhishekgit
Member
 
Registered: Jan 2012
Location: India
Distribution: Ubuntu, Gentoo, Fedora, Rhel5,openSUSE
Posts: 132

Original Poster
Rep: Reputation: 12
Okay assuming the changes will be overwritten, I ran the following commands under root.
Code:
$ make defconfig
$ make 
$ make install
$ grub-mkconfig /boot/grub/grub.cfg
The image was detected as "found image kernel-3.2.13/", I rebooted, I got the image, but the moment i select it, It says "loading initial ramdisk" and a blank screen appears and there it stops completely..! Please help me start. Thanks.
 
Old 03-29-2012, 07:40 PM   #11
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Slackware
Posts: 14,872
Blog Entries: 2

Rep: Reputation: 3805Reputation: 3805Reputation: 3805Reputation: 3805Reputation: 3805Reputation: 3805Reputation: 3805Reputation: 3805Reputation: 3805Reputation: 3805Reputation: 3805
For every new kernel image you make that does not have the drivers for your disk controller and the used filesystem compiled into the kernel (not as module) you have to generate an initial RAM-disk (initrd). On Slackware we do this with the mkinitrd, but I don't know if this tool is available for Gentoo/Sabayon.
 
Old 03-30-2012, 07:39 AM   #12
abhishekgit
Member
 
Registered: Jan 2012
Location: India
Distribution: Ubuntu, Gentoo, Fedora, Rhel5,openSUSE
Posts: 132

Original Poster
Rep: Reputation: 12
I am trying this since over a month. I just want to compile it. There is entirely different procedure to do this in
http://www.linuxfromscratch.org/lfs/view/stable/ this book. This is a slightly different and a bit complicated(I think) as compared to the "HOWTO linux kernel development" in the documentation. Can you suggest any robust online material so that i can compile it? Thanks..
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How To Add Windows 7 To GRUB Boot Entry. ? R_AD Linux - Newbie 12 09-08-2011 06:38 AM
add a entry for new kernel to grub theacerguy Linux - Kernel 4 08-09-2009 03:07 AM
how do i add linux to windows boot entry nikhil778 Linux - General 1 08-30-2003 10:59 AM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration