SYSTEMD-DISSECT(1) systemd-dissect SYSTEMD-DISSECT(1) systemd-dissect, mount.ddi - (DDIs) systemd-dissect [OPTIONS...] IMAGE systemd-dissect [OPTIONS...] [--mount] IMAGE PATH systemd-dissect [OPTIONS...] [--umount] PATH systemd-dissect [OPTIONS...] [--attach] IMAGE systemd-dissect [OPTIONS...] [--detach] PATH systemd-dissect [OPTIONS...] [--list] IMAGE systemd-dissect [OPTIONS...] [--mtree] IMAGE systemd-dissect [OPTIONS...] [--with] IMAGE [COMMAND...] systemd-dissect [OPTIONS...] [--copy-from] IMAGE PATH [TARGET] systemd-dissect [OPTIONS...] [--copy-to] IMAGE [SOURCE] PATH systemd-dissect [OPTIONS...] [--make-archive] IMAGE [TARGET] systemd-dissect [OPTIONS...] [--discover] systemd-dissect [OPTIONS...] [--validate] IMAGE systemd-dissect [OPTIONS...] [--shift] IMAGE UIDBASE systemd-dissect (DDIs). : 1. os-release(5) . 2. . . 3. . . 4. . : 1. GPT UAPI.2 Discoverable Partitions Specification[1]. 2. . ( .) 3. GPT MBR . ( .) . LUKS Verity. --image= systemd-nspawn(1)' RootImage= systemd.exec(5). ( ) . ( ) /usr/ . : . fdisk(8). systemd-dissect mount.ddi " " mount(8). systemd-dissect mount fstab(5). . ".v/" systemd.v(7) . . --mount -m . -- -- . UAPI.2 Discoverable Partitions Specification[1] . : . --umount. LUKS Verity . ( "" ). ( .) fsck(8) (--fsck=no) (--read-only). mount(8) mount -t ddi myimage.raw targetdir/ fstab(5). . 247. -M --mount --mkdir. 247. --umount -u . : . . 252. -U --umount --rmdir. 252. --attach . losetup --find --show --partscan DDI . / . . --quiet . 254. --detach . --attach . . . 254. --list, -l . 253. --mtree BSD mtree(8) . inode . inode MAC chattr(1) btrfs(5) . SHA256. . inode inode . 253. --with . . . . --read-only . $SYSTEMD_DISSECT_ROOT . $SYSTEMD_DISSECT_DEVICE . 253. --copy-from, -x . : ( ) ( ). ("-") . . . . . 247. --copy-to, -a . : ( ) ( ). ("-") . . . .. . --mount . 247. --make-archive . : . . ".tar.xz" tar xz ( tar ). libarchive(3) . 256. --discover DDIs . / /usr/lib/machines/ /usr/lib/portables/ /usr/lib/confexts/ /var/lib/machines/ /var/lib/portables/ /var/lib/extensions/ . 253. --validate (DDI) --image-policy= . ( / LUKS/Verity). . u0639] u0644] . "OK" . . 254. --shift inode UIDs GIDs inode UID . UID . UID ( 65536 0 UID Users, Groups, UIDs and GIDs on systemd Systems[2]) "foreign" UID . . UIDs/GIDs 16 16 UID/GID 16 UID . systemd-dissect --shift /some/container/tree foreign UID systemd-dissect --shift /some/container/tree 0 UID . 258. -h --help . --version . : --read-only -r . --mount . . 247. --fsck=no . ( --mount --copy-to) fsck(8) . --fsck=no. 247. --growfs=no GPT. ( --mount --copy-to) 59 GPT UAPI.2 Discoverable Partitions Specification[1]. --growfs=no. : 1. 2. ( ) 3. GPT 4. 5. 59 GPT 6. --growfs=no . 249. --mkdir --mount . . 247. --rmdir --umount . 252. --discard= "disabled" "loop" "all" "crypto". "disabled" . "loop" . "crypt" . "all" . 247. --in-memory . ( ) . . 253. --root-hash=, --root-hash-sig=, --verity-data= Verity . --root-hash= Verity Verity. --root-hash-sig= PKCS#7 . . --verity-data= Verity . Verity Verity UAPI.2 Discoverable Partitions Specification[1]. 247. --usr-hash=, --usr-hash-sig= --root-hash= --root-hash-sig= /usr/. /usr/ . 258. --loop-ref= "" . . 63 . ".lo_file_name" . /sys/class/block/loopX/loop/backing_file . . --attach /dev/disk/by-loop-ref/... . : systemd-dissect attach --loop-ref=quux foo.raw : cfdisk /dev/disk/by-loop-ref/quux. 254. --loop-ref-auto --loop-ref= . 258. --mtree-hash=no --mtree mtree. --mtree . 254. --copy-ownership= ( ) --copy-from --copy-to. auto. "yes" . "no" UID/GID . auto . 260. --system --user --discover $HOME. . 258. --all --discover . 258. --quiet -q --attach . 258. --image-policy= systemd.image-policy(7). --image= . "*" . --image-filter= systemd.image-filter(7). --image= . . --no-pager (pager). --no-legend . --json= JSON. : "short" ( ) "pretty" ( ) "off" ( JSON ). 0 . --with . /SBIN/MOUNT.DDI systemd-dissect /sbin/mount.ddi. " " mount(8) () "ddi". # mount -t ddi myimage.raw targetdir/ : # systemd-dissect --mount myimage.raw targetdir/ DDI umount -R targetdir/ . DDIs /etc/fstab . : /path/to/myimage.raw /images/myimage/ ddi defaults 0 0 "ro" "rw" "discard" "nodiscard" ( --read-only --discard=all --discard=disabled). . 1. tarball (--with) # systemd-dissect --with foo.raw tar cz . >foo.tar.gz : 2. tarball (--make-archive) # systemd-dissect --make-archive foo.raw foo.tar.gz systemd(1), systemd-nspawn(1), systemd.exec(5), systemd.v(7), UAPI.2[1], mount(8), umount(8), fdisk(8) 1. UAPI.2 https://uapi-group.org/specifications/specs/discoverable_partitions_specification 2. UID GID systemd https://systemd.io/UIDS-GIDS/ 3 . . : . systemd 260.2 SYSTEMD-DISSECT(1)