__          __             __
\ \_________\ \____________\ \___
 \  _ \  _\ _  \  _\ __ \ __\   /
  \___/\__/\__/ \_\ \___/\__/\_\_\
                      Bedrock Linux

Bedrock Linux 1.0beta2 Nyla

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

Bedrock Linux 1.0beta2 Nyla Command Overview

brc ("BedRock Change local context")

The way Bedrock Linux resolves potential conflicts between packages from different distributions is by having multiple instances of such files. This can mean multiple versions of any given executable will be present. When a user runs a command, a specific rule set will decide which instance of an executable is run if multiple are available. To bypass this rule set and explicitly specify which is to be run one can use the brc command.

If firefox is provided by multiple strata (such as Arch and Fedora), and the user would like to specify which is to run (rather than allowing Bedrock Linux to chose the default), one can explicitly call brc, like so:

brc fedora firefox

If no command is given, brc will attempt to use the user's current $SHELL. If the value of $SHELL is not provided by the stratum it will fall back to /bin/sh.

bri ("BedRock Information")

The bri command will provide information about the strata based on which flag is used.

brl ("BedRock aLl")

The brl command will run its argument in the local context of all enabled strata.


Attempt to ping bedrocklinux.org to check if networking/DNS is working

brl ping -c 1 google.com

Run 'apt-get update && apt-get dist-upgrade' with the apt-get from all strata that have apt-get available in the local context.

brl -c 'brw apt-get|grep "(direct)$"' sh -c 'apt-get update && apt-get dist-upgrade'

List all of the pids and their corresponding strata. Can append | sort -n to sort by pid.

brl bri -P | grep -v "brl\|bri"

brsh ("BedRock SHell")

/etc/passwd requires the full path to the user's desired shell. While this is available through via implicit access through /bedrock/brpath/bin/shell, due to how the implicit subsystem is currently implemented any indication that the shell is a login shell is lost.

To resolve this, Bedrock Linux provides a meta-shell, brsh, which simply calls the shell configured in ~/.brsh.conf.

brw ("Bedrock Where")

The brw command is simply an alias to parts of bri. Without any arguments, brw will print the name of the current stratum (bri -n). If arguments are provided, it will indicate which stratum provides the listed command(s) (bri -w).

brp ("BedRock Path")

The brp executable is responsible for maintaining the /bedrock/brpath directory and thus allowing implicit file access. This is typically launched during boot; end-users will rarely ever have to run it directly. It is configured via /bedrock/etc/brp.conf.

brs ("BedRock Setup")

brs can be used to enable and disable strata. After enabling or disabling a stratum, it will inform brp to update its internal list of strata.

To enable strata, run:

`brs enable strata`

To disable:

brs disable strata

To disable then reenable:

brs reenable strata

If config/frameworks have changed since a stratum was enabled, and one would like to add new mount items to a running stratum without disabling it, it is done like so:

brs update strata

Note that brs update may miss things such as subshare items and new components of a union item. Generally, a full brs reenable is recommended over brs update if it is not a problem.

bru ("Bedrock Union filesystem")

The bru command will mount a filesystem, unioning the contents of two directories. Specifically, it implements the required functionality for the union stratum.conf setting. Like brp this is mostly managed by the system and it is unlikely the end-user will need to run this directly.

brn ("BedRock pre-iNit")

The brn command bootstraps other init systems. It reads brn.conf and, through querying bri, the init and enable values in the union stratum.conf setting, optionally prompting the user to select a init to use, then hands off control to that init.

Like brp and bru this is mostly managed by the system and it is unlikely the end-user will need to run this directly.

If you run into difficulties booting, brn can be told to open a debug shell before handing control off to the specified init by setting "debug_brn" on the kernel line in the bootloader. Most bootloaders will let you edit the kernel line for the given session in some manner, e.g. selecting it in a menu and pressing <tab> or e. Consider placing this before "init=" to ensure the kernel/initrd does not interpret this as an argument for the init command. To resume booting the system after you have completed your debugging, exit the debug shell - e.g. with exit or ctrl-d.

brr ("BedRock Report")

This command gathers information about the Bedrock Linux system which may be useful in debugging issues. When reporting an issue, strongly consider including a link to the brr output (from a paste website - there are many freely available ones online, take your pick) with the report.

By default it prints to stdout. It can be made to log to a file with the -f flag.

Depending on the specific issue you've run into, consider running brr in the following situations (and reporting the results):