# Trouble Upgrading Kernel (first upgrade) [Solved]

## HungGarTiger

Hi guys,

It's my first time upgrading my kernel, trying to upgrade to the new 4.0.9 version. I've been following the wiki but it seems I've hit a wall, or something I've missed.

Here are the steps I took..

```

1. emerged the new version

2. cd /usr/src/linux

3. cp .config ~/kernel-config`uname -r`

4. change symlink with eselect

5. cp /usr/src/linux-3.14.14-gentoo/.config /usr/src/linux/

6. make olddefconfig

7. make -> make modules_install -> make install

8. grub2-mkconfig -o /boot/grub/grub.cfg

9. reboot

```

here is the output of #8

```
Generating grub configuration file ...

Found linux image: /boot/kernel-genkernel-x86_64-4.0.5-gentoo

Found initrd image: /boot/initramfs-genkernel-x86_64-4.0.5-gentoo

Found linux image: /boot/vmlinuz-4.0.9-gentoo

done

```

It just rebooted back into kernel 4.0.5. So I thought I'd just come and check I was moving in the right direction before deleting 4.0.5 and --depclean'ing it.Last edited by HungGarTiger on Sat Nov 14, 2015 11:16 pm; edited 1 time in total

----------

## Buffoon

I do not know what is wrong (I do everything by hand to keep it simple), but this is odd

```
5. cp /usr/src/linux-3.14.14-gentoo/.config /usr/src/linux/
```

I thought you were running 4.0.5?

----------

## HungGarTiger

 *Buffoon wrote:*   

> I do not know what is wrong (I do everything by hand to keep it simple), but this is odd
> 
> ```
> 5. cp /usr/src/linux-3.14.14-gentoo/.config /usr/src/linux/
> ```
> ...

 

Yeah I am, just copied that directly from the guide is all.

----------

## davidm

What about your initramfs?  Do you still need one?  It looks like you might be moving from Genkernel to a custom kernel, or no?

Depending on your configuration Grub(2) will automatically select an entry with a delay of something like 0-10 seconds.  If you have this delay hit ESC or TAB (I forget which one exactly but you can try both) and this will allow you to select a kernel.  See if your 4.0.9 kernel actually boots but just isn't being selected by Grub by default.  If this is the case then you can change it -- perhaps with:

 *Quote:*   

> 
> 
> Setting configuration parameters
> 
> The following variables in /etc/default/grub are the most common ones to set to control how GRUB2 will function:
> ...

 

https://wiki.gentoo.org/wiki/GRUB2

So it looks like maybe the first detected entry for whatever reason is your older kernel and maybe you just need to change that?

----------

## tryn

HungGarTiger

I think that you needed this command between number 7 and 8 

```
cp arch/x86_64/boot/bzImage /boot/kernel-4.0.9-gentoo
```

 The arc/x86_64 might be different on your computer though.

----------

## Buffoon

 *tryn wrote:*   

> HungGarTiger
> 
> I think that you needed this command between number 7 and 8 
> 
> ```
> ...

 

Nah, this is if you want everything to go as you want. There is fancy make install ... I wonder if this make install actually verifies whether /boot is mounted or not.

----------

## tryn

Buffoon

 I did have that in mind also. The thing about /boot being mounted that is.

 But did hope that this wasn't the case.

----------

## HungGarTiger

 *davidm wrote:*   

> What about your initramfs?  Do you still need one?  It looks like you might be moving from Genkernel to a custom kernel, or no?
> 
> Depending on your configuration Grub(2) will automatically select an entry with a delay of something like 0-10 seconds.  If you have this delay hit ESC or TAB (I forget which one exactly but you can try both) and this will allow you to select a kernel.  See if your 4.0.9 kernel actually boots but just isn't being selected by Grub by default.  If this is the case then you can change it -- perhaps with:
> 
>  *Quote:*   
> ...

 

I'm not consciously moving to a custom kernel...

I tried selecting the option for the new kernel and it just panics. Not sure what my next move should be to be honest.   :Confused: 

----------

## Banana

Any error messages would be helpful. From dmesg, kernel or even /var/log/everything.

use 

```
wgetpaste -t FILENAME
```

 and then copy the URL in your reply.

----------

## HungGarTiger

Problem solved, I just had the run 

```
genkernel all
```

 in order to build initramfs and reboot.

----------

