# "make menuconfig" does not work [NOT SOLVED]

## Bob P

i'm trying to move to an older kernel.  i've emerged the kernel, and when i go to /usr/src/linux and issue the command "make menuconfig", i receive the following error:

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

ideas?

----------

## hardcore

Did you re-make the symbolic link?  Try changing into the actual kernel source directory, then try make menuconfig

----------

## Bob P

 *hardcore wrote:*   

> Did you re-make the symbolic link?

 

i am following the instructions in the installation handbook.  for example, when i issue the command:

```
# ls -l /usr/src/linux
```

i get the following result:

```
total 0

lrwxrwxrwx  1 root root 31 Nov 11 03:51 linux-2.6.7-gentoo-r11 -> /usr/src/linux-2.6.7-gentoo-r11
```

part of my problem is that i cannot tell the difference between a file and a directory (for example:  is /usr/src/linux a file or a directory?)

additionally, i am not getting the results that are expected when i follow the code listings in the installation handbook.  for example, the gentoo installation handbook tells me to do this:

```
Code Listing 4: Changing the kernel source symlink

 

# rm /usr/src/linux

# cd /usr/src

# ln -s linux-2.4.26-gentoo-r6 linux
```

when i issue the first command, "rm /usr/src/linux"  i get the following error:

```
rm: cannot remove '/usr/src/linux': Is a directory
```

i get the same result if i issue the command:

"rm /usr/src/linux-2.6.7-gentoo-r11"  i get this error:

```
rm: cannot remove '/usr/src/linux-2.6.7-gentoo-r11': Is a directory
```

----------

## Bob P

 *hardcore wrote:*   

> Try changing into the actual kernel source directory, then try make menuconfig

 

sorry, but i'm such a n00b:  where is the acutal kernel source directory?

----------

## hardcore

Ok, first off give me the output of 

```
ls -l /usr/src
```

----------

## Bob P

```
# ls -l /usr/src

total 2

drwxr-xr-x   2 root root    88 Nov 11 03:59 linux

drwxr-xr-x  18 root root   632 Nov 11 02:53 linux-2.6.10-rc1

drwxr-xr-x  18 root root   632 Nov 11 03:51 linux-2.6.7-gentoo-r11

drwxr-xr-x  18 root root  1408 Nov 11 02:47 linux-2.6.9-gentoo-r3
```

----------

## hardcore

ok it appears that your /usr/src/linux *is* an actual directory, do this as root:

```
cd /usr/src

rm -rf /usr/src/linux

ln -s linux-2.6.10-rc1 linux

cd /usr/src/linux

make menuconfig
```

Replace linux-2.6.10-rc1 with whatever kernel source you're going to be using.

----------

## Bob P

deleting the directory seems to have done the trick.   i am configuring the kernel now.    :Cool: 

thanks for the help.

btw, how do you tell whether an item in the directory is a file or a subdirectory?  it seems very ambiguous in linux.

----------

## hardcore

You'll want to list your files with ls -l.  take this output for example:

```
# ls -l /usr/src

total 2

drwxr-xr-x   2 root root    88 Nov 11 03:59 linux

drwxr-xr-x  18 root root   632 Nov 11 02:53 linux-2.6.10-rc1

drwxr-xr-x  18 root root   632 Nov 11 03:51 linux-2.6.7-gentoo-r11

drwxr-xr-x  18 root root  1408 Nov 11 02:47 linux-2.6.9-gentoo-r3
```

The d that precedes everything expresses that it is a directory.  Or you can also use the directory colors for ls, such as ls --color, directories should be a dark blue.

----------

## Bob P

well, everything seemed to be going well as the kernel compiled... until...

```
Kernel: arch/i386/boot/bzImage is ready

sh /usr/src/linux-2.6.10-rc1/arch/i386/boot/install.sh 2.6.10-rc1 arch/i386/boot/bzImage System.map "/boot"

cat: write error: No space left on device

make[1]: *** [install] Error 1

make: *** [install] Error 2
```

i have no idea how this could be happening.  i am still working on a fresh installation after partitioning 40GB of an 80 GB drive for linux, as described in the Installation Handbook.   :Question: 

----------

## Bob P

 *hardcore wrote:*   

> The d that precedes everything expresses that it is a directory.  Or you can also use the directory colors for ls, such as ls --color, directories should be a dark blue.

 the color feature is very cool.  is there a way to set that as a default, or do i always have to use the command line parameter "--color"?

----------

## hardcore

Did you mount /boot?  And as for making colors automatic, put it into .bashrc in your home directory.  Down at the bottom of the file put in 

```
alias ls="ls --color"
```

----------

## Bob P

 *hardcore wrote:*   

> Did you mount /boot?  

 

i don't think that i have to mount it manually -- do i?  i have removed the noauto option from /etc/fstab. so i was thinking that it would mount automatically.

```
# /etc/fstab: static file system information.

# $Header: /var/cvsroot/gentoo-src/rc-scripts/etc/fstab,v 1.18 2004/10/16 05:42:25 vapier Exp $

#

# noatime turns off atimes for increased performance (atimes normally aren't 

# needed; notail increases performance of ReiserFS (at the expense of storage 

# efficiency).  It's safe to drop the noatime options if you want and to 

# switch between notail / tail freely.

#

# See the manpage fstab(5) for more information.

# <fs>         <mountpoint>   <type>      <opts>      <dump/pass>

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.

/dev/hda1      /mnt/c      vfat      noauto,users,exec   0 0

/dev/hda2      /boot      reiserfs   notail      1 1

/dev/hda4      /      reiserfs   notail      0 1

/dev/hda3      none      swap      sw      0 0

/dev/cdroms/cdrom0   /mnt/cdrw   iso9660      user,noauto,exec   0 0

/dev/cdroms/cdrom1   /mnt/dvdrom   iso9660      user,noauto,ro,exec   0 0

/dev/fd0      /mnt/floppy   auto      noauto,user   0 0

# NOTE: The next line is critical for boot!

none         /proc      proc      defaults   0 0

# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for 

# POSIX shared memory (shm_open, shm_unlink).

# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will

#  use almost no memory if not populated with files)

none         /dev/shm   tmpfs      nodev,nosuid   0 0

```

well, my /boot drive is now full -- i have zero free space.  how do i get out of this predicament?   :Laughing: 

PS - is there supposed to be a "/boot" directlry on my "/" drive?

----------

## hardcore

Yes there is supposed to be a boot directory in /, but there should be nothing within this folder unless /dev/hda2 is mounted on /boot.

Post the output of 

```
mount /boot

ls -lh /boot

df -h

```

for me.

----------

## Bob P

can you tell me how i can pipe the text output to my floppy drive?  right now i have no ability to cut and paste from the linux box to the separate windows box where i am typing this.  my linux box has no desktop environment installed yet -- all i have is a command line interface and i have not been able to mount my floppy.  as a result, i have to pipe the commands to text files, and then boot knoppix to copy the text files to a floppy, and carry them over to a Win PC.  piping them to a file on the floppy (or just copying them to a floppy in gentoo) would be alot easier.

here is the output that you asked for:

```
# mount /boot

mount: /dev/hda2 already mounted or /boot busy

mount: according to mtab, /dev/hda2 is already mounted on /boot

# ls -lh /boot

total 6.0M

lrwxrwxrwx  1 root root   26 Nov  9 01:48 System.map -> System.map-2.6.9-gentoo-r3

-rw-r--r--  1 root root 776K Nov 11 06:56 System.map-2.6.10-rc1

-rw-r--r--  1 root root 952K Nov  9 01:48 System.map-2.6.9-gentoo-r3

lrwxrwxrwx  1 root root    1 Nov  7 12:56 boot -> .

lrwxrwxrwx  1 root root   22 Nov  9 01:48 config -> config-2.6.9-gentoo-r3

-rw-r--r--  1 root root  36K Nov  9 01:48 config-2.6.9-gentoo-r3

-rw-r--r--  1 root root 588K Nov  9 02:06 fbsplash-emergence-1024x768

drwxr-xr-x  2 root root  752 Nov  9 03:48 grub

lrwxrwxrwx  1 root root   18 Nov 11 06:56 vmlinuz -> vmlinuz-2.6.10-rc1

-rw-r--r--  1 root root 1.9M Nov 11 06:56 vmlinuz-2.6.10-rc1

-rw-r--r--  1 root root 1.9M Nov  9 01:48 vmlinuz-2.6.9-gentoo-r3

lrwxrwxrwx  1 root root   23 Nov  9 01:48 vmlinuz.old -> vmlinuz-2.6.9-gentoo-r3

# df -h

Filesystem            Size  Used Avail Use% Mounted on

/dev/hda4              45G  2.0G   43G   5% /

none                  125M  616K  124M   1% /dev

/dev/hda2              40M   40M     0 100% /boot

none                  125M     0  125M   0% /dev/shm

```

----------

## hardcore

Make sure your floppy is mounted, say in /mnt/floppy

```
df -h >> /mnt/floppy/your_text_file.txt
```

Can you give me the output of 

```
umount /boot

ls -lh /boot

du -h /boot

df -h
```

----------

## Bob P

```
# mount /dev/fd0 /mnt/floppy

mount: fs type msdos not supported by kernel
```

to fix the kernel, i need to write to a dos floppy.  to write to a dos floppy, i need to fix the kernel.

AARGH!!!

it will take me a few minutes to do this the old way, with piping to hard disk, rebooting in knoppix, copying to floppy, carrying over to windows...

 :Evil or Very Mad: 

