Gentoo Archives: gentoo-user

From: "András Csányi" <sayusi.ando@××××××.hu>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] list of kernel modules
Date: Fri, 06 Apr 2012 15:03:45
Message-Id: CALzub=rhT=0Dd=Rvc66YvCLHFWD+GjJmL6vUo6rqvMqRn-ONJw@mail.gmail.com
In Reply to: Re: [gentoo-user] list of kernel modules by Joshua Murphy
1 On 6 April 2012 16:43, Joshua Murphy <poisonbl@×××××.com> wrote:
2 > On Fri, Apr 6, 2012 at 10:02 AM, András Csányi <sayusi.ando@××××××.hu> wrote:
3 >> Dear All,
4 >>
5 >> I'm a little bit confused regarding modprobe command. As far as I
6 >> remember I used the command below to list all of kernel modules
7 >> independently it's loaded or not.
8 >> modprobe -l or modprobe -L
9 >>
10 >> But now I can see that there is no -l or -L for this command. When
11 >> have changed this command or my memories are failed? On the other
12 >> hand, I would like to ask that how can I list all of kernel modules?
13 >>
14 >> Thanks in advance!
15 >>
16 >> András
17 >>
18 >> --
19 >> --  Csanyi Andras (Sayusi Ando)  -- http://sayusi.hu --
20 >> http://facebook.com/andras.csanyi
21 >> --  ""Trust in God and keep your gunpowder dry!" - Cromwell
22 >
23 > From 'man modprobe' here (module-init-tools version 3.16):
24 >    -l --list
25 >    List all modules matching the given wildcard (or "*" if no
26 > wildcard is given).  This option is provided for backwards
27 > compatibility and  may go away in future: see find(1) and basename(1)
28 > for a more flexible alternative.
29 >
30 >
31 > And, found this handy little 'replacement' of sorts (in .bashrc or
32 > such, not tested by me):
33 >
34 > fkm() {
35 >  local kver=$(uname -r) arg=${1//[-_]/[-_]}
36 >  find "/lib/modules/$kver" -iname "*$arg*.ko*" \
37 >    -exec bash -c 'mods=("${@##*/}"); printf "%s\n" "${mods[@]%.ko*}"' _ {} +
38 >
39 >  if [[ ! -e /lib/modules/$kver/kernel ]]; then
40 >    echo "reboot!" >&2
41 >  fi
42 > }
43 >
44 > (source: https://bbs.archlinux.org/viewtopic.php?id=134393 )
45
46 Thanks Guys!
47
48 The situation at my machine is the next and it looks like I have to
49 use one of your handy tools. :)
50
51 a-home log # eix -s module-init-tools
52 * sys-apps/module-init-tools
53 Available versions: 3.5!t (~)3.6-r1!t (~)3.8 (~)3.9 (~)3.10
54 (~)3.11 (~)3.11.1 (~)3.12 3.12-r1!t (~)3.13!t (~)3.16!t 3.16-r1!t
55 {{old-linux static}}
56 Homepage: http://modules.wiki.kernel.org/
57 Description: tools for managing linux kernel modules
58
59 sa-home log # emerge -avt module-init-tools
60
61 These are the packages that would be merged, in reverse order:
62
63 Calculating dependencies... done!
64 [ebuild N ] sys-apps/module-init-tools-3.16-r1 USE="-static" 233 kB
65 [blocks B ] sys-apps/module-init-tools
66 ("sys-apps/module-init-tools" is blocking sys-apps/kmod-7)
67 [blocks B ] sys-apps/kmod ("sys-apps/kmod" is blocking
68 sys-apps/module-init-tools-3.16-r1)
69
70 Total: 1 package (1 new), Size of downloads: 233 kB
71 Conflict: 2 blocks (2 unsatisfied)
72
73 * Error: The above package list contains packages which cannot be
74 * installed at the same time on the same system.
75
76 (sys-apps/kmod-7::gentoo, installed) pulled in by
77 >=sys-apps/kmod-5 required by (sys-fs/udev-182-r3::gentoo, installed)
78 sys-apps/kmod required by (virtual/modutils-0::gentoo, installed)
79
80 (sys-apps/module-init-tools-3.16-r1::gentoo, ebuild scheduled for
81 merge) pulled in by
82 module-init-tools
83
84
85 For more information about Blocked Packages, please refer to the following
86 section of the Gentoo Linux x86 Handbook (architecture is irrelevant):
87
88 http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?full=1#blocked
89
90 sa-home log #
91
92 --
93 --  Csanyi Andras (Sayusi Ando)  -- http://sayusi.hu --
94 http://facebook.com/andras.csanyi
95 --  ""Trust in God and keep your gunpowder dry!" - Cromwell