Link to home
Start Free TrialLog in
Avatar of shang3000
shang3000

asked on

module microcode does not exist in proc/modules

Hi all,
I got Centos 5 3 day ago and when it starts it display this message when starting
Module microcode does not exist in proc/modules
Can you please tell me what does this means and how do I solve this problem?
best regards
HG
Avatar of DonConsolio
DonConsolio
Flag of Austria image

Depending on your CPU you may want to load microcode updates
(patches for errors in some CPUs).

If your CPU is not an INTEL 32Bit CPU (e.g. AMD) you won't need it.
Most users can simply ignore the message.

for more details read: http://kerneltrap.org/node/2678




Avatar of shang3000
shang3000

ASKER

hi DonConsolio,
thanks for reply
please correct me if I'm wrong
from this site
http://www.urbanmyth.org/microcode/
I 'll get the update utility and the update data and install it and that will help solve this error that appears at start up (is thats it ?or there is something I'm getting wrong)
please confirm or give me more details in that point and execuse my ignorance
best regards
HG
Usually you can ignore the error.
Most PC BIOS implementations already load the needed Microcode on boot.

Please post your CPU type (cat /proc/cpuinfo) and i'll try to figure out if you need any patches.
hi DonConsolio,
thanks for reply again
>>>Please post your CPU type (cat /proc/cpuinfo) and i'll try to figure out if you need any patches.

[xxx@localhost ~]$ cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 15
model           : 4
model name      : Intel(R) Pentium(R) 4 CPU 3.00GHz
stepping        : 1
cpu MHz         : 3014.634
cache size      : 1024 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 3
wp              : yes
flags           : fpu tsc msr pae mce cx8 apic mtrr mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe constant_tsc pni monitor ds_cpl cid xtpr
bogomips        : 7540.11

processor       : 1
vendor_id       : GenuineIntel
cpu family      : 15
model           : 4
model name      : Intel(R) Pentium(R) 4 CPU 3.00GHz
stepping        : 1
cpu MHz         : 3014.634
cache size      : 1024 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 3
wp              : yes
flags           : fpu tsc msr pae mce cx8 apic mtrr mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe constant_tsc up pni monitor ds_cpl cid xtpr
bogomips        : 7540.11

does it need a patch?
best regards
HG
Looks like this is small bug in the init scripts of centos.
It assumes it needs to load a module which is already in the kernel (compiled in)

for more details check:
http://forum.openvz.org/index.php?t=msg&goto=2055&

"Sure. The problem is we have microcode driver built into the kernel, not as a module. It looks like CentOS script which applies microcode update is a bit dumb, well, not expecting this situation and insists on loading the module (even if there is no need to do so).

I have filed a bug to openvz bugzilla: see bug #118. I think we have to fix it by compiling microcode driver as a module. Other way would be to file a bug to RHEL. First way is easier and it will work; second way is harder and longer but more right. We will decide soon. You can add yourself to Cc for that bug to track its progress.

In the meantime you can fix it on your system by commenting out that part of init script which bails out if module is not loaded, or modify the script so it will try to load module only if needed."


"The file in question is probably /etc/init.d/microcode_ctl.

I took a look at this script and found out those errors are harmless -- first error is printed by '/sbin/modprobe microcode' which tries to load module (but there is no need to do that as it's compiled into the kernel), and second error is caused by '/sbin/rmmod microcode' which tells there is no such module loaded.

Other than those two error messages, script is just fine, i.e. it actually applies microcode update, so you can certainly ignore those messages. If you do not like them you can comment out two lines in /etc/init.d/microcode_ctl -- the one with modprobe and the one with rmmod -- but that way microcode update will not be applied in the case you boot into non-openvz kernel.

Hope I made it clear enough. Still, the bug exists and we will see what to do."


hi DonConsolio,
thanks for reply and effort

>>>I have filed a bug to openvz bugzilla: see bug #118.
can you please tell me the site url to add my self to be notified when it's solved

>>>I think we have to fix it by compiling microcode driver as a module.

does the article in http://www.urbanmyth.org/microcode/ help in that or you still searching for the know how to do it?

I hope you are not angry of my ignorance and be patient with me
best regards
HG
does the article in http://www.urbanmyth.org/microcode/  have the needed patches to help in  compiling microcode driver as a module ?
there is no need to compile in a new driver


in linux kernel drivers can be
- compiled into the kernel (always available)
- loaded as a kernel module (available only when loaded)

the microcode driver is already active in your kernel (always available)
and cannot be loaded a second time (as a module)
Hi DonConsolio,
I hope I'm not bothering you and you are patient with me  as far as you could (you are the only expert answered me so I've no body else to ask)
I commented out the two lines as mentioned above

/sbin/modprobe microcode
/sbin/rmmod microcode

now when starting up it gives this error
applying cpu microcode update [failed]

and here is the result of cat /proc/cpuinfo
[hatem@localhost ~]$ cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 15
model           : 4
model name      : Intel(R) Pentium(R) 4 CPU 3.00GHz
stepping        : 1
cpu MHz         : 3014.598
cache size      : 1024 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 3
wp              : yes
flags           : fpu tsc msr pae mce cx8 apic mtrr mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe constant_tsc pni monitor ds_cpl cid xtpr
bogomips        : 7541.21

processor       : 1
vendor_id       : GenuineIntel
cpu family      : 15
model           : 4
model name      : Intel(R) Pentium(R) 4 CPU 3.00GHz
stepping        : 1
cpu MHz         : 3014.598
cache size      : 1024 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 3
wp              : yes
flags           : fpu tsc msr pae mce cx8 apic mtrr mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe constant_tsc up pni monitor ds_cpl cid xtpr
bogomips        : 7541.21

is it ok now or there is something else to do in that situation

please help me
best regards
HG


hi DonConsolio,
please guide me how to use the
microcode.dat file
and how to use the cpu identification tool since it's .exe (does it run on linux or have certain usage way)

please execuse my ignorance
and help me
best regards
HG
i don't have access to centos, but usually you copy the microcode.dat file to /etc/microcode.dat

the code to load it would be something like:

...
if grep -i intel /proc/cpuinfo >/dev/null 2>&1; then
            echo "Intel CPU found: updating microcode"
            # loding module if needed
            /sbin/modprobe -microcode
            # update from default location
            /usr/sbin/microcode_ctl -u
            # unloding module
            /sbin/modprobe -r -q microcode
        else
            echo "No Intel CPU found"
        fi
...
in which file do I put this code in
...
if grep -i intel /proc/cpuinfo >/dev/null 2>&1; then
            echo "Intel CPU found: updating microcode"
            # loding module if needed
            /sbin/modprobe -microcode
            # update from default location
            /usr/sbin/microcode_ctl -u
            # unloding module
            /sbin/modprobe -r -q microcode
        else
            echo "No Intel CPU found"
        fi
...
use a simple script in your home directory and manually start it
if that works find a suitable file in /etc/init.d/...

hi  DonConsolio,
there is something wrong  but I don't know what is it

[root@localhost ~]# /home/hatem/scripts/microcode
Intel CPU found: updating microcode
/sbin/modprobe: invalid option -- m
Usage: /sbin/modprobe [-v] [-V] [-C config-file] [-n] [-i] [-q] [-b] [-o <modname>] <modname> [parameters...]
/sbin/modprobe -r [-n] [-i] [-v] <modulename> ...
/sbin/modprobe -l -t <dirname> [ -a <modulename> ...]
/home/hatem/scripts/microcode: line 7: /usr/sbin/microcode_ctl: No such file or directory
[root@localhost ~]#

here is the code

#!/bin/bash
if grep -i intel /proc/cpuinfo >/dev/null 2>&1; then
        echo "Intel CPU found: updating microcode"
        # loding module if needed
        /sbin/modprobe -microcode
        # update from default location
        /usr/sbin/microcode_ctl -u
        # unloding module
        /sbin/modprobe -r -q microcode
else
        echo "No Intel CPU found"
fi


please help me
best regards
HG
error #1: the "-microcode" should be "microcode" - sorry for the typo

error #2: microcode_ctl might be located somewhere else (in /bin, /sbin etc.) on your linux
hi DonConsolio,
thanks again for reply

here is the code after changing the errors:

#!/bin/bash
if grep -i intel /proc/cpuinfo >/dev/null 2>&1; then
        echo "Intel CPU found: updating microcode"
        # loding module if needed
        /sbin/modprobe microcode
        # update from default location
        /sbin/microcode_ctl -u
        # unloding module
        /sbin/modprobe -r -q microcode
else
        echo "No Intel CPU found"
fi

but there is a new error message

[hatem@localhost ~]$ locate microcode_ctl
/etc/rc.d/init.d/microcode_ctl
/etc/rc.d/init.d/microcode_ctl~
/etc/rc.d/rc0.d/K99microcode_ctl
/etc/rc.d/rc1.d/K99microcode_ctl
/etc/rc.d/rc2.d/S00microcode_ctl
/etc/rc.d/rc3.d/S00microcode_ctl
/etc/rc.d/rc4.d/S00microcode_ctl
/etc/rc.d/rc5.d/S00microcode_ctl
/etc/rc.d/rc6.d/K99microcode_ctl
/sbin/microcode_ctl
/usr/share/man/man8/microcode_ctl.8.gz
[hatem@localhost ~]$ su -
Password:
[root@localhost ~]# /home/hatem/scripts/microcode
Intel CPU found: updating microcode
FATAL: Module microcode not found.
/sbin/microcode_ctl: writing microcode (length: 265216)
/sbin/microcode_ctl: error writing to '/dev/cpu/microcode' errno=22 (Invalid argument)
/sbin/microcode_ctl: there may be messages from the driver in your system log.


can you please guide me how to fix that
best regards
HG
ASKER CERTIFIED SOLUTION
Avatar of DonConsolio
DonConsolio
Flag of Austria image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
[root@localhost ~]# /etc/rc.d/init.d/microcode_ctl start
Applying Intel CPU microcode update:                       [FAILED]
[root@localhost ~]#