← 返回命令列表

Linux command

bmaptool 命令

安全

权限或系统影响较大,执行前请核对目标。

常用示例

Copy an image to a device

sudo bmaptool copy [image.img] [/dev/sdX]

Copy a compressed image

sudo bmaptool copy [image.img.xz] [/dev/sdX]

Copy with explicit bmap file

sudo bmaptool copy --bmap [image.bmap] [image.img] [/dev/sdX]

Copy without bmap

sudo bmaptool copy --nobmap [image.img] [/dev/sdX]

Create a bmap file

bmaptool create -o [image.bmap] [image.img]

Copy from a URL

sudo bmaptool copy [https://example.com/image.img.xz] [/dev/sdX]

说明

bmaptool is a utility for creating block maps (bmap) and copying images to block devices efficiently. It only writes data blocks, skipping empty or zero-filled areas, making it significantly faster than dd for sparse images. The tool provides integrity verification using SHA256 checksums and includes safety features to prevent accidental writes to mounted devices. It supports compressed images and can decompress on-the-fly during copy operations.

参数

--bmap _file_
Path to the bmap file (auto-detected if not specified)
--nobmap
Copy without using bmap (entire image is written)
-o, --output _file_
Output file for create command
--no-verify
Skip SHA256 checksum verification
--no-sig-verify
Skip OpenPGP signature verification

FAQ

What is the bmaptool command used for?

bmaptool is a utility for creating block maps (bmap) and copying images to block devices efficiently. It only writes data blocks, skipping empty or zero-filled areas, making it significantly faster than dd for sparse images. The tool provides integrity verification using SHA256 checksums and includes safety features to prevent accidental writes to mounted devices. It supports compressed images and can decompress on-the-fly during copy operations.

How do I run a basic bmaptool example?

Run `sudo bmaptool copy [image.img] [/dev/sdX]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --bmap _file_ do in bmaptool?

Path to the bmap file (auto-detected if not specified)