Skip to main content

Module mount

Module mount 

Source
Expand description

Explicit, caller-owned mounts of an offline deployment.

Conceptually this redoes what the initramfs does at boot (ostree-prepare-root for OSTree, bootc-initramfs-setup for composefs), only for a deployment in an offline sysroot and at a directory the caller picks instead of /sysroot: the root is the deployment’s composefs image, with /etc and /var mounted from its state as they will be at boot. Keep it in line with those, and share their code where bootc has it.

Unlike the install to-* commands, this deliberately does not enter a private mount namespace: the assembled tree is left in the caller’s namespace, and the caller cleans it up with umount -R (or by tearing down its own namespace). bootc keeps no state about the mount.

Structs§

MountOpts 🔒

Enums§

DeploymentBackend 🔒
DeploymentState 🔒
Where the machine-local state of the selected deployment lives.

Constants§

ETC 🔒
VAR 🔒

Functions§

attach 🔒
bind 🔒
mount 🔒
mount_composefs_state 🔒
Mount /etc and /var as the composefs initramfs does at boot, honoring the image’s setup-root configuration (for example a transient /etc).
mount_ostree_state 🔒
Mount /etc and /var as ostree-prepare-root does at boot: /etc is the deployment’s persistent copy, or a transient overlay of /usr/etc when prepare-root.conf enables etc.transient.
open_mount_target 🔒
Open the mount target. Like mount(8), this mounts wherever the caller asks; like systemd, it warns when that hides existing content.
select_backend 🔒