# How to setup new configured kernel on grub?

## sk8harddiefast

I finally download the latest Linux Kernel and I configure it. But how to boot from it?

I make emerge-sources

I eselect kernel list and set it to the newest kernel

I go to /usr/src/linux

I run make xconfig

I compile kernel (make, make modules_install, make install)

I cp /usr/src/linux/arch/x86_64/boot/bzImage  /boot/kernel-3.13.2-gentoo

I rebooted but still boot the previous generic kernel

How to make it boot my new configured kernel?

----------

## smerf

Which bootloader do you use?

Maybe you just forgot to configure it?

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

----------

## sk8harddiefast

I use grub2. As far as I remember I run this:

Installing GRUB2

```

# emerge sys-boot/grub

# grub2-install /dev/sda

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

```

Grub configure my genkernel but now I want to change to newone and remove the old kernel when I will be sure that my new kernel work fine.

----------

## smerf

You need to:

```
mount /boot

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

If you are afraid that this will destroy your previous config backup /boot/grub/grub.cfg first.

----------

## sk8harddiefast

Ok. I made it and found the new kernel. But still boot the old.

Remove the old kernel from /boot and run again the command or this is a bad idea?

On my /boot now I have this:

```
ember@gentoo /boot $ ls

config-3.13.2-gentoo

grub

initramfs-genkernel-x86_64-3.10.25-gentoo

kernel-genkernel-x86_64-3.10.25-gentoo

linux-3.13.2-gentoo

lost+found

System.map-3.13.2-gentoo

System.map-genkernel-x86_64-3.10.25-gentoo

vmlinuz-3.13.2-gentoo

```

----------

## smerf

Have a look at /etc/default/grub: GRUB_DEFAULT=0 means boot first entry, you can use GRUB_DEFAULT=saved to boot last used entry.

Remember to run grub2-mkconfig -o /boot/grub/grub.cfg each time you modify /etc/default/grub

And definitely read: http://wiki.gentoo.org/wiki/GRUB2 (you may find also some EFI related answers there)

----------

## smerf

PS: of course you can remove old kernel, but first make sure that the new one works fine.

----------

## sk8harddiefast

Ok. I made it. But now I have no X. It tells me than nvidia not found. I have nvidia-drivers installed and modprobe nvidia tells me that not found. Any idea?

----------

## smerf

You made new kernel, now it is time to rebuild the modules. You have nvidia-drivers installed, but for old kernel.

```
emerge --ask @module-rebuild
```

https://wiki.gentoo.org/wiki/Kernel/Upgrade

----------

## Juippisi

Also, I recommend you to read https://forums.gentoo.org/viewtopic-t-982630.html since newest nvidia-drivers dont go hand-in-hand with newest kernel-sources (>3.13). Works fine with 3.12 and 3.10 though.

----------

## sk8harddiefast

You are too late. I already made the mistake  :Sad:  I have messed all the system  :Sad: 

Nvidia gave me acpi_os_event error but I fix that. Compiled ok. Modprobe also load it. I tried to rebuild everything and now gobject-introspection refuses to be built  :Sad: 

See here: https://forums.gentoo.org/viewtopic-t-984222.html

----------

