How can I create a backup of all the driver modules (especially those that are not part of the original kernel yet) from an installation of GNU/Linux OS?

The original source of the proprietary drivers has gone offline and I need to do a clean install of another Gnu/Linux OS.


Kernel modules are usually located in /lib/modules. You can create a backup by executing tar -c -f backup.tar /lib/modules/$(uname -r). This will create(-c) a backup of the modules of your current kernel(uname -a) in the file(-f) backup.tar. Note that kernel modules for one kernel version do not necessarily work with another kernel version.

A few modules come with firmware typically located in /lib/firmware. You can find out with modinfo name_of_module. You should see something like "firmware: xyz-123.ucode".

If you need to pass any options to the modules in /etc/modprobe.d, you have to backup that file as well. You can find out with grep -r name_of_module /etc/modprobe.d.

| improve this answer | |
  • I was wondering if backing up the modules is all that's needed. Is there nothing else, eg. editing a few settings etc, that's needed? – rinfinity Dec 24 '15 at 17:16
  • That's all you need if you don't need to pass any options to the module. Updated answer with info about that. – tastytea Dec 25 '15 at 2:47
  • 1
    a few modules have firmware typically in /lib/firmware – cybernard Dec 25 '15 at 3:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.