Since the advent of Linux, many distributions have appeared quite soon: Slack, RedHat, Debian, SUSE, etc. Then the problem of choosing a distribution arose, because each of them has its own characteristics and advantages that make it special. RedHat and Debian are the most stable and conservative of the distributions, Ubuntu is focused on usability and has a great user interface, Gentoo is free of choice and flexibility.
Every Linux user has had moments when they lacked some of the features implemented in other distributions. Many people at one time did not like that Debian switched to systemd and they created a new distribution kit based on it - Devuan. Some have switched to Gentoo, where the user can create an environment with two init systems: both openrc and systemd.
Different distributions handle this issue differently. Installing a package that is not in the regular repository is solved using docker containers, or using the snap and flatpak self-contained package systems. You can even install RPM packages on systems with DEB package manager. Gentoo has support for RPM and DEB packages. All this works, but it doesn't scale well and is not very stable.
The creators of Bedrock Linux went further and created a fully fledged meta-distribution. It is possible to use not only packages, but also components of various Linux distributions, like Lego bricks. In one environment, you can create a system from several Linux OS, for example, installing additional Ubuntu packages on top of the basic Debian and Arch components. The installation script is available for the following platforms.
- aarch64;
- armv7hl;
- armv7l;
- mips64el;
- mips64;
- mips;
- mipsel;
- ppc64;
- ppc64le;
- ppc;
- s390;
- x86_64;
- x86;
By the way, why an installation script, and not a full-fledged installation disk, or an image? The reason is that Bedrock Linux does not have its own canonical distribution, instead there is a set of recipes for assembling an operating system from a set of ingredients. In this, Bedrock Linux is similar to another Gentoo meta-distribution, but in an attempt to embrace the immensity, it has pushed to the very limits of sanity, and possibly crossed them.
Installing Bedrock and basic commands
Using an already installed traditional Linux distribution with an installation script, Bedrock transforms it into a hybrid system. For example, you already have Debian installed, using the installation script, you get a co-located environment with Ubuntu. First you need to run as root.
sh ./bedrock-linux-<release>-<arch>.sh --hijack
The script will give a warning that these are not exercises.
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Continuing will: *
* - Move the existing install to a temporary location *
* - Install Bedrock Linux on the root of the filesystem *
* - Add the previous install as a new Bedrock Linux stratum *
* *
* YOU ARE ABOUT TO REPLACE YOUR EXISTING LINUX INSTALL WITH A *
* BEDROCK LINUX INSTALL! THIS IS NOT INTENDED TO BE REVERSIBLE! *
* *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Please type "Not reversible!" without quotes at the prompt to continue:
> Not reversible!
__ __ __
\ \_________\ \____________\ \___
\ _ \ _\ _ \ _\ __ \ __\ /
\___/\__/\__/ \_\ \___/\__/\_\_\
Bedrock Linux 0.7.19 Poki
It's time to familiarize yourself with the Linux distributions compatibility table . The major popular distributions have a good degree of support, apart from possibly OpenSUSE. Unloading and unattended installations are not supported for Linux Mint. Also, do not forget about the compatibility table between components . Binaries, for example, transfer well from one distribution to another, but fonts don't.
If all checks are successful, the script makes the necessary changes to the OS, after which you need to restart the computer for the changes to take effect. From this point on, the user is in the Bedrock Linux environment. Now you can install an additional OS in a container called a stratum - something like a chroot environment, in which special holes are made to communicate with other stratas.
However, before you start, it is advisable to familiarize yourself with the instruction manual by calling brl tutorial basics. The simplest Bedrock commands, the purpose of each is obvious.
# brl update
# brl version
# brl ctatus
View the list of available distributions and install.
# brl fetch --list
# brl fetch alpine
# brl fetch void
How do Bedrock distributions interact?
In certain situations, you can execute commands from different stratas as if they were part of the same familiar Linux OS. For example, commands from void and alpine can be used in the same pipeline. The first command sets the jq package to alpine, the second - jo to void. The pipeline reads from the second and transfers to the first, everything happens transparently for the user.
$ sudo apk add jq
$ sudo xbps-install -y jo
$ jo "distro=bedrock" | jq ".distro"
The original Debian Linux OS, which was affected by --hijack, is now also just stratum. Its existence can be guessed by running some of these commands.
$ brl which ls
debian
$ brl which /
debian
More specifically, the output of these commands will match the contents of the / etc / os-release file as seen from the current shell process. This is logical, since each stratum sees only its own local file, otherwise the parallel installed Debian and Ubuntu would stumble over the contents of the /etc/apt/sources.list file.
However, if all files were local, different distributions would not be able to communicate with each other. For this to be possible, global files are needed. Such files do exist.
$ brl which /bedrock/etc/bedrock.conf
global
$ brl which /run
global
$ brl which /tmp
global
For those cases when the processes of one distribution need to reach the local files of another, cross paths are implemented. For example, to read the os-release file from one strata to another, you need to access the resources of the file system using the path / bedrock / strata /. The stratum bedrock itself serves only for cross reading and writing files. Internally, crossfs is a FUSE filesystem in which requested files are overwritten on the fly to ensure compatibility between different strata.
$ brl which /bedrock/strata/bedrock/etc/os-release
bedrock
$ cat /bedrock/strata/bedrock/etc/os-release
NAME="Bedrock Linux"
ID=bedrock
ID_LIKE=bedrocklinux
VERSION="0.7.19 (Poki)"
VERSION_ID="0.7.19"
PRETTY_NAME="Bedrock Linux 0.7.19 Poki"
HOME_URL="https://bedrocklinux.org"
$ brl which /bedrock/strata/my-alpine/etc/os-release
my-alpine
If you need to execute an internal command of a specific strata, you must use the appropriate prefix.
$ strat void sh -c 'apk --help'
Bedrock update
Bedrock is simple and straightforward to update Like all Linux distributions, just run brl update as root. This command will update only the Bedrock stratum, the rest of the strata are updated with their own standard tools: for example, yum update, or dnf update for Redhat and CentOS.
Removing strata
Nothing too complicated - first the distribution is turned off, then uninstallation follows.
$ sudo brl disable alpine
$ sudo brl remove alpine
$ sudo remove -d void
The last command combines the disable and remove operations.
What is Bedrock Linux really for?
At this point, many readers are most likely asking the question: why do you need to breed a hedgehog with a snake and create hybrid OS, because a Linux workstation itself is not always quite stable, especially with closed graphics card drivers, or in a Wayland session . Let's try to list some scenarios for using Bedrock Linux in practice.
- You prefer stable Linux distributions such as RedHat and Debian, but you also need support for new hardware: CPU, or a newly purchased printer. To get this support, you need to install a more recent kernel and cups packages, hplips. This task can be solved once, but a stable system with unstable packages is no longer the same
- , . , systemd openrc, runit, Ubuntu.
- , Linux, . sh bash Debian, /bin/sh /bin/bash. Bedrock Linux stratum Debian Linux.
- Linux OS. .