# Recompile - Reconfigure Kernel

## gentian

How do I recompile - reconfigure a working kernel within a working gentoo system? I forgot to include my sound card ;/

Thanks

----------

## aCOSwt

You might be interested in reading this : http://www.gentoo.org/doc/en/kernel-upgrade.xml

----------

## gentian

 *aCOSwt wrote:*   

> You might be interested in reading this : http://www.gentoo.org/doc/en/kernel-upgrade.xml

 

I don't want to upgrade, just reconfigure the existing kernel. So basically steps are: 

```
1) cd /usr/src/linux

2) make menuconfig

3) make && make modules_install

4) mount /boot

5) cp arch/my_arch/boot/bzImage /boot/bzImage-x.x.xx-gentoo

6) reboot
```

?

----------

## NeddySeagoon

gentian,

You should not overwrite you only working kernel in /boot

Rather, install it to boot with a new file name and make a new boor stanza in grub .conf to load it.

That way, if you do make a mess of your kernel and we all do from time to time, you just choose another option from the grub menu to fix it.

Its much easier that finding a bootable CD/USB and doing the chroot routine.

----------

## gentian

 *NeddySeagoon wrote:*   

> gentian,
> 
> You should not overwrite you only working kernel in /boot
> 
> Rather, install it to boot with a new file name and make a new boor stanza in grub .conf to load it.
> ...

 

Thanks, So the mentioned steps would work, correct?

----------

## NeddySeagoon

gentian,

Yes - thats correct

----------

## gentian

 *NeddySeagoon wrote:*   

> gentian,
> 
> Yes - thats correct

 

Thanks. One more thing. I read the upgrading kernel guide and I noticed the bit about using the same configuration file from a previous kernel. Is this generally a dangerous tactique? Would it be better reconfiguring everything manually in new kernels?

----------

## cach0rr0

 *gentian wrote:*   

> 
> 
> Thanks. One more thing. I read the upgrading kernel guide and I noticed the bit about using the same configuration file from a previous kernel. Is this generally a dangerous tactique? Would it be better reconfiguring everything manually in new kernels?

 

the further you leap in terms of kernel versions, the greater chance of something going awry (albeit in a fixable way)

doing make oldconfig for something like 3.2.1 => 3.2.2 no problem, even 3.2.1 => 3.3.0 should be no problem. 

i would not do make oldconfig from e.g. 2.6.39 to 3.2.1 (though that may actually work, enough will have changed id feel more comfy doing a fresh config)

nor for 2.4 to 2.6

what a lot of people do, myself included, is do a run of make oldconfig, and follow that up with make menuconfig just so they can confirm everything looks to be in order. 

In the case of your sound card, FYI, since sound cards generally do best as modules, and not built-ins, you could simply configure the ALSA drivers as modules, do "make && make modules_install", then modprobe the driver for your sound card (e.g. modprobe snd-hta-intel) without even having to reboot nor install a new kernel to /boot. That holds true IF all you are adding is a module (or three). If you're changing built-ins, you need to copy the new kernel to /boot, adjust grub if needed to point to the new kernel, and reboot

----------

