# What to rebuild after a kernel upgrade?

## dE_logics

Apparently there's no info on this and I started to realize it when X started to crash for some unknown reason (X, kernel logs reveal nothing at all....).

So what should be rebuild after a kernel upgrade?

----------

## XQYZ

Stuff that links against kernel sources? Nvidia's binary blob driver and extensions/modules for virtual servers comes to mind. Also everything that brings a kernel module along I guess.

----------

## GES

```
# eix module-rebuild

[I] sys-kernel/module-rebuild

     Available versions:  0.5 ~0.6

     Installed versions:  0.5(16.25.50 2011-01-27)

     Homepage:            http://www.gentoo.org/

     Description:         A utility to rebuild any kernel modules which you have installed

```

----------

## d2_racing

Yep, I use module-rebuild  since 2008, it's really something that I use when I change my kernel.

----------

## aCOSwt

 *GES wrote:*   

> 
> 
> ```
> # eix module-rebuild
> ```
> ...

 

Of course, module-rebuild is the final solution... provided... you know with what you should populate it...   :Twisted Evil: 

Because, per se, module-rebuild will not discover this automagically.

As SQYZ correctly points out, the kind of thing you are likely to have to rebuild is drivers.

But... depending on what you have installed, it might not be enough.

mikegpitt and I have had a fruitful discussion on how to find exhaustively the packages : (Posts 4 and 6) https://forums.gentoo.org/viewtopic-t-855503-highlight-kernel.html

----------

## depontius

 *aCOSwt wrote:*   

>  *GES wrote:*   
> 
> ```
> # eix module-rebuild
> ```
> ...

 

Has "module-rebuild populate" failed for you?

----------

## aCOSwt

 *depontius wrote:*   

> Has "module-rebuild populate" failed for you?

 

It has.

Well... in the past I mean...   :Twisted Evil:  So... things might have changed since.

module-rebuild populate was recurrently unable to find drivers with more or less exotic naming schemes, those of the kind only a driver programmer can imagine...   :Rolling Eyes:   mixing hyphens and digits.

It was also unable to correctly deal with vmware kernel modules.

My opinion being that this kind of tool is either exhaustive or useless, I no longer use it.

----------

## davidm

 *d2_racing wrote:*   

> Yep, I use module-rebuild  since 2008, it's really something that I use when I change my kernel.

 

Same here.  They cover it decently in the kernel upgrade guide as well.

http://www.gentoo.org/doc/en/kernel-upgrade.xml

----------

## depontius

 *aCOSwt wrote:*   

> 
> 
> module-rebuild populate was recurrently unable to find drivers with more or less exotic naming schemes, those of the kind only a driver programmer can imagine...    mixing hyphens and digits.
> 
> 

 

Since my usage generally extends to nvidia-drivers, openafs-kernel, and lirc, I've never seen a problem.  But then, none of those are exotic.

----------

## dE_logics

I was wondering I need to rebuild things like X libs, *glib* etc...

----------

## slackline

If you're using the latest development arm of portage then you can use...

```

emerge @module-rebuild && emerge @x11-module-rebuild

```

...without the need for sys-kernel/module-rebuild.

----------

## truekaiser

 *depontius wrote:*   

>  *aCOSwt wrote:*   
> 
> module-rebuild populate was recurrently unable to find drivers with more or less exotic naming schemes, those of the kind only a driver programmer can imagine...    mixing hyphens and digits.
> 
>  
> ...

 

Lirc in the portage tree is out of date and no longer needed now that it is being included in the kernel all be it under staging drivers.

----------

## depontius

 *truekaiser wrote:*   

>  *depontius wrote:*    *aCOSwt wrote:*   
> 
> module-rebuild populate was recurrently unable to find drivers with more or less exotic naming schemes, those of the kind only a driver programmer can imagine...    mixing hyphens and digits.
> 
>  
> ...

 

You still need the userspace side, and some (like me) haven't moved to devinput yet.  I saw a while back on the list one of the developers saying that some 2.6.37 code might be stale, and the 2.6.38 drivers would likely work better.  It's a little new, yet.

----------

## cwr

 *dE_logics wrote:*   

> I was wondering I need to rebuild things like X libs, *glib* etc...

 

No.  That is, I've never had to, and I don't see how they could be affected.   The problem

is in modules which the kernel doesn't automatically rebuild, and some kernel profiling and

debugging stuff.  I've never used binary drivers, but  I'd expect that they'd bite you too.

Will

----------

## Sysa

Usually I do 

```
emerge -1 $(qlist -IC udev driver)
```

 only but recently (after migration to 2.6.37 and KMS) I had to make

```
emerge -1 $(qlist -IC xorg x11 drm)
```

also to solve a "black screen" problem.

----------

