Gentoo Trick: module-rebuild

Translation of the original in Catalan. Read it in: CatalàCastellano

The pof in his day and the GWN (Gentoo Weekly News) in one of its latest editions have mentioned to us at some point this very useful tool whose exact name I never remember. Besides, it always comes when you need it most, that is, when you do a kernel update. It is used for something as useful as recompiling the modules that are not native to the kernel for the new kernel version we have just installed, saving us the bad moment we have all been through of needing exactly the module that controls the device that was not supported generically by the kernel and at that very moment we don't have the module compiled.

Suppose you've just booted into a freshly updated kernel. First of all, check which packages are using modules that haven't been built with the new sources yet:

module-rebuild list

and then you can rebuild them all by simply going:

module-rebuild rebuild

To have module-rebuild available do an emerge of:

*  sys-kernel/module-rebuild
      Latest version available: 0.5
      Latest version installed: 0.5
      Size of downloaded files: 0 kB
      Homepage:    http://www.gentoo.org/
      Description: A utility to rebuild any kernel modules which you have installed.
      License:     GPL-2

UPDATE 5/6/2006: note when doing the list that not all the packages that install modules are always in your list, therefore, I recommend that you add the packages that have modules with the add option of the module-rebuild command, from then on it will remember that dependency itself in the rebuild.

2 comments

Comments from the old blog, as they were written. Comments are closed.

  1. javiVF

    Cony! Dons ja mola! I jo tirant de "sh /root/bin/newkernel"... xD

  2. Carita