Linux: Install and Update Intel/AMD CPU Microcode
This post will guide you how to install the AMD or Intel Microcode package in Linux. How do I update the CPU Microcode in Linux system.
What is Microcode?
Microcode could be assumed as firmware of the CPU, which generally adds more functionality to the processor and patches hardware level bugs.
Install Intel CPU Microcode
For CentOS/RHEL Linux:
Type the following command:
# yum install microcode_ctl
Outputs:
[root@devops ~]# yum install microcode_ctl Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.cn99.com * extras: mirrors.cn99.com * updates: mirrors.cn99.com Resolving Dependencies --> Running transaction check ---> Package microcode_ctl.x86_64 2:2.1-29.16.el7_5 will be installed --> Finished Dependency Resolution Dependencies Resolved ======================================================================================================== Package Arch Version Repository Size ======================================================================================================== Installing: microcode_ctl x86_64 2:2.1-29.16.el7_5 updates 1.4 M Transaction Summary ======================================================================================================== Install 1 Package Total download size: 1.4 M Installed size: 1.7 M Is this ok [y/d/N]: y Downloading packages: microcode_ctl-2.1-29.16.el7_5.x86_64.rpm | 1.4 MB 00:00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction Warning: RPMDB altered outside of yum. Installing : 2:microcode_ctl-2.1-29.16.el7_5.x86_64 1/1 Verifying : 2:microcode_ctl-2.1-29.16.el7_5.x86_64 1/1 Installed: microcode_ctl.x86_64 2:2.1-29.16.el7_5 Complete!
For Ubuntu/Debian Linux:
Type:
$ sudo apt-get install intel-microcode iucode-tool
Install AMD CPU Microcode
If you want to install AMD microcode firmware on your Linux system, type:
For CentOS/RHEL Linux:
Type:
# yum install microcode_ctl
For Ubuntu/Debian Linux:
Type:
sudo apt-get install amd64-ucode
Then you need to reboot the system and check the microcode status with the dmesg command.
Type:
# dmesg | grep microcode
Outputs:
[root@devops ~]# dmesg | grep microcode [ 0.182177] microcode: CPU0 sig=0x306c3, pf=0x2, revision=0x19 [ 0.182187] microcode: Microcode Update Driver: v2.00 <tigran@aivazian.fsnet.co.uk>, Peter Oruba [ 835.278981] microcode: CPU0 sig=0x306c3, pf=0x2, revision=0x19 [ 835.278995] microcode: CPU0 update to revision 0x25 failed [ 835.302031] This updated microcode supersedes microcode provided by Red Hat with Historically, Red Hat has provided updated microcode, developed by our temporarily suspended this practice while microcode stabilized. Red Hat is once again providing an updated Intel microcode package (microcode_ctl) and AMD microcode package (linux-firmware) to customers continue to update these microcode packages as necessary. Please Intel and AMD microcode package versions.