NVME-FW-DOWNLOAD(1)
πΎ nvme-fw-download β like, the NVMe Manual, but make it make sense β¨
okay bestie, listen up π this is a page from the NVMe Manual and it's all about nvme-fw-download, aka how you shove a firmware image at your controller. it's giving "glow-up for your SSD" energy and honestly? kind of iconic. let's get into it π
πΈ NAME πΈ
nvme-fw-download β download all of a firmware image, or just a lil portion of it, to an NVMe thing. π
π¦ SYNOPSIS π¦
nvme [<global-options>] fw download <device>
[--fw=<firmware-file> | -f <firmware-file>]
[--xfer=<transfer-size> | -x <transfer-size>]
[--offset=<offset> | -O <offset>]
[--stream]
no cap, that's the whole vibe up there β¬οΈ
π DESCRIPTION π
so the Firmware Image Download command is literally the thing that downloads all of a firmware image (or just a piece of it) for a future update to the controller. key word: future. it's not doing the update now, it's just getting the goods in place. π§³
and the bestie behavior here? this command can be submitted while other commands on the Admin Submission Queue or I/O Submission Queues are still outstanding. it does not care, it's a multitasker. it just copies the new firmware image β in whole or in part β to the controller. main character energy fr fr. β
your firmware image can be built out of multiple pieces, each one downloaded with its own separate Firmware Image Download command. every single one of these commands includes a Dword Offset and a Number of Dwords that specify a Dword range. and here's the rule, no exceptions: host software shall make sure firmware pieces do not have Dword ranges that overlap. π¨ overlapping = bad vibes. that said, firmware portions may be submitted out of order to the controller, so you're not locked into a strict sequence. π
okay and super important: the new firmware image is not applied as part of the Firmware Image Download command. nope. it gets applied after a reset, where the image to apply and the firmware slot it should be committed to is specified with the Firmware Commit command β that's nvme fw-commit <args>. so like, download now, commit later, reset somewhere in there. iykyk π«
note note note π«Ά nvme-cli has to allocate a contiguous (linear) memory buffer and map the firmware binary into it. to do that, nvme-cli first tries to allocate the buffer using huge TLB pages. if allocating with huge pages fails, it falls back toposix_memalign()combined withmadvise(). and if the kernel rejects the huge page advice, nvme-cli keeps the aligned buffer and lets the I/O path attempt to map it. so it always has a backup plan, she's resilient. πͺ
the optional --stream mode avoids allocating a buffer for the complete firmware image entirely. instead it reads and downloads one transfer-sized portion at a time. lowkey the memory-efficient queen. π
and if you want to increase the likelihood of success (manifesting β¨), you may want to pre-allocate a number of huge pages before you start the firmware download:
echo 20 > /proc/sys/vm/nr_hugepages
for more details, refer to: https://www.kernel.org/doc/Documentation/vm/hugetlbpage.txt
π¨ deprecation warning, bestie, pay attention π¨ the barenvme fw-downloadform (without a space) still works as a deprecated alias and will be removed in a future major version. new scripts should usenvme fw downloadinstead. okay so like, the old way still slays but it's on its way out β write the new one. periodt. π
β¨ OPTIONS β¨
-f <firmware-file>,--fw=<firmware-file>β required argument, no skips allowed. this specifies the path to the device's firmware file on your system that will be read by the program and sent to the device. like, the actual file, the whole point of the operation. π-x <transfer-size>,--xfer=<transfer-size>β specifies the size to split each transfer. super useful if the device has a max transfer size requirement for firmware. it defaults to4k. π-O <offset>,--offset=<offset>β specifies the starting offset in dwords. this is really only useful if your firmware is split across multiple files; otherwise the offset starts at zero and automatically adjusts based on the xfer size you gave. so like, only touch this if you know why you're touching it. π--streamβ read and download one transfer-sized portion of the firmware image at a time instead of mapping the complete image into memory. this avoids the huge page requirement and limits memory use to the transfer size. obsessed. π¦
π GLOBAL OPTIONS π
these options are defined at the top-level nvme command and are available to this subcommand too. so they're the big-sister options, but they still got you. π«Ά
--dry-runβ print the command that would be executed, but do not actually execute it. dress rehearsal only. π--no-ioctl-probingβ disable probing for 64-bit IOCTL support. π§--no-retriesβ disable retry logic on transient errors. one shot, one opportunity. π-o <fmt>,--output-format=<fmt>β set the reporting format tonormal,tabular,'json, orbinary. only one output format may be used at a time, pick a lane bestie. πΈ--output-format-version=<version>β select the output format version. version1uses the original field naming, while version2(the default) provides more consistent and script-friendly field names. other versions are rejected. π«--quietβ suppress informational messages. errors are still reported, and--quietcancels any--verbosefor the library log level. she's quiet but she's still honest. π€«--set-options=<key=value>[,<key=value>...]β set libnvme library options for this invocation. supported keys areforce-4k,mi-probe-enabled,test-base-dirandtest-sysfs-dir. ποΈ--timeout=<ms>β set the timeout for the command in milliseconds.infiniteor-1waits without a time limit (0xffffffff). no clock, no stress. β³-v,--verboseβ increase the level of detail in the output. may be specified multiple times to further increase verbosity. the more the merrier honestly. π₯
these options can also be set as machine-wide defaults in nvme-cli.conf(5). a command-line flag always overrides the file. always. π
π EXAMPLES π
- transfer a firmware size 128KiB at a time:
# nvme fw download /dev/nvme0 --fw=/path/to/nvme.fw --xfer=0x20000
- read and download a firmware image one transfer-sized portion at a time:
# nvme fw download /dev/nvme0 --fw=/path/to/nvme.fw --stream
π NVME π
part of the nvme-user suite. family. π
and that's the page, bestie π go forth and flash responsibly β this was NVMe material dated 10/30/2026, signing off with so much love π«Άβ¨π
π¦ where this page comes from
- arch rolling: nvme-cli 3.2-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms