Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
lost make menuconfig [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
while true
Guru
Guru


Joined: 07 Apr 2010
Posts: 357
Location: Ljubljana, Slovenia

PostPosted: Fri Sep 17, 2010 9:30 pm    Post subject: lost make menuconfig [SOLVED] Reply with quote

I want to make changes to my kernel, but I got this error:
Code:
C6820s linux # make menuconfig
make: *** No rule to make target `menuconfig'.  Stop.
C6820s linux #


I found out that I should reemerge gentto-sources with my version of kernel, but:
Code:
C6820s linux # emerge gentoo-sources -pv

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] sys-kernel/gentoo-sources-2.6.34-r6  USE="-build -deblob -symlink" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB
C6820s linux # cd /boot/
C6820s boot # ls
boot  grub  kernel-2.6.32-gentoo-r7  lost+found



So this will emerge different kernel, 2.6.34, and I have 2.6.32

How can I fix this?

I am newbie.

Thank you.
_________________
Kind regards, Goran Mitic

alive
while true
kick ass


Last edited by while true on Wed Mar 09, 2011 10:24 am; edited 3 times in total
Back to top
View user's profile Send private message
rh1
Guru
Guru


Joined: 10 Apr 2010
Posts: 501

PostPosted: Fri Sep 17, 2010 9:51 pm    Post subject: Reply with quote

Code:
emerge =gentoo-sources-2.6.32-r7

Using "=" allows you to specify a particular version for a package.
Back to top
View user's profile Send private message
krinn
Advocate
Advocate


Joined: 02 May 2003
Posts: 4433

PostPosted: Fri Sep 17, 2010 10:31 pm    Post subject: Reply with quote

Why this happen ?

if you "emerge something" portage will add "something" to your world file (except if you use --oneshot or -1), this way you tell portage you need that "something".
But you've just tell portage you would like "something" but any version.
So if you have "something-1.0" and a new "something-1.1" is out, portage will install the new "something-1.1" and "something-1.0" is now a candidate to be remove (portage will auto-remove it or for slotted packages, emerge --depclean will do it)

This is what happen to you, and it will happen again until you specify to portage to stop doing that.
How: well, if you do "emerge gentoo-sources" -> portage will add to world file that you need gentoo-sources any version.
To simply stop that bad effect : "emerge =gentoo-sources-thatversion" so portage will write in world file you need "gentoo-sources-thatversion"

On a next kernel upgrade, when portage will check if it should remove gentoo-sources previous version, it will do it and remove all gentoo-sources version, except if they are record in world file, as your gentoo-sources-thatversion is in, as simple as it is, portage will then understand it shouldn't remove it.


So if you understand, you will see that rh1 not only gave you the solve to get back your source kernel, but also (as he didn't put the -1 trigger) force your kernel version to be specifically emerge into your world file.
You might not notice he help you more than just correcting that error, but also prevent it from coming again.

You might think rh1 is a nice guy, but as you're newbie, i'll warn you that everyone here knows he get always speed tickets and drive too fast. I know, not really nice...
And before you report me, don't even think about it, everyone knows i have picture of d2_racing & neddyseagoon, all others are venal and i'm rich (except john r graham but he never see anything anyway)
Back to top
View user's profile Send private message
rh1
Guru
Guru


Joined: 10 Apr 2010
Posts: 501

PostPosted: Fri Sep 17, 2010 11:02 pm    Post subject: Reply with quote

Quote:
So if you understand, you will see that rh1 not only gave you the solve to get back your source kernel, but also (as he didn't put the -1 trigger) force your kernel version to be specifically emerge into your world file.
You might not notice he help you more than just correcting that error, but also prevent it from coming again.

I did that on purpose. It's how i do it on my system, that way --depclean stops trying to remove the kernel I'm using.

Quote:
You might think rh1 is a nice guy, but as you're newbie, i'll warn you that everyone here knows he get always speed tickets and drive too fast. I know, not really nice...

I only have one speeding ticket .... that i haven't paid yet, i took care of the rest. I don't think i drive too fast, in fact, according to my speedometer , i've never had my transam over 85mph .... well at least that's where it stops counting at.
Back to top
View user's profile Send private message
krinn
Advocate
Advocate


Joined: 02 May 2003
Posts: 4433

PostPosted: Fri Sep 17, 2010 11:09 pm    Post subject: Reply with quote

rh1 wrote:
I only have one speeding ticket .... that i haven't paid yet, i took care of the rest. I don't think i drive too fast, in fact, according to my speedometer , i've never had my transam over 85mph .... well at least that's where it stops counting at.


Yeah sure, too bad we have proof
:)
Back to top
View user's profile Send private message
while true
Guru
Guru


Joined: 07 Apr 2010
Posts: 357
Location: Ljubljana, Slovenia

PostPosted: Sat Sep 18, 2010 12:15 am    Post subject: Reply with quote

This is a big issue!


Did I updated kernel when I updated the system?
If this is a case, how do I know what kernel I run on now?


If not, how can I than update kernel?


For sake of conversation, let us say I do not have updated my kernel when I updated system couple of days ago, than I should go with rh1's advice and reemerge gentoo-sources as suggested.

And this is a big issue, since it is not in handbook.

If I install gentoo with certain version of kernel, than gentoo-sources should be emerged rh1's way, so deep clean does not touch it, if I understood krinn.

But than again, I was wrong many times before...


So my main question is, do I have the same kernel, so I can go with rh1's suggestion?

while I wait for response, I'll do a dumb thing and do 'emerge =gentoo-sources-2.6.32-r7'
_________________
Kind regards, Goran Mitic

alive
while true
kick ass
Back to top
View user's profile Send private message
krinn
Advocate
Advocate


Joined: 02 May 2003
Posts: 4433

PostPosted: Sat Sep 18, 2010 12:56 am    Post subject: Reply with quote

Don't mistake the kernel and the kernel source.

You emerge the kernel source by doing emerge gentoo-sources...
then you access the kernel source in /usr/src/linux (for the current kernel source, this can be selected with eselect kernel list), all your kernel sources will be there in /usr/src
you configure it: the make menuconfig... phase
you install it: make modules_install, make install or cp kernel... /boot

So even someone comes and remove /usr/src/linux, you've lost your kernel source.
That's a big issue for some drivers and programs that need them to be build, but you don't loose your kernel.

If you can find the source again, that's not a big issue at all (and even old kernel could be get from kernel.org)
The only bad issue you could have is loosing your kernel config, so to rebuild your kernel you will have to pickup again the same options without that file, boring, but not a big issue.
There's an option to let the kernel save that .config and show it so you can re-get it later if you loose the .config
You can also just copy the .config elsewhere and keep it, or if you use make install, it will also copy the .config in /boot while installing the kernel

That's it, the real bad part is when gentoo-sources without number is in world, you ask latest kernel, and when you update the system, portage will emerge the latest gentoo-sources and you may loose your config and kernel sources.

As long as none remove the kernel from /boot, your kernel won't vanish :)

to know what kernel you are currently running: "uname -a", or "emerge --info" will also tell you that (1st line show the kernel)
Back to top
View user's profile Send private message
while true
Guru
Guru


Joined: 07 Apr 2010
Posts: 357
Location: Ljubljana, Slovenia

PostPosted: Sat Sep 18, 2010 3:19 am    Post subject: Reply with quote

aha, so as long as kernel is in /boot I can run OS and repaire it..

krinn, you are as always -v (like emerge -v for extra description, kheh)


anyway, I followed rh1's example and I did get to kernel configuration.
I made my changes and now I have VirtualBox on my Gentoo!!!

Khehehe!!!!

But, how does kernel get upgraded or updated?
I see there is 2.6.35 out...

If I upgrade my 32 to 35, will rh1's instruction become obsolete?
In other words, I will have to unmerge old gentoo-source and emerge new gentoo-source?

thank you, it is past 5 o,clock in the morning over here, so I must go to shutdown...
_________________
Kind regards, Goran Mitic

alive
while true
kick ass
Back to top
View user's profile Send private message
rh1
Guru
Guru


Joined: 10 Apr 2010
Posts: 501

PostPosted: Sat Sep 18, 2010 4:12 am    Post subject: Reply with quote

Portage will continue to install new kernel sources as they become available. You can get a list of what you have by doing "eselect kernel list".
Pick whichever one you want and update the /usr/src/linux symlink using "eselect kernel set <kernel>" .
Configure and build your kernel, update bootloader, reboot, check things out, make sure everything works.
Then just do
Code:
emerge --noreplace =gentoo-sources-<new version #>
to add new kernel version to world file so it won't get erased.
Remove old version by doing either
Code:
emerge --deselect =gentoo-sources-<old version #>
which will allow --depclean to remove it next time you run it or you could remove yourself with
Code:
emerge -C =gentoo-sources-<old version #>
Back to top
View user's profile Send private message
while true
Guru
Guru


Joined: 07 Apr 2010
Posts: 357
Location: Ljubljana, Slovenia

PostPosted: Sun Sep 19, 2010 2:10 pm    Post subject: Reply with quote

aha aha, cool, GREAT!!!

So, to summarise, my kernel will NOT be updated as I update my system.
ok, I think I have all the answers, to I'll mark this thread as solved.

Thank you all for your input, you did help me understand a little bit more.
_________________
Kind regards, Goran Mitic

alive
while true
kick ass
Back to top
View user's profile Send private message
while true
Guru
Guru


Joined: 07 Apr 2010
Posts: 357
Location: Ljubljana, Slovenia

PostPosted: Wed Mar 09, 2011 8:32 am    Post subject: Reply with quote

Sorry for this, but I have some unresolved issues...
Newbie as I am I, again, thought wrong...

On my side laptop I wanted to open kernel to modify it (cd /usr/src/linux and make menuconfig)
but I got message: make: *** No rule to make target `menuconfig'. Stop.

So I knew that I do not have right gentoo-sources, and I wanted to repeat steps from this post.
But the thing is, that there is no ebuild in portage for my version of kernel (2.6.32-r7)
I joined the irc #gentoo, but things are scrolling much too fast for me.
But I did get some help. I learned that I can emerge gentoo-sources-2.6.32-r*.
And I did chose to emerge --noreplace =gentoo-sources-2.6.32-r24,
but this did not solve the problem.

Than we went on with eselect kernel list
[1] linux-2.6.32-gentoo-r7 *
[2] linux-2.6.32-gentoo-r24
[3] linux-2.6.36-gentoo-r5
and I forgot the right syntax, but like so:
eselect set kernel linux-2.6.32-gentoo-r7

This still did not solve the problem, and last lines on irc was that I have to change my boot menu (or such),
than I got lost the hold of the guys (well noob as I am, kheh, no wonder)

in /usr/src/ I have linux -> linux-2.6.32-gentoo-r7

----

The other thing is that I have trouble with emerging stuff,
and I believe it is connected with above decsribed issue, since I get this message:
Quote:
* Could not find a Makefile in the kernel source directory.
* Please ensure that /usr/src/linux points to a complete set of Linux sources
* Unable to calculate Linux Kernel version for build, attempting to use running version
* Could not find a usable .config in the kernel source directory.
* Please ensure that /usr/src/linux points to a configured set of Linux sources.
* If you are using KBUILD_OUTPUT, please set the environment var so that
* it points to the necessary object directory so that it might find .config.


----

And (logical) follow up questions:
Do I need to update (upgrade) my kernel?
(how is this done, and do I have to configure new kernel from scratch
or will new kernel preserve settings from old one?)
How long can I stay with one kernel?
Is upgrading kernel must-do?

----

Thank you.


EDIT

So, I was so afraid that changing from *-r7 to *-r24
will break/change kernel, that I just did not thing that this is a way to go...

But having carefully read rh-1 post I took a shot of rum (for courage) and did it!!!

This brought up make menuconfig and I was able to manipulate kernel.

The other part, of emerging stuff, is brouht up by sys-fs/vhba,
since I am looking to replace most gui with cli, and vhba is needed for some cli cd app (cdemu),
but being first on the list it brought all rest installation to stop.

I am still getting the error message described above, but this is than not related to this topic...

I removed cdemu (and vhda dependence) and
right now, it is emerging 8 of 25, so I guess I am good for now...


Thank you all for taking the time to read this newbie expirience... and sorry...
_________________
Kind regards, Goran Mitic

alive
while true
kick ass
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum