# curious eselect problem **SOLVED**

## todd93

Hello, I know the Zen kernel is unsupported, however, this isn't a Zen issue. Upon compiling a new kernel, I noticed the line at the end of the compilation was as follows:

 *Quote:*   

> 
> 
> Building modules, stage 2.
> 
>   MODPOST 34 modules
> ...

 

when I do eselect kernel list, I get the following:

 *Quote:*   

> 
> 
> # eselect kernel list
> 
> Available kernel symlink targets:
> ...

 

I know that something isn't right here, using eselect, I have the latest kernel selected, however, when I compile, as you see by the emboldened lines, it is not compiling the correct kernel. What have I done wrong?

Thanks

ToddLast edited by todd93 on Tue Oct 26, 2010 2:23 pm; edited 1 time in total

----------

## sebaro

"ls -l /usr/src", you should have /usr/src/linux symlink to linux-2.6.35-zen2.

----------

## todd93

 *sebaro wrote:*   

> "ls -l /usr/src", you should have /usr/src/linux symlink to linux-2.6.35-zen2.

 

okay, that is correct, so then, since I have compiled my kernel, should I then enter the following?

```

cp /usr/src/linux-2.6.35-zen2/arch/x86/boot/bzImage /boot/linux-2.6.35-zen2

```

or would that return an unbootable kernel?

Thanks

Todd

----------

## sebaro

The way I build the kernel:

```
eselect kernel set X

cd /usr/src/linux

make xconfig

make

make install # copies the kernel image to /boot

make modules_install # copies kernel modules to /lib/modules)

nano /boot/grub/grub.conf
```

----------

## todd93

 *sebaro wrote:*   

> The way I build the kernel:
> 
> ```
> eselect kernel set X
> 
> ...

 

That's basically what I did, the only difference, however, when I compile, I enter:

```

make && make modules install
```

the only reason I posted was because of the red flag was the "sh /usr/src/linux-2.6.31-gentoo-r6/arch/x86/boot/install.sh 2.6.31-gentoo-r6 arch/x86/boot/bzImage \" at the end of the compilation data, I would think that it would have to have the kernel that is symlinked listed in that line, or else it would not boot properly, please correct me if I'm wrong, but it appears that it is copying the incorrect image to /boot.

Thanks

Todd

----------

## sebaro

That's why I use "make install". And I always tag the kernel I'm building (eg. build0, build1). Than I just look into /boot for the kernel image (eg. vmlinuz-2.6.35-gentoo-r4-buildX) and add it to grub.conf.

The line "sh /usr/src/linux-2.6.31-gentoo-r6/arch/x86/boot/install.sh 2.6.31-gentoo-r6 arch/x86/boot/bzImage" is from /usr/src/linux/arch/x86/boot/Makefile:

```
install:

   sh $(srctree)/$(src)/install.sh $(KERNELRELEASE) $(obj)/bzImage \

      System.map "$(INSTALL_PATH)"
```

where, "srctree" should be the current directory,

and KERNELRELEASE is from /usr/src/linux/Makefile

```
KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
```

,

so in /usr/src/linux

```
cat include/config/kernel.release
```

 should give you the kernel release (linux-2.6.35-zen2).

----------

## Goverp

The first time I used "make install" on my current box (about 2 years old), it failed because the symlinks in /boot pointing to the current kernel, ("vmlinuz", "System.map" and "config") were missing.  It may have been something I did wrong, but the fix was to create them, pointing at the obvious files in /boot.

After this one-time setup, "make install" worked fine, and for ext file systems, grub.conf can use "vmlinuz" and "vmlinuz.old" to pick up your current and previous kernels, rather than needing to edit it to include a specific version.  Of course, you may prefer to explicitly state which kernel you are selecting.

IIRC, "make install" is intended for LILO users, and I use GRUB, but it works fine as long as I remember to mount /boot   :Wink: , though I'm not sure if it works if your kernel uses an initrd

----------

## todd93

 *Goverp wrote:*   

> The first time I used "make install" on my current box (about 2 years old), it failed because the symlinks in /boot pointing to the current kernel, ("vmlinuz", "System.map" and "config") were missing.  It may have been something I did wrong, but the fix was to create them, pointing at the obvious files in /boot.
> 
> After this one-time setup, "make install" worked fine, and for ext file systems, grub.conf can use "vmlinuz" and "vmlinuz.old" to pick up your current and previous kernels, rather than needing to edit it to include a specific version.  Of course, you may prefer to explicitly state which kernel you are selecting.
> 
> IIRC, "make install" is intended for LILO users, and I use GRUB, but it works fine as long as I remember to mount /boot  , though I'm not sure if it works if your kernel uses an initrd

 

Actually, I started doing it with make install, and still ended up having to copy it over, but that is no big deal, the important thing, however, is that I feel like an idiot! I actually got the kernel that was symlinked to work, simply by closing the terminal and opening a new one and starting over, I should've tried that before I posted.

Sorry

Thanks for all the input!

Todd

----------

