LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

systemctl-mount-image

Mount disk image into unit namespace

TLDR

Mount image into unit
$ systemctl mount-image [unit] [/path/to/image] [/path/in/unit]
copy
Mount with options
$ systemctl mount-image [unit] [/path/to/image] [/path/in/unit] root:ro,nosuid
copy
Create directory before mounting
$ systemctl mount-image --mkdir [unit] [/path/to/image] [/path/in/unit]
copy
Mount as read-only
$ systemctl mount-image --read-only [unit] [/path/to/image] [/path/in/unit]
copy

SYNOPSIS

systemctl mount-image UNIT IMAGE [PATH [PARTITION:OPTIONS]]

DESCRIPTION

systemctl mount-image mounts a disk image file into a running unit's mount namespace. This is only supported for units running with their own mount namespace (using RootImage=, PrivateMounts=, etc.). Added in systemd 248.The image is dissected using systemd's Discoverable Disk Image (DDI) support, automatically finding and mounting the appropriate partitions. Partition names and mount options can be specified after the path using the `PARTITION:OPTIONS` syntax.

PARAMETERS

--mkdir

Create destination directory if it doesn't exist
--read-only
Mount the image read-only
--no-block
Do not wait for the operation to complete

CAVEATS

Requires the unit to have a separate mount namespace. Only works with running units. The mount is ephemeral and doesn't persist across unit restarts. Supports GPT-partitioned images and raw filesystems.

HISTORY

The mount-image subcommand enables runtime injection of disk images into isolated services, supporting advanced container-like isolation without requiring full container runtimes.

SEE ALSO

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid