UC-TOOL(1)

NAME
uc-tool - generate CPU microcode CPIO images and manage initrd

SYNOPSIS
uc-tool [options]

DESCRIPTION
Generate microcode early CPIO images from system firmware into -d <dir>. Optionally update an existing initrd in-place with the new images (-i).

OPTIONS

-u  --ucode=<list>
    Vendors to build: amd, intel, or amd,intel [default: amd,intel]

-d  --directory=<dir>
    Directory for .img files (generate/extract output) or sections to repack (repack input)

-D  --default
    Set directory and initrd from current boot mode:
    live:
        initrd
            /live/boot-dev/antiX/initrd.gz
        dir ./initrd.gz.D
    installed:
        initrd
            /boot/initrd.img-<kver>
        dir ./initrd.img-<kver>.D
Explicit -d or -i always overrides -D.

--amd-dir=<dir>
    AMD firmware source [default: /lib/firmware/amd-ucode]

--intel-dir=<dir>
    Intel firmware source [default: /lib/firmware/intel-ucode]

-F  --firmware=<path>
    Firmware base: directory (auto-sets amd-ucode/ and intel-ucode/ sub-dirs) or squashfs image (auto-mounted)

-i  --initrd=<file>
    Update this initrd in-place: strip old ucode CPIOs, prepend new ones, refresh <initrd>.md5 if present, run e4defrag if on ext4

-k  --keep
    Keep generated .img files when using a temp dir (only meaningful when -i is given without -d)

-S  --strip
    Strip ucode CPIOs from -i <initrd> without adding new ones; other preamble sections are kept intact

-H  --has-ucode
    Check if -i <initrd> contains ucode CPIOs; exits 0=found, 1=none (no writes)

-x, --extract[=ucode|all|unpack]
    Extract initrd sections to -d dir (must be empty or new).
    ucode
        ucode CPIOs only (default)
    all all sections as raw files
    unpack
        all sections + unpack each into name.D/

-l, --list[=ucode|all|unpack]
    List initrd sections (no files written).
    ucode
        ucode CPIOs only — vendor, size, files inside (default)
    all all sections — name, size, compression type
    unpack
        all sections + list files inside each

--repack=dir
    Repack sections from dir back into -i initrd; uses name.D/ if it exists, else the raw file

-h  --help
    Show this usage

-n  --no-color
    Suppress ANSI color codes in output (useful in scripts or log files)

-q  --quiet
    Suppress all progress output; only fatal errors are shown

-s  --silent
    Only show error messages

-V  --verbose
    Show commands as they run

-v  --version
    Show version and exit

EXAMPLES

uc-tool -i /live/boot-dev/antiX/initrd.gz
    Update the live USB initrd in-place with AMD and Intel microcode from the running system's firmware.

uc-tool -F /live/linux/lib/firmware -i /live/boot-dev/antiX/initrd.gz
    Same, but take the firmware from the live squashfs image rather than the running system (useful when the squashfs carries a different firmware set).

uc-tool -l all -i /live/boot-dev/antiX/initrd.gz
    List all sections of the live USB initrd — names, sizes, and compression. No files are written.

uc-tool -H -i /live/boot-dev/antiX/initrd.gz
    Check whether the initrd already contains microcode CPIOs. Exits 0 if found, 1 if not. No files are written.

uc-tool -S -i /live/boot-dev/antiX/initrd.gz
    Strip any existing microcode CPIOs from the initrd without adding new ones.

AUTHORS
MX Linux development team