----------

## Bob P

here you go:

umount /boot

```
# umount /boot

#

```

(no text output was written to display)

ls -lh /boot

```
# ls -lh /boot

total 3.6M

lrwxrwxrwx  1 root root   26 Nov  9 23:12 System.map -> System.map-2.6.9-gentoo-r3

-rw-r--r--  1 root root 961K Nov  9 23:12 System.map-2.6.9-gentoo-r3

lrwxrwxrwx  1 root root   22 Nov  9 23:12 config -> config-2.6.9-gentoo-r3

-rw-r--r--  1 root root  36K Nov  9 23:12 config-2.6.9-gentoo-r3

-rw-r--r--  1 root root 588K Nov  9 23:52 fbsplash-emergence-1024x768

lrwxrwxrwx  1 root root   23 Nov  9 23:12 vmlinuz -> vmlinuz-2.6.9-gentoo-r3

-rw-r--r--  1 root root 2.0M Nov  9 23:12 vmlinuz-2.6.9-gentoo-r3

```

du -h /boot

```
# du -h /boot

3.6M   /boot

```

df -h

```
Filesystem            Size  Used Avail Use% Mounted on

/dev/hda4              45G  2.0G   43G   5% /

none                  125M  616K  124M   1% /dev

none                  125M     0  125M   0% /dev/shm

```

----------

## hardcore

That could be one of your problems right there, you have data in /boot without /boot being mounted.  So when /boot is mounted, it causes problems.

I suggest removing everything in /boot (while unmounted, back it up somewhere in case you need all those kernels), then mount /boot, and try making your kernel.

----------

## Bob P

sorry for the long delay in responding.  i had been at this all day and all night, and i needed a nap.

i'm not quite sure which of these problems cleaning out the unmounted "/boot" directory will solve.

first,  think that i understand: the problem is that if there are files in  /hda4/boot (aka root) when the /hda2 (aka /boot) drive is not mounted, then when it is mounted, the system may be confused about which files to execute.  my guess is that the files in /hda4/boot get executed first, when they should not be.  so the solution is to get rid of the files that physically reside on /hda4/boot, so that when the /boot drive is mounted, then only the files that actually reside in /hda2 will be interpreted as residing in the /boot directory.  is this correct?

second, i still have the problem where my /hda2 drive became full during an emerge update world.  what should i do about that?

third, what caused this problem and how to i prevent its recurrence?  i get the impression that this problem developed when i had the /hda2 drive unmounted, but performed operations that needed access to /boot.  am i correct in assuming that since the drive was not available, the computer chose to put data in /hda4/boot instead?  i think that this condition came to exist because i had a "noauto" statement in /etc/fstab for /dev/hda2.  the 'noauto' statement is now gone.  will this prevent the problem from recurring?

thanks for all of your help!

----------

## hardcore

Your first assumption is correct, so is your third.  The same problem happened to me awhile back.

The second question puzzles me because an emerge -u world really shouldn't be touching /boot.

And thank you for bringing me up to a "l33t" ranking   :Laughing: 

Edit:

After reading your third point a bit more carefully, I forgot to mention that removing the noauto won't help, you should leave it in.  Just remember whenever you're about to compile a new kernel source to ALWAYS mount /boot beforehand, just so you don't have to go through this again.

----------

## Bob P

to make things a little easier for me, i've booted up knoppix on that PC and i'm looking at the files on both disks using the KDE gui.  

looking at everything in konqueror made it alot easier to see what is going on, even though i have no ability to write to the disk or to delete files via knoppix, as gentoo/reiser changes the status of all of the hard disks to read only during shutdown.  looking at the disks in "tree view" yielded some very interesting results:

on the device /mnt/hda2 i found something surprising.

the directory /boot is there, and it has the right config-2.6.* files for the kernel, the kernel istelf, and the System.map* files, along with a vew vmlinuz* kernel files.  it also has another directory residing beneath it that contains identical replicated contents: /boot/boot.

the really odd thing is that the /boot directory and its related file contents are nested beneath itself and replicated over and over and over again ad infinitum, until the disk is completely filled:

/boot/boot/boot/boot/boot/boot/boot/boot/boot/boot/boot/boot/boot/boot/boot...

that is why the drive is full!

so i guess that i need to get rid of all of them except for the /boot directory, trimming off /boot/boot and all of its children.

what is the suitable command to prune off the entire directory tree from /boot/boot and beyond, leaving only /boot?

so i think that this would address problem number 2 in my previous post.

in /mnt/hda4/boot there is one set of files.  the same files exist in the /boot directory on /hda2, so i think that its safe to delete the files on /hda4/boot without backing them up -- after all, i have to have thirty directories with kernel files nested on /hda2. 

thanks for your help.  and congrats on your l33t status!  because of these problems i've been very busy on the board, and even though i've only been on a short time, i've already made it to "apprentice".

