# Cannot make menuconfig

## coviex

```
# eselect kernel list

Available kernel symlink targets:

  [1]   linux-2.6.31-gentoo-r6 *

  [2]   linux-2.6.35-gentoo-r8

# make menuconfig

make: *** No rule to make target `menuconfig'.  Stop.
```

PS World was up to date last week.

----------

## audiodef

Well...

1. Are you in /usr/src/linux?

2. Did you run emerge --depclean? This will remove old makefiles in old src dirs. If this is the case, do this:

```

cd /usr/src

rm linux

ln -s /usr/src/linux-(your_current_version) /usr/src/linux

```

Then cd to /usr/src/linux and try make menuconfig again.

----------

## rh1

In order to prevent this from re-occurring, emerge a specific kernel then --depclean won't erase the sources for that version. See this thread: https://forums.gentoo.org/viewtopic-t-845059-highlight-.html

----------

## aCOSwt

Well... well... *audiodef wrote:*   

> ln -s /usr/src/linux-(your_current_version) /usr/src/linux

 

audiodef, this is likely to lead to the menuconfig of his old version.

It seems that coviex has got sources for 2.6.31 and 2.6.35 and his symlink appears on 2.6.31

It is likely that he wishes to build 2.6.35. Not to rebuild 2.6.31 =>

1/ eselect kernel set 2

2/ cd /usr/src/linux

3/ make menuconfig.

----------

## audiodef

 *aCOSwt wrote:*   

> 
> 
> audiodef, this is likely to lead to the menuconfig of his old version.
> 
> 

 

No, it's not, actually. However, I like your method better.   :Cool: 

----------

## aCOSwt

 *audiodef wrote:*   

> No, it's not, actually.

 

I apologize audiodef, I had wrongly understood "your_current_version" = coviex' 2.6.31

----------

## audiodef

I meant the current latest version that an update would have pulled in.   :Cool: 

----------

## coviex

 *aCOSwt wrote:*   

> 
> 
> It seems that coviex has got sources for 2.6.31 and 2.6.35 and his symlink appears on 2.6.31
> 
> 

 

right

 *aCOSwt wrote:*   

> 
> 
> It is likely that he wishes to build 2.6.35. Not to rebuild 2.6.31 =>
> 
> 

 

Yes and No.

When I got PC which I work on now I decided to update OS. One of first packages was gcc. Then I did depclean. Manual suggests to rebuild all packages with new gcc. I could do only system.

World failed on sys-fs/loop-aes:

```
 * Unable to calculate Linux Kernel version for build, attempting to use running version

 * These sources have not yet been prepared.

 * We cannot build against an unprepared tree.

 * To resolve this, please type the following:

 * 

 * # cd /usr/src/linux

 * # make oldconfig

 * # make modules_prepare

```

But 

```
# make oldconfig

make: *** No rule to make target `oldconfig'.  Stop.
```

Now I'd try to update kernel but I cannot make menuconfig and see what was enabled/disabled in my working kernel so that I enable/disable the same in the latest available.

----------

## aCOSwt

 *coviex wrote:*   

> ...Then I did depclean....World failed on sys-fs/loop-aes...

 

If you depcleand after having got the sources for 2.6.35, then it is likely that you removed the sources for your running 2.6.31 => Many packages and almost all drivers will not be able to build, producing the error message you mention.

I re-suggest you :

1/ eselect kernel set 2 

2/ cd /usr/src/linux 

3/ make menuconfig.

And build a new kernel. (Warning... many options have changed between 31 and 35 so you are likely to need to review them all)

Then, you should be able to rebuild your world.

----------

## audiodef

While you're at it, check out Pappy's Kernel Seeds. It'll help you build a slimmer, more efficient kernel than make defconfig.

----------

## coviex

 *aCOSwt wrote:*   

> 
> 
> I re-suggest you :
> 
> 1/ eselect kernel set 2 
> ...

 

How do I know what options I need? I doubt they all are 100% self-explanatory and PC is pretty old.

Is there another way but menuconfig to see current options?

----------

## aCOSwt

 *coviex wrote:*   

> How do I know what options I need?

 

 :Laughing:  Is'nt this the greatest part of the game ?

Well...

Method 1 : Starting from your (I presume) working 2.6.31 .config

Did you save it somewhere or did you loose it when removing 2.6.31 sources ?

If you cannot find it, do you get a file named /proc/config.gz ?

Method 2 : Restarting from scratch default => $7.C here : http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=1&chap=7

Method 3 : Restarting from scratch automatic => $7.D within the preceeding document.

----------

## coviex

 *aCOSwt wrote:*   

> 
> 
> Method 1 : Starting from your (I presume) working 2.6.31 .config
> 
> Did you save it somewhere or did you loose it when removing 2.6.31 sources ?
> ...

 

I have .config and .config.old, but I didn't remove 2.6.31 nor saved .config on purpose  :Smile: 

 *aCOSwt wrote:*   

> 
> 
> If you cannot find it, do you get a file named /proc/config.gz ?
> 
> 

 

No such file.

----------

## krinn

Krinn's howto make a kernel for the poors

1/ cd /usr/src/linux

2/ make allmodconfig

3/ make menuconfig

(now set to Yes every drivers names you will see after running the command in #4)

4/ lspci -k | grep -A3 -E "IDE|SATA" | grep Kernel

5/ Set your kernel arch and cputype

6/ make && make modules modules_install && make install

7/ Pray (optional but it will never hurt, if you're not totally poor, you can use candles)

----------

## coviex

 *krinn wrote:*   

> 
> 
> 3/ make menuconfig
> 
> (now set to Yes every drivers names you will see after running the command in #4)

 

So #4 should be #3?

```

# make allmodconfig

make: *** No rule to make target `allmodconfig'.  Stop.
```

----------

## aCOSwt

 *krinn wrote:*   

> Krinn's howto make a kernel for the poors

 

krinn's help is always very... hmm... helpful !

His/her charming habit to find always renewed qualifiers for those (s)he helps could however appear questionnable...   :Wink: 

Well coviex, are you the author of your preceeding .config ?

If no : Opt for my method 3 above !

If yes and you are not in a hurry to conclude and want to understand things better :

1/ eselect kernel set 2

2/ Copy your old .config in /usr/src/linux

3/ make oldconfig

4/ make a diff between your new .config and your old one,

5/ make menuconfig and review all the options that differ from your two configs

If the preceeding way is not acceptable for you then : Follow krinn's howto for the poors ! (S)he is right !  :Wink: 

----------

## krinn

You didn't read the link rh1 gave you else you would have already know 1/ why this happen to you 2/ how to recover your kernel source

and the make allmodconfig would have work...

And for posterity: krinn is a he  :Very Happy: 

----------

