.\" ---------------------------------------------------------------------------- .\" Make sure there are no errors with: .\" groff -z -wall -b -e -t kpartx/kpartx.8 .\" man --warnings -E UTF-8 -l -Tutf8 -Z kpartx/kpartx.8 > /dev/null .\" .\" Update the date below if you make any significant change. .\" ---------------------------------------------------------------------------- . .TH KPARTX 8 2019-04-27 Linux . . .\" ---------------------------------------------------------------------------- .SH NAME .\" ---------------------------------------------------------------------------- . kpartx \- Create device maps from partition tables. . . .\" ---------------------------------------------------------------------------- .SH SYNOPSIS .\" ---------------------------------------------------------------------------- . .B kpartx .RB [\| \-a | \-d | \-u | \-l \|] .RB [\| \-r \|] .RB [\| \-p \|] .RB [\| \-f \|] .RB [\| \-g \|] .RB [\| \-s | \-n \|] .RB [\| \-v \|] .B wholedisk . . .\" ---------------------------------------------------------------------------- .SH DESCRIPTION .\" ---------------------------------------------------------------------------- . This tool, derived from util-linux' partx, reads partition tables on specified device and create device maps over partitions segments detected. It is called from hotplug upon device maps creation and deletion. . . .\" ---------------------------------------------------------------------------- .SH OPTIONS .\" ---------------------------------------------------------------------------- . .TP .B \-a Add partition mappings. . .TP .B \-d Delete partition mappings. . .TP .B \-u Update partition mappings. . .TP .B \-l List partition mappings that would be added \-a. . .TP .B \-r Read-only partition mappings. . .TP .B \-p Set device name-partition number delimiter. . .TP .B \-f Force creation of mappings; overrides 'no_partitions' feature. . .TP .B \-g Force GUID partition table (GPT). . .TP .B \-s Sync mode (Default). Don't return until the partitions are created. . .TP .B \-n Nosync mode. Return before the partitions are created. . .TP .B \-v Operate verbosely. . . .\" ---------------------------------------------------------------------------- .SH EXAMPLE .\" ---------------------------------------------------------------------------- . To mount all the partitions in a raw disk image: .IP kpartx \-av disk.img .PP This will output lines such as: .IP add map loop1p1 (254:4): 0 409597 linear 7:1 3 .PP The \fIloop1p1\fR is the name of a device file under \fI/dev/mapper\fR which you can use to access the partition, for example to fsck it: .IP fsck /dev/mapper/loop1p1 .PP When you're done, you need to remove the devices: .IP kpartx \-d disk.img . . .\" ---------------------------------------------------------------------------- .SH "SEE ALSO" .\" ---------------------------------------------------------------------------- . .BR multipath (8) .BR multipathd (8) .BR hotplug (8) . . .\" ---------------------------------------------------------------------------- .SH AUTHORS .\" ---------------------------------------------------------------------------- . This man page was assembled By Patrick Caulfield for the Debian project. .PP \fImultipath-tools\fR was developed by Christophe Varoqui and others. .\" EOF