----------

## Bob P

PS - i don't think that i filled up the /dev/hda2 with all of the /boot/boot/boot... files when doing the emerge update world.  i'm sure that it happened when i tried to emerge and unmgerge and recompile different kernels.  but why the nesting ever happened escapes me.  iw ould have expected files to replace one another instead of nesting their content in directory after directory...

----------

## Bob P

is there supposed to be a symlink between the /boot directory on /hda4 and /hda2?

----------

## mwirth

```

lrwxrwxrwx  1 root root    1 Nov  7 12:56 boot -> .

```

/boot/boot is just a symbolic link to /boot , so there is no /boot/boot/boot/boot....

/boot on hda4 should just be an empty directory to serve as mount point for the hda2 partition. no symlink there

----------

## Bob P

 *mwirth wrote:*   

> 
> 
> ```
> 
> lrwxrwxrwx  1 root root    1 Nov  7 12:56 boot -> .
> ...

 what drive does your code listing refer to?  i have no idea what it means.

 *Quote:*   

> /boot/boot is just a symbolic link to /boot , so there is no /boot/boot/boot/boot....

   what?  in my case i DID have an entire series of /boot/boot/boot... so something has to be wrong.

i used the GUI in knoppix to delete the nested array of /boot/boot/boot...

as a result, my drive became nearly empty.

but as soon as i booted gentoo via the live CDE, /hda2 is 100% utilized again.  i have no idea how the drive is becoming filled to capacity.  unfortunately, the 100% full disk prevents me from compiling a new kernel.  i have no idea where all of the stuff filling the drive is coming from.  something has to be seriously wrong...

how can i make room on this drive?

----------

## mwirth

 *Bob P wrote:*   

>  *mwirth wrote:*   
> 
> ```
> 
> lrwxrwxrwx  1 root root    1 Nov  7 12:56 boot -> .
> ...

 

look at this:

 *Bob P wrote:*   

> can you tell me how i can pipe the text output to my floppy drive?  right now i have no ability to cut and paste from the linux box to the separate windows box where i am typing this.  my linux box has no desktop environment installed yet -- all i have is a command line interface and i have not been able to mount my floppy.  as a result, i have to pipe the commands to text files, and then boot knoppix to copy the text files to a floppy, and carry them over to a Win PC.  piping them to a file on the floppy (or just copying them to a floppy in gentoo) would be alot easier.
> 
> here is the output that you asked for:
> 
> ```
> ...

 

it's in the output of ls -lh /boot

"." always means the current directory

".." is the superordinate directory

in this case you have a symbolic link 

boot -> .

which is a link called "boot", which points to the current directory (".")

----------

## Bob P

 *mwirth wrote:*   

> 
> 
> it's in the output of ls -lh /boot
> 
> "." always means the current directory
> ...

 

thanks for clarifying that for me!

yikes!  i have two PCs that i've installed Gentoo on, one as Stage 1 one as Stage 2.  both of them had that "boot ->" symbolic link. 

i have removed it on one of the PCs, and just found it on the other one.  i have no idea how that file was created, as i followed the Installation Handbook to the letter.

anyway, on the machine that has just finished the Stage 2 install, i cannot do an "emerge --update world" because i receive "ACCESS DENIED" errors.  looking at the disk, /boot is 100% filled with no free space, just like it happened on the PC we've been discussing in this thread.

will that symlink cause the /boot drive to fill up?  where did it come from and what should i do about it?

----------

## Bob P

still not clear on this -- 

is that symbolic link 

boot ->.

supposed to be there, or is it not supposed to be there?

i have two machines that now have 100% full /dev/hda1 (/boot).

----------

## hardcore

Yes, that symbolic link is supposed to be there.

And as to your /boot partition filling up, I think it may have to do with the way you're moving your kernel builds.

This is how I compile/install kernel's

```
mount /boot

make menuconfig

make && make modules_install

cp /usr/src/linux/arch/i386/boot/bzImage  /boot/bzImage.kernel.version

edit /boot/grub/grub.conf
```

----------

## Bob P

hardcore, i just learned something that may explain some of the problems:

i followed the GIH (gentoo install handbook) recommendations regarding partition sizes.  i put reiserfs on /dev/hda1.  the problem is that the journals for resierfs take up 32M, and my parition size on /boot is only 32M.  so it seems that reiserfs is using 100% of my drive for its journals.  to use reiser, i should have made the partitin twice as big!  i am now in the process of moving to ext2fs to see if that solves the problem.

thanks for your ongoing help!

----------

## hardcore

D'OH!  I should have noticed that when you posted your fstab.  The lack of space now is entirely clear to me lol.

----------

## Bob P

its alot funnier to me now that i can look back on it.  Ha!   :Laughing: 

----------

