__          __             __
\ \_________\ \____________\ \___
 \  _ \  _\ _  \  _\ __ \ __\   /
  \___/\__/\__/ \_\ \___/\__/\_\_\

Bedrock Linux 0.7 Poki

© Bedrock Linux 2012-2020
Linux® is a registered trademark
of Linus Torvalds

Bedrock Linux 0.7 Poki Workflows

Manually Adding Strata

brl fetch can be used to automate acquiring Linux distributions for use as strata. However, this supports a limited number of distros and requires an internet connection. Strata may also be created manually, which may be preferred in some situations.

To manually add a stratum, get its contents into a new directory within /bedrock/strata corresponding to the new stratum's name. For example:

Or for another example:

Ensure the new stratum name does not contain any whitespace characters, forward or back slashes, colons, equal signs, dollar signs, or single or double quotes. Moreover, ensure it does not start with a dash character. At the time of writing, Bedrock's implementation naively assumes these constraints to be in place.

By default, new strata are hidden to avoid accidentally being enabled while the files are mid transfer into place. Once you have completed placing the new stratum's files into /bedrock/strata, show the stratum:

Finally, to actually use the stratum, enable it:

New, manually acquired strata may complain about missing users or groups. If so, you may need to manually add them. Such strata may also complain about locale issues, in which case you may need to manually set up the given stratum's locale.

Removing the Hjiacked Stratum

The stratum resulting from the hijack of the initial install may be removed. Some considerations:

brl remove $(brl deref hijacked)

Pinning executables to strata

If multiple strata provide the same command, absent any additional indication of which to use Bedrock will choose one by default in a given context. Which it chooses may be configured, which is referred to as "pinning."

/bedrock/etc/bedrock.conf's [cross-bin] section is used to configure executable binaries in /bedrock/cross. In this section,

pin/bin/command = stratum:/local/path/to/command

entries are used to specify the specified stratum:path pair should provide the given command, should the pair exist. For example,

pin/bin/vim = arch:/usr/bin/vim

indicates that the arch stratum should provide vim by default if it has it (and if strat is not used to manually specify which stratum should provide the command).

Multiple stratum:path pairs may be specified, in which case the first which provides the path will provide the command. For example,

pin/bin/firefox = clear:/usr/bin/firefox, arch:/usr/bin/firefox

stratum: may be left off with only a path provided, in which case all enabled strata are considered. However, this is not useful for pinning.

If you typically restrict the command, you can specify it should be restricted by default by placing it under the [cross-bin-restrict] section instead. Just as strat can be used to specify which stratum should provide a given command, overriding the above described pinning, strat without -r will disable any configured restriction.

Chrooting into Bedrock to fix /boot

Bedrock is dependent on various runtime items being in placed, and thus one may not simply mount a Bedrock partition and chroot into it.

One common need to choot into some system is to fix a broken /boot. While a generalized chroot is not available, a limited one for this purpose is. There are three main differences from a typical rescue chroot: