Expand description
The Storage type holds references to three different types of
storage:
Β§OSTree
The default backend for the bootable container store; this
lives in /ostree in the physical root.
Β§containers-storage:
Later, bootc gained support for Logically Bound Images.
On ostree systems this is a containers-storage: instance that
lives in /ostree/bootc/storage. On composefs systems the
physical location is /composefs/bootc/storage with a compat
symlink at ostree/bootc -> ../composefs/bootc.
Β§composefs
This lives in /composefs in the physical root.
StructsΒ§
- Booted
Composefs - Represents a composefs-based boot environment
- Booted
Ostree - Represents an ostree-based boot environment
- Booted
Storage π - Storage accessor for a booted system.
- Cached
Image πStatus - Cached image status data used for optimization.
- Storage π
- A reference to a physical filesystem root, plus accessors for the different types of container storage.
EnumsΒ§
- Booted
Storage πKind - A system can boot via either ostree or composefs; this enum allows code to handle both cases while maintaining type safety.
- Environment π
- Discriminated union representing the boot storage backend.
ConstantsΒ§
- BOOTC_
ROOT π - The path to the bootc root directory, relative to the physical
system root. On ostree systems this is a real directory; on composefs
systems it is a symlink to
../composefs/bootc(seeensure_composefs_bootc_link). - COMPOSEFS
- The toplevel composefs directory path
- COMPOSEFS_
BOOTC_ πROOT - The βrealβ bootc root for composefs-native systems, relative to the physical system root.
- COMPOSEFS_
MODE π - The mode for the composefs directory; this is intentionally restrictive to avoid leaking information.
- SYSROOT
- Path to the physical root
FunctionsΒ§
- ensure_
composefs_ πbootc_ link - On a composefs install the containers-storage lives under
composefs/bootc/storage. To keep the rest of the code (and the/usr/lib/bootc/storagesymlink which points throughostree/bootc) working, we create: - ensure_
composefs_ πdir - Ensure the composefs directory exists in the given physical root with the correct permissions (mode 0700).
- get_
physical_ πroot_ and_ run - Open the physical root (/sysroot) and /run directories for a booted system.