Gentoo Archives: gentoo-user

From: Peter Humphrey <peter@××××××××××××.uk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Listing kernel modules
Date: Sat, 02 May 2020 16:49:46
Message-Id: 2031695.irdbgypaU6@peak
In Reply to: Re: [gentoo-user] Listing kernel modules by Consus
1 On Saturday, 2 May 2020 14:32:22 BST Consus wrote:
2 > On Sat, May 02, 2020 at 04:29:38PM +0300, Consus wrote:
3 > > On Sat, May 02, 2020 at 02:19:18PM +0100, Peter Humphrey wrote:
4 > > > Afternoon all,
5 > > >
6 > > > Is there a straightforward way of listing kernel modules that exist
7 > > > but haven't been loaded?
8 > >
9 > > This will do I guess:
10 > > # lsmod | awk '{print $1}' > inserted
11 > > # find /lib/modules/$(uname -r) -name '*.ko' -printf '%f\n' | sed
12 > > 's/\.ko$//' > present # cat inserted present | sort -u
13 >
14 > Wait, no, replace the last line with:
15 >
16 > # cat inserted present | sort | uniq -u
17
18 Very good - thanks. Now I have a 183-line list of module names to go through.
19 :( And of course, the module names differ from the corresponding config
20 options.
21
22 Still, it does give me some useful pointers to bunches of modules I specified
23 to find out which one I needed.
24
25 --
26 Regards,
27 Peter.