$filterdir/nbdkit-partition-filter.so
The filter.
Use "nbdkit --dump-config" to find the location of $filterdir.
Nbdkit partition filter
nbdkit --filter=partition
plugin
partition=PART
[plugin-args ...]
"nbdkit-partition-filter" is a filter that limits requests to a single partition within a disk image that is served by another plugin.
Partition numbers are specified by the required "partition" parameter, and count from 1.
This works like the "qemu-nbd -P" option.
The opposite of this filter is nbdkit-partitioning-plugin(1) which adds a virtual partition table to a file or files.
partition=PARTThe partition number to serve, counting from 1.
This parameter is required.
partition-sectorsize=SECTOR_SIZEThe default for this parameter is chosen according to the minimum block size advertised by the underlying device. If it is 512 or 4K, then the sector size is set to that. If the underlying device does not advertise a minimum block size, or it is something other than 512 or 4K, the default is 512 bytes.
The user may specify 512 or 4096 as the sector size manually via config.
However set, this parameter instructs the partition table logic to treat the underlying storage as having the indicated sector size. This is important for MBR and GPT logic using LBA (logical block addressing).
disk.img is a partitioned disk image (eg. a virtual machine disk image). To serve the first partition only use:
nbdkit --filter=partition file disk.img partition=1
$filterdir/nbdkit-partition-filter.so
The filter.
Use "nbdkit --dump-config" to find the location of $filterdir.
"nbdkit-partition-filter" first appeared in nbdkit 1.2.
4 releases since Debian 10 (Buster); the text changed 3 times.