Mastering iucode-tool on Ubuntu: Intel CPU Microcode Guide

Overview

Managing Intel processor firmware updates on Ubuntu often comes down to working with iucode-tool, a specialized utility built to inspect microcode bundles, narrow them down by hardware criteria, and package them for initramfs. Through hands-on examples, this walkthrough covers everything from setting up the required packages and reading microcode metadata to isolating specific CPU signatures and building early-loading microcode archives.

1. Installing Packages and Exploring the CLI Basics

Before diving into microcode inspection, your Ubuntu environment needs the utility itself, Intel’s firmware collection, and the cpio archiver. Refresh your package index silently and install all three components in a single pass with apt-get update -qq && apt-get install -y iucode-tool intel-microcode cpio.

Installing iucode-tool, intel-microcode, and cpio on Ubuntu

Once the installation finishes, verify that the binary is ready and check which release you are running by invoking iucode_tool --version. This quick sanity check confirms the executable is in your PATH and establishes the exact tool version on your host.

Checking the installed iucode_tool version

To preview the command syntax and core flags without flooding your terminal, pipe the help text to head using iucode_tool --help | head -n 25. Notice an important naming quirk: the APT package uses a hyphen (iucode-tool), whereas the actual binary you run on the command line uses an underscore (iucode_tool).
⚙️ [Key Flags & Options]

-l, --list : Displays processor signatures and revision numbers for the microcode entries that pass your filters.
-L, --list-all : Prints every microcode record found before any filtering rules are applied.
-s, --scan-system : Probes the local machine’s CPU and automatically selects only compatible microcode updates.
-w, --write-to : Exports the filtered microcode payload to a target file or directory.
--write-earlyfw : Packages selected microcode into a cpio archive formatted for early kernel loading at boot time.
-v, --verbose : Turns on detailed diagnostic output while processing files.
-q, --quiet : Suppresses non-essential status messages for cleaner execution.

Viewing the top 25 lines of iucode_tool help output

2. Inspecting Installed Firmware and Decoding Output Fields

Ubuntu stores Intel’s microcode binaries under /lib/firmware/intel-ucode. Running ls -la /lib/firmware/intel-ucode | head -n 15 gives you a quick look at the top of that directory, where individual binary bundles are organized by processor model.

Listing Intel microcode files in /lib/firmware/intel-ucode

To parse the contents of those firmware bundles into human-readable metadata, run iucode_tool -l /lib/firmware/intel-ucode | head -n 30. Passing -l tells the utility to enumerate the matched microcode records. In the resulting table, sig identifies the target CPU signature, pf_mask indicates the supported processor flags mask, rev shows the patch revision number, and the accompanying date and size columns reveal when each update was released and how much space it occupies.

Inspecting microcode signatures, revisions, and metadata with iucode_tool -l

3. Filtering Microcode by CPU Signature and Release Date

Scanning the entire firmware directory can produce overwhelming output, so you will often want to target a single processor family. Executing iucode_tool -v -s 0x000806e9 -l /lib/firmware/intel-ucode isolates only the microcode matching the hexadecimal CPU signature 0x000806e9 inside /lib/firmware/intel-ucode. Supplying -s narrows the selection to that specific hardware identifier, while -v surfaces step-by-step details about how the files are parsed and filtered. If no matching entry exists, the command simply exits with an empty list.

Filtering microcode for CPU signature 0x000806e9 with verbose output

You can layer additional constraints onto your query—such as filtering out older patches by release date. Running iucode_tool -s 0x000806e9 --date-after=2020-01-01 -l /lib/firmware/intel-ucode combines the signature filter with --date-after=2020-01-01, discarding any revision issued on or before 2020-01-01. Only updates satisfying both rules appear in the -l output; if none qualify, nothing is printed.

Filtering microcode by CPU signature and release date after 2020-01-01

4. Building and Verifying an Early Initramfs CPIO Archive

Before generating a custom early-loading microcode archive, create a dedicated workspace directory with mkdir -p ~/ucode_lab so your test artifacts stay neatly separated from system paths.

Creating the ~/ucode_lab working directory

Next, extract the microcode for signature 0x000806e9 and wrap it into a boot-ready archive using iucode_tool -s 0x000806e9 --write-earlyfw=~/ucode_lab/early_ucode.cpio /lib/firmware/intel-ucode. The --write-earlyfw flag handles the packaging automatically, producing a cpio file structured specifically so the Linux kernel can load the firmware during the earliest phase of startup.

Generating early_ucode.cpio for CPU signature 0x000806e9

Confirm that the archive was written properly and inspect its size in a readable format by running ls -lh ~/ucode_lab/early_ucode.cpio. Seeing early_ucode.cpio listed with its permissions, ownership, and byte count verifies that the export step succeeded.

Checking permissions and file size of early_ucode.cpio

Finally, validate the internal directory layout of the archive without unpacking it to disk by running cpio -it < ~/ucode_lab/early_ucode.cpio. Here, -i puts cpio into read-input mode while -t prints a table of contents, letting you safely verify that the microcode binary sits at the exact internal path the kernel expects during boot.

Listing the internal contents of early_ucode.cpio with cpio -it

That wraps up the core workflow for inspecting, filtering, and packaging Intel CPU microcode with iucode-tool on Ubuntu. Keeping these commands handy makes it straightforward to audit firmware revisions and prepare custom early-loading archives whenever you maintain or troubleshoot Linux systems.