Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

bios-capsule-install

БесплатноЗапускает вложенные скриптыНе проверен

Install a vendor UEFI capsule from Linux via fwupd. Use when a vendor is not on LVFS and its BIOS update ships only as a Windows package or bare capsule.

laurigatesот laurigates★ 61 звезда на GitHub

Об этом скилле

BIOS Capsule Install (Linux, fwupd)

fwupd can apply any UEFI capsule the firmware advertises through its ESRT (EFI System Resource Table), not only packages from the LVFS. A vendor that ships BIOS updates only as a Windows installer usually wraps a capsule image inside it; packaged into a fwupd cabinet, it installs from Linux.

Prior art: derjohn's gist for the Huawei MateBook X Pro 2018/2019, which this skill generalises.

Verified once, end to end: a Huawei MateBook X Pro 2020 went from BIOS 1.07 to 1.26 through this route on 2026-11-16 (fwupd 1.9.32, Secure Boot off, systemd-boot). For any other model, treat the flash as unverified until a result is recorded in REFERENCE.md; the firmware there may encode versions differently or behave differently on reboot.

When to Use This Skill

Use this skill when... Use something else when...
You have a vendor capsule image and want to install it from Linux The vendor is on the LVFS: fwupdmgr update
Checking whether a machine can take a capsule update at all Finding the firmware file first: bios-plugin:bios-firmware-fetch

Step 1: Check the machine

bash "${CLAUDE_SKILL_DIR}/scripts/capsule-preflight.sh" --min-battery 30

It reads, and changes nothing: DMI model and BIOS version, UEFI and Secure Boot state, the ESRT system-firmware entry (class GUID, current and lowest supported version), whether fwupd lists System Firmware as Updatable and with which Problems, whether the packager and gcab exist, the OnlyTrusted setting, charger and battery, ESP free space, the boot order, and whether the removable-media fallback loader \EFI\BOOT\BOOTX64.EFI exists. Some reads need root; it tries sudo -n and reports what it could not read.

Result Meaning
no_esrt The firmware offers no capsule interface; this route is closed
not_updatable fwupd will not update the device; read its Problems
FWUPD_PROBLEMS=Device requires AC power… Only the charger is missing; plug it in before installing
secure_boot_on fwupd's EFI helper must be the signed build
no_fallback_loader Do not flash: if the update wipes the boot entries, nothing boots the OS. Install a fallback loader first

Step 2: Work out the target version number

fwupd compares the cabinet's release version with the ESRT fw_version integer, so the cab should carry the integer the firmware will report after the update. Read the current one from the preflight (ESRT_FW_VERSION, ESRT_VERSION_HEX).

On the Huawei Insyde firmware this was verified on, BIOS x.yy is stored with the decimal digits written as hex digits: 1.07 reads 65543 (0x00010007) and 1.26 reads 65574 (0x00010026). Compute the target the same way:

printf '%d\n' $(( (0x1 << 16) | 0x26 ))   # BIOS 1.26 -> 65574

That encoding is an observation on one vendor's firmware, not a standard. Before relying on it, check that the preflight's ESRT_VERSION_AS_HEX_DIGITS equals BIOS_VERSION for the current version. A single sample cannot tell the encodings apart when every digit is below ten (1.07 fits both 0x0007 and decimal 7), so a version with an 8 or 9 in the minor, or a second sample, is what confirms it.

A wrong target does not stop the flash: the firmware applies its own image and reports its own version. It does make fwupd's post-reboot comparison fail.

Step 3: Build the cabinet on the target machine

Needs fwupd's /usr/share/fwupd/firmware_packager.py (fwupd 1.9 names it that, not firmware-packager) and gcab.

bash "${CLAUDE_SKILL_DIR}/scripts/build-capsule-cab.sh" \
  --bin UEFI_FW.bin --sha256 <image sha256> \
  --guid <ESRT_FW_CLASS> --version <target integer> \
  --name "<Model> BIOS" --vendor <Vendor> --out firmware.cab
sudo fwupdtool get-details firmware.cab

get-details must show the cab attached to the System Firmware device with New version equal to the target. If it lists no matching device, the GUID is wrong; stop.

Step 4: Install, by the person at the machine

Hand over scripts/install-capsule.sh for the user to run in their own terminal. It asks for confirmation and the sudo password, so it does not run from an agent session:

./install-capsule.sh --cab firmware.cab --sha256 <cab sha256> --model <DMI product_name> \
  --guid <ESRT_FW_CLASS> --target-version <target integer> --min-battery 30

What it does, in order:

  1. Refuses unless the DMI model matches, the charger is connected, the battery is at or above the minimum, the cab checksum matches, and the current ESRT version is below the target.
  2. Refuses unless \EFI\BOOT\BOOTX64.EFI exists on the ESP, and saves efibootmgr -v to ~/efibootmgr-before-update-<timestamp>.txt.
  3. Asks the user to type flash.
  4. Turns fwupd's OnlyTrusted off, because a locally built cab is not signed by the LVFS,
Полный SKILL.md на GitHub

Установить bios-capsule-install в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Bash(bash ${CLAUDE_SKILL_DIR}/scripts/capsule-preflight.sh *)
Bash(bash ${CLAUDE_SKILL_DIR}/scripts/build-capsule-cab.sh *)
Bash(fwupdmgr get-devices *)
Bash(fwupdmgr get-history *)
Bash(fwupdtool get-details *)
Bash(sudo fwupdtool get-details *)
Bash(gcab -l *)
Bash(sha256sum *)
Read
Grep
Glob
AskUserQuestion

Вложенные файлы

REFERENCE.mdscripts/build-capsule-cab.shscripts/capsule-preflight.shscripts/install-capsule.sh

FAQ

Что делает скилл bios-capsule-install?

Install a vendor UEFI capsule from Linux via fwupd. Use when a vendor is not on LVFS and its BIOS update ships only as a Windows package or bare capsule.

Как установить скилл bios-capsule-install?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл bios-capsule-install запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить bios-capsule-install с