Expand description
Β§Writing a container to a block device in a bootable way
This module supports installing a bootc-compatible image to
a block device directly via the install verb, or to an externally
set up filesystem via install to-filesystem.
ModulesΒ§
- aleph π
- baseline π
- The baseline installer
- completion π
- This module handles finishing/completion after an ostree-based install from e.g. Anaconda.
- config π
- Configuration for
bootc install - osbuild π
- Helper APIs for interacting with bootc-image-builder
- osconfig π
StructsΒ§
- Install
Composefs πOpts - Install
Config πOpts - Install
Print πConfiguration Opts - Install
Reset πOpts - Install
Source πOpts - Install
Target πFilesystem Opts - Options for installing to a filesystem
- Install
Target πOpts - Install
ToDisk πOpts - Install
ToExisting πRoot Opts - Install
ToFilesystem πOpts - Mount
Spec π - A mount specification is a subset of a line in
/etc/fstab. - Post
Fetch πState - Root
Mount πInfo - Root
Setup π - Source
Info π - Global state captured from the container.
- State π
EnumsΒ§
- Bound
Images π - Bound
Images πOpt - Cleanup
- Replace
Mode π - SELinux
Final πState
ConstantsΒ§
- ALONGSIDE_
ROOT_ πMOUNT - The default path for the host rootfs
- ARCH_
USES_ πEFI - BOOT π
- The toplevel boot directory
- DEFAULT_
REPO_ πCONFIG - DESTRUCTIVE_
CLEANUP π - Global flag to signal the booted system was provisioned via an alongside bootc install
- EFIVARFS π
- The mount path for uefi
- EFI_
LOADER_ πINFO - LOST_
AND_ πFOUND - This is an ext4 special directory we need to ignore.
- OSTREE_
COMPOSEFS_ πSUPER - The filename of the composefs EROFS superblock; TODO move this into ostree
- RUN_
BOOTC π - Directory for transient runtime state
- RW_KARG π
- Kernel argument used to specify we want the rootfs mounted read-write by default
- SELINUXFS π
- The mount path for selinux
FunctionsΒ§
- check_
disk_ πspace - clean_
boot_ πdirectories - exec_
in_ πhost_ mountns - finalize_
filesystem π - Trim, flush outstanding writes, and freeze/thaw the target mounted filesystem; these steps prepare the filesystem for its first booted use.
- find_
root_ πargs_ to_ inherit - Discover how to mount the root filesystem, using existing kernel arguments and information about the root mount.
- initialize_
ostree_ πroot - install_
container π - install_
finalize π - Implementation of
bootc install finalize. - install_
reset π - install_
to_ πdisk - Implementation of the
bootc install to-diskCLI command. - install_
to_ πexisting_ root - install_
to_ πfilesystem - Implementation of the
bootc install to-filesystemCLI command. - install_
to_ πfilesystem_ impl - install_
with_ πsysroot - Given a baseline root filesystem with an ostree sysroot initialized:
- installation_
complete π - ostree_
install π - prepare_
install π - Preparation for an install; validates and prepares some (thereafter immutable) global state.
- print_
configuration π - read_
boot_ πfstab_ entry - Read the /boot entry from /etc/fstab, if it exists
- reexecute_
self_ πfor_ selinux_ if_ needed - If we detect that the target ostree commit has SELinux labels, and we arenβt passed an override to disable it, then ensure the running process is labeled with install_t so it can write arbitrary labels.
- remove_
all_ πexcept_ loader_ dirs - remove_
all_ πin_ dir_ no_ xdev - Remove all entries in a directory, but do not traverse across distinct devices. If mount_err is true, then an error is returned if a mount point is found; otherwise it is silently ignored.
- require_
boot_ πuuid - require_
dir_ πcontains_ only_ mounts - Require that a directory contains only mount points recursively. Returns Ok(()) if all entries in the directory tree are either:
- require_
empty_ πrootdir - require_
host_ πpidns - A heuristic check that we were invoked with βpid=host
- require_
host_ πuserns - Verify that we can access /proc/1, which will catch rootless podman (with βpid=host) for example.
- run_
in_ πhost_ mountns - Run a command in the host mount namespace
- setup_
sys_ πmount - By default, podman/docker etc. when passed
--privilegedmount/sysas read-only, but non-recursively. We selectively grab sub-filesystems that we need. - setup_
tmp_ πmount - Ensure that /tmp is a tmpfs because in some cases we might perform operations which expect it (as it is on a proper host system). Ideally we have people run this container via podman run βread-only-tmpfs actually.
- verify_
target_ πfetch - Verify that we can load the manifest of the target image
- warn_
on_ πhost_ root