Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install and update Intel microcode firmware on Linux

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces "how to install and update Intel microcode firmware on Linux". In daily operation, I believe many people have doubts about how to install and update Intel microcode firmware on Linux. Xiaobian consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts of "how to install and update Intel microcode firmware on Linux". Next, please follow the editor to study!

How to view the current microcode status

Run the following command as the root user:

# dmesg | grep microcode

The output is as follows:

Verify microcode update on a CentOS RHEL Fedora Ubuntu Debian Linux

Please note that there is no microcode update available for your CPU here. If this is the case, its output might look like this:

[0.952699] microcode: sig=0x306a9, pf=0x10, revision=0x1c [0.952773] microcode: Microcode Update Driver: v2.2. How to use package Manager to install Microcode firmware updates on Linux

For Linux systems running on CPU based on x86/amd64 architecture, Linux comes with tools to change or deploy microcode firmware. The procedure for installing microcode firmware for AMD or Intel on Linux is as follows:

Hongmeng official Strategic Cooperation to build HarmonyOS Technology Community

Open the terminal application

Debian/Ubuntu Linux user push input: sudo apt install intel-microcode

CentOS/RHEL Linux user input: sudo yum install microcode_ctl

For popular Linux distributions, the name of this package is generally as follows:

Microcode_ctl and linux-firmware-- CentOS/RHEL microcode update package

Intel-microcode-microcode update package for Intel CPU for Debian/Ubuntu and derivative distributions

Amd64-microcode-microcode firmware for AMD CPU for Debian/Ubuntu and derivative distributions

Linux-firmware-microcode firmware for AMD CPU's Arch Linux distribution (you don't have to do anything, it's installed by default)

Intel-ucode-Arch Linux distribution microcode firmware for Intel CPU

Microcode_ctl, linux-firmware and ucode-intel-Suse/OpenSUSE Linux microcode update package

Warning: in some cases, microcode updates may cause boot problems, such as when the server is suspended or automatically reset during boot. The following steps have been run on my machine, and I am an experienced system administrator. I do not bear any responsibility for any hardware failure caused by it. Please fully evaluate the operational risk before making a firmware update!

Example

On Debian/Ubuntu Linux systems that use Intel CPU, enter the following apt command / apt-get command:

$sudo apt-get install intel-microcode

The sample output is as follows:

How to install Intel microcode firmware Linux

You must restart the server to activate the microcode update:

$sudo reboot

Check the microcode status after reboot:

# dmesg | grep 'microcode'

The sample output is as follows:

[0.000000] microcode: microcode updated early to revision 0x1c, date = 2015-02-26 [1.604672] microcode: sig=0x306a9, pf=0x10, revision=0x1c [1.604976] microcode: Microcode Update Driver: v2.01, Peter Oruba

If you are using a RHEL/CentOS system, use the yum command to try to install or update the following two packages:

$sudo yum install linux-firmware microcode_ctl$ sudo reboot$ sudo dmesg | grep 'microcode' how to update / install microcode downloaded from the Intel website

Only if your CPU manufacturer recommends this, can you use the following methods to update / install microcode, except that you should use the above method to update. Most Linux distributions can maintain and update microcode through the package manager. The method of using the package manager is tested and is the safest way for most users.

How to install Intel processor microcode blocks for Linux (released in 20180108)

First, get the microcode firmware through AMD or Intel website. In this example, I have a file called ~ / Downloads/microcode-20180108.tgz (don't forget to verify its checksum), which is used to prevent meltdown/Spectre bug. First use the tar command to extract it:

$mkdir firmware$ cd firmware$ tar xvf ~ / Downloads/microcode-20180108.tgz$ ls-l

The sample output is as follows:

Drwxr-xr-x 2 vivek vivek 4096 Jan 8 12:41 intel-ucode-rw-r--r-- 1 vivek vivek 4847056 Jan 8 12:39 microcode.dat-rw-r--r-- 1 vivek vivek 1907 Jan 907: 03 releasenote

I only tested the following on CentOS 7.x/RHEL, 7.x/Debian 9.x, and Ubuntu 17.10. If you can't find the / sys/devices/system/cpu/microcode/reload file, older kernels with older distributions may not be able to use this method. See the discussion below. Please note that some customers have encountered a system restart after applying the firmware update. Especially for systems running Intel Broadwell and Haswell CPU for clients and data center servers. Do not apply version 20180108 on Intel Broadwell and Haswell CPU. Use the package manager approach whenever possible.

Check to make sure there is / sys/devices/system/cpu/microcode/reload:

$ls-l / sys/devices/system/cpu/microcode/reload

You must use the cp command to copy all the files in the intel-ucode directory to / lib/firmware/intel-ucode/:

$sudo cp-v intel-ucode/* / lib/firmware/intel-ucode/

You just need to copy the entire intel-ucode directory to the / lib/firmware/ directory. Then write 1 in the reload interface to reload the microcode file:

# echo 1 > / sys/devices/system/cpu/microcode/reload

Update the existing initramfs so that it can be loaded through the kernel the next time it starts:

$sudo update-initramfs-u $sudo reboot

After reboot, verify whether the microcode has been updated by the following command:

# dmesg | grep microcode at this point, the study on "how to install and update Intel microcode firmware on Linux" is over. I hope I can solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report