# link or copy new kernel - just a reminder to an og [solved]

## cwc

I just recompiled my kernel and read the doc http://www.gentoo.org/doc/en/kernel-upgrade.xml

When I did this a year or so ago I ln -s the vmlinux to boot but I can't recall how I did it.

Now I need to link the new kernel to boot.  As I recall there are a couple of ways to copy vmlinux to boot.

One was easy and slick and the other was difficult.

Please throw me a bone on how you copy or link your new kernel. 

Thanks,

cwc

----------

## mikegpitt

Personally I just take the advice here:

http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=7

...and copy the kernel to /boot:

```
cp arch/i386/boot/bzImage /boot/kernel-2.6.34-gentoo-r1
```

There is no need to link the kernel binary to vmlinuz, unless you want to point to the link in your grub.conf.  If yes, just to this and it should work fine:

```
cp arch/i386/boot/bzImage /boot/kernel-2.6.34-gentoo-r1

cd /boot

ln -s kernel-2.6.34-gentoo-r1 vmlinuz
```

I should note that you likely don't want to link vmlinuz to /usr/src/linux/arch/i386/boot/bzImage, since if you have a separate /boot partition, that is likely the only thing mounted at boot and you won't be able to access to binary under /usr/share/linux.

----------

## cwc

 *mikegpitt wrote:*   

> Personally I just take the advice here:
> 
> http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=7
> 
> ...and copy the kernel to /boot:
> ...

 

that did the job.  thanks for the reminder.  I like it.  I had to (and still have to) recompile my kernel to get my ati-drivers back after I did an emerge world.  I lost my x11 (startx fails).  so I'm emerging the ati-drivers with hangups.  now I'm stuck on CONFIG_PCI_MSI ?

I thought I compile the ati-drivers in my kernel with I was running a pre 2.6.34 kernel.

I love gentoo!

----------

## widremann

Any reason why I never see "make install" suggested instead of the manual copy?

----------

## boerKrelis

After you've done

```
make bzImage modules modules_install
```

mount your boot partition read-write and try

```
make install
```

----------

## boerKrelis

 *widremann wrote:*   

> Any reason why I never see "make install" suggested instead of the manual copy?

 

While you were posting that, I was typing up a suggestion to do exactly that ;-)

----------

## mikegpitt

 *widremann wrote:*   

> Any reason why I never see "make install" suggested instead of the manual copy?

 Don't know... i never actually did a `make install` on the kernel, just:

```
make && make modules_install
```

I think the thing to note is that there is no right/wrong was to do this... just what works for you and what doesn't.

----------

## John R. Graham

I inquired ages ago about why "make install" wasn't the default instructions in the handbook and was told that it didn't work uniformly across all architectures and that, since they wanted similar instructions in all the handbooks, they wouldn't do it where it did work.  That said, I like it, mostly for the automatic symlink handling, and I use it all the time.  I only have x86 and amd64, though.

- John

----------

## d2_racing

Hi, right now, I'm using this for about 3-4 months :

```

# make -j5 && make modules_install && make install && mount /boot && boot-update

# reboot

```

It's on my Funtoo box by the way, the integration of autoscript for grub2 is awesome IMOO.

----------

## cwc

make -j5 && make modules_install && make install && mount /boot && boot-update 

what i meant to say is: " this forum is what i enjoy most about gentoo."

what does make -j5 do?

does boot-update do anything more that copying the kernel manually to boot?

I still can't get my ati video and revdep to work  :Sad: 

I'll a few things then start a new thread.

thanks for all the input!

----------

## d2_racing

 *cwc wrote:*   

> make -j5 && make modules_install && make install && mount /boot && boot-update 
> 
> what i meant to say is: " this forum is what i enjoy most about gentoo."
> 
> what does make -j5 do?
> ...

 

the make -j5 make sure that with my Quad Core, the compilation process is much faster.

 *cwc wrote:*   

> 
> 
> does boot-update do anything more that copying the kernel manually to boot?
> 
> 

 

Of course, it automagically modify the /boot/grub/grub.cfg to include the newest kernel.

thanks for all the input![/quote]

----------

## keenblade

 *d2_racing wrote:*   

> Hi, right now, I'm using this for about 3-4 months :
> 
> ```
> 
> # ... && boot-update
> ...

 

Does it come with grub2?

My way of kernel compilation:

```

# make && make modules_install && module-rebuild rebuild && mount /boot ; mpc toggle

# cp arch/x86_64/boot/bzImage /boot/kernel-x86_64-2.6.35 && cp System.map /boot/System.map-x86_64-2.6.35

```

Then edit the menu.lst. 

I love the part "mpc toggle". It makes me know when the compilation has finished by playing my favorite songs with mpd. It is a life and time saver with world update, too.

----------

## d2_racing

No, boot-update is part of Funtoo.

One of the reason why I'm testing Funtoo for about 6 months on my production box.

----------

## keenblade

 *d2_racing wrote:*   

> No, boot-update is part of Funtoo.
> 
> One of the reason why I'm testing Funtoo for about 6 months on my production box.

 

Thanks. It seems Funtoo has very good ideas.

----------

## saellaven

I run make oldconfig and make by hand, then to install everything, I have the following script, which also compiles my graphics and virtual box drivers.

```

#!/bin/bash

# Copies bzImage to /boot/linux-(version)

# Copies System.map to /boot/System.map-(version)

# Saves a copy of the .config to /root/kernel for history

# Installs modules

LINUXSRC=/usr/src/linux

KVERSION=$(grep "^VERSION\ =" $LINUXSRC/Makefile | sed -e "s/VERSION\ = //")

KPATCH=$(grep "^PATCHLEVEL\ =" $LINUXSRC/Makefile | sed -e "s/PATCHLEVEL\ = //")

KSUB+=$(grep "^SUBLEVEL\ =" $LINUXSRC/Makefile | sed -e "s/SUBLEVEL\ = //")

KEXTRA+=$(grep "^EXTRAVERSION\ =" $LINUXSRC/Makefile | sed -e "s/EXTRAVERSION\ = //")

KNAME=$KVERSION.$KPATCH.$KSUB$KEXTRA

echo "Installing System.map and kernel plus archiving .config"

cp $LINUXSRC/arch/x86_64/boot/bzImage /boot/linux-$KNAME

cp $LINUXSRC/System.map /boot/System.map-$KNAME

cp $LINUXSRC/.config /root/kernel/config-death-$KNAME

echo "Installing modules"

cd $LINUXSRC

make modules_install

echo "Rebuilding nvidia-drivers and virtualbox-modules"

emerge -1 nvidia-drivers virtualbox-modules

```

That's followed by a quick tweak of lilo.conf and running lilo

----------

