modprobed-db(8)

NAME
Modprobed-db - Store every unique module probed on the system.

SYNOPSIS
modprobed-db [options]

DESCRIPTION
Modprobed-db is a useful utility for users wishing to build a minimal kernel via a "make localmodconfig" step. In a nutshell, "make localmodconfig" creates a config based on the current config and from a list of modules you define (that modprobed-db keeps for you). It then disables any module option that is not needed thus not building hundreds/potentially thousands of extraneous modules. This results in a system-specific, streamlined kernel package and footprint as well as reduced compilation times.

Modprobed-db simply logs every module ever probed on the target system to a text-based database ($XDG_CONFIG_HOME/modprobed-db) which can be read directly by "make localmodconfig" as described above.

Be sure to see the TIPS section!

OPTIONS

list
    Display to stdout the contents of the user database defined in $XDG_CONFIG_HOME/modprobed-db.conf.

store
    Take a snapshot of currently loaded modules and log them to the database file. Note that this operation collects a cumulative list of all modules probed and only logs ones that modprobed-db has not seen before.

storesilent
    Same as store but less verbose.

debug
    Print the difference between currently loaded modules (/proc/modules) and the user database.

recall
    Call modprobe for every module contained in the database.

rebuild
    Rebuild the database to remove stale modules entries. The current database is loaded via modprobe (warnings are suppressed if any are present) and then a new database is generated based on what loaded successfully. The old database is backed-up.

SETUP AND BASIC USAGE

1.  Edit $XDG_CONFIG_HOME/modprobed-db.conf to define modules to ignore in the IGNORE array. For example, modules that are not provided by the Linux kernel package and are provided by an external package. The examples provided are a few suggestions specific to Arch Linux.

2.  Optionally automate calling the script to run at some regular interval.

Users of systemd may use the included user service that will run modprobed-db in store mode once every six hours, at boot, and on shutdown. Invoke it like so:

        systemctl --user enable modprobed-db
        systemctl --user start modprobed-db
Status of the service and of the timer can be queried like so:

        systemctl --user status modprobed-db
        systemctl --user list-timers
Cron users can add an entry their respective crontab:

        For example, once every six hours:
        0 */6 * * *     /usr/bin/modprobed-db store &> /dev/null

3.  When building a kernel, simply set the LSMOD variable to the database ($XDG_CONFIG_HOME/modprobed-db) in the make step:

        make LSMOD=$HOME/.config/modprobed.db localmodconfig

TIPS

•   As upstream kernel code changes, new modules become available or are removed. It is recommended to boot into a distro default kernel and invoke modprobed-db in store mode to capture any new modules that have become available on new major kernel releases.

•   When modprobed-db is run in recall mode, modprobe may throw a warning like, "modprobe: WARNING: Module foo not found in directory /lib/modules/kernel-name." To clean (refresh) the database, run modprobed-db in rebuild mode to clean the database.

SEE ALSO
modprobe(8)

BUGS
No known bugs.

AUTHOR
graysky (graysky AT archlinux DOT us)