How to Use Multiple GNU/Linux at the Same Time — Bedrock Linux
A general review for bedrock Linux meta distribution
Hello, in this article, I will talk about Bedrock Linux, which is a daemon that allows using software packages from more than one package manager, while also installing and using multiple distributions in layers.
Although it is described as a separate Linux distribution, we can say that it is a daemon that connects the distributions installed to the root directory and then installed in layers, to the root directory. This is a system that allows using multiple different software packages together with a very useful and customizable architecture.
To understand this architecture, I will first talk about the Linux system hierarchy. Next, I’ll review the bedrock Linux hierarchy and simply explain how to install and use it.
Linux System Hierarchy
Linux is an operating system kernel with a Unix-like design. The kernel is designed by Linus Torvalds and is still developing as open source. The latest kernel version is Linux 5.14. and available at the link. Linus Torvalds also owns the git project, source code management, and version control software. Named in 1991, this monolithic kernel is widely used in operating systems used by supercomputers, personal or mobile devices.
For example, Android, Debian, RHEL(Red Hat Enterprise Linux), CentOS are examples of GNU/Linux distributions. Especially Debian and Debian-based distributions, RHEL, and RHEL-based distributions are frequently used as server operating systems. Linux and Unix are monolithic kernels. Monolithic kernels occupy a larger area than microkernels. Essentially, operating systems using Monolithic kernels run all operating system functions in “kernel mode”, that is, kernel space.
Each process is in separate address spaces. Kernel and OS services are in the same address space. Processes can request service from the kernel. This creates a layer of security between the kernel and applications. It also provides high speed as there will be no message traffic. However, a change to the kernel requires recompilation and the kernel code can become quite complex.
In systems using microkernel, “kernel mode” takes up less space. System services such as the file system, virtual memory manager, and CPU scheduler are in the “user mode” area on the kernel, and each has its own address space. Applications also have their own address space. Such cores are customizable and easily expandable.
In Microkernel, a fault in a component does not affect the whole system thanks to the system architecture. In this respect, we can describe this architecture as durable. However, in case of an error in monolithic systems, the whole system will be affected because the services are interconnected. But it has a clear advantage over monolithic architecture in terms of speed. Examples of microkernels are Symbian, Minix, GNU. Most Linux distributions are not a Linux project, but rather a GNU project. Because Linux is just a kernel and it makes up a very small part of the whole system. Hybrid architectures, on the other hand, are a combination of the good features of monolithic and microkernels, thereby reducing weaknesses. They keep more code in the kernel space. Communication units and many drivers are embedded in the kernel area. However, when a new component is added, it does not require recompilation as in monolithic architecture. For example, Darwin and macOS kernel XNU, BSD-based FreeBSD, Windows NT are coded in this architecture. Modern operating systems prefer this architecture.

Image source: wikipedia
Init System
It is the ancestor process on a GNU/Linux system. It takes 1 as PID and after the kernel is loaded, it is decided which run level the system will start with by checking the run levels in /etc/inittab
in modes such as windows or safe mode that we are used to from macOS. Runlevels can be seen in the figure below. As seen in the inittab
file in Centos7 system, 0 halts, 1 single-user mode, 2 multiuser, etc. is being used. 3, ie Full multiuser mode, is used by default as initdefault
.
After init is started, other processes are started in the appropriate order and the mode is used under /etc/rc.d/init.d
. For example, udev, apache, preload services can be started after init. This is used like /etc/rc.d/init.d/init3.d/S100preload
. init3.d
is in 3rd mode and S100 indicates that preload will be started in 100th order.

This structure is not preferred in today’s GNU/Linux distributions. In most of them, systemd
, which was written in 2010, comes by default. It is also used in new generation structures such as runit, OpenRC, Upstart. The old build is the SysV init system.
In new structures, there are features such as starting processes in parallel, automatically starting the process that a process needs, automatic restarting if the process terminates. systemd
is a slightly slower init system than others. The system with the fastest boot time among them is Runit and it is cross-platform. Available on GNU/Linux, Solaris, macOS X.
File System and Directory Hierarchy
The file system is a markup structure on the disk that allows the operating system to find the file. GNU/Linux distributions usually use ext2–3–4 journaling systems. It can also find file traces on NTFS, the Windows file system. Everything is a file and designed in a hierarchical order in directories. Files, drivers, executables, libraries are located in these directories. This directory structure can be seen in the figure below.

In normal use, we can say that the most used directories are /var
, /lib
, /usr
, and /home
. In addition, directories branch themselves into trees. For example, the /usr
directory contains the /usr/bin
directory with binary files. Or the directory /var/lib
is available under /var
. /bin
directory is loaded at boot and contains basic commands. /sbin
contains binary files that provide system information or make changes.
/lib
contains shared libraries, /media contains removable disks, /mnt
contains new mounted filesystem, /var
contains variables. The /home
directory contains users’ private files. /etc
contains configuration files. The /boot
directory contains the bootloader and some core files, such as grub, lilo, related to system boot. These directories can be divided into different partitions and connected to the system. This is a widely used method. For example, when the home directory is installed on a partition separate from the root, the programs installed in the users’ files and user directory are not deleted when the system is reinstalled or a different GNU/Linux distribution is installed. Bedrock Linux designers have developed a different model on this hierarchy.
Bedrock Linux Bedrock Linux is a productivity-oriented daemon that aims to use modules from many distributions, defined as a meta-distribution, together in a single operating system. In other words, you can work on Debian and use Pacman or AUR package managers and packages from Arch Linux. You can use libraries in different operating systems and fonts installed in different systems for different programming. This system also has some bugs. It is currently progressing above 0.7 poki minor. In addition, it cannot be said that it is security-oriented. This system is very useful for users who want to benefit from the power of not only a single system, but also many systems, and who want to use more than one package manager, different packages or different init systems at the same time. You can check it from the link.
The system is very simple to use. Once the Strata concept is well understood, it is quite easy to adapt for an advanced user. After a shell script is downloaded from Github, it is started as root and you will be asked to confirm the action you want to do, as a warning that the actions cannot be reversed. It then takes the distribution in your root directory and moves it to a stratum under /bedrock
. You can integrate other distributions into your system with the brl
command. You can also configure your system in bedrock.conf
file. It is located under /etc/bedrock
.
brl apply
is used to apply the changes. Community side usage rates are given on the official page of Bedrock Linux (link). Generally, you have a low error rate for frequently used distributions. For example, Debian, ubuntu, centos, arch are used quite often and there are no known problems. But many problems have been reported in different distributions such as Clear Linux, nixOS. The concept of Strata will be discussed in the next section.
Strata
Bedrock installs each distribution on one layer, establishing a communication bridge between them and providing the appropriate environment for other inter-use.
$ brl fetch --list
With the command, distributions that can be used as stratum can be seen.
$ brl fetch void
With this command void Linux stratum can be created. It has the void Linux runit
init system. When Bedrock init interface comes, you can see it as void:runit
on init
menu.
$ strat -r debian neofetch
When the command is used, the neofetch
package in Debian stratum will run and see Debian as the root directory. It outputs Debian as an os-release. But when neofetch
is used directly, bedrock Linux will be seen as os-release. Occurs when build tools scan the environment and find dependencies from different distributions.
In case of confusion due to the bedrock environment like this, inter-layer hooks can be bypassed using the restrict -r parameter. If you are using two distributions with the same package manager, for example, apt and rpm are the most used package managers, then you can start ubuntu as apt
. Such an application may be needed because the source repositories are different.
If a package exists in more than one stratum then it will be executed in the pinned
stratum. You can check this with brl which
. All layers can see /run
, /temp
, /home
directories as a global file path.
You can enable or disable some stratum if needed. You can use the brl enable/disable
command. You can use the brl remove -d
command to delete Stratum directly.
$ brl remove -d fedora
Installation, Use, and Review
In this section, some topics such as how to create and configure some stratum by installing bedrock on Ubuntu-based virtual Linux lite in VirtualBox, how to install package software will be explained.
You can choose in a different distribution. In particular, distributions that have not undergone major changes based on common or frequently used distributions can run smoothly.
For installation, you can download the script suitable for the CPU architecture from the link. First of all, daemon installation should be done by running the bedrock shell script as the root user.

“Not reversible!” By typing, you agree to these terms and installation begins. Before the installation, the OS in the root is taken to a temporary location.
Then bedrock is installed on the root and the OS in the temporary location is installed in a layer. After the process is finished, you can see the init selection text-mode interface with a reboot.

Here, the system is booted from the system marked with “*”. /sbin/init
points to /usr/lib/systemd/systemd
here. Systemd
services are started and system boot is provided. When Ubuntu is booted, processes named crossfs
and etcfs
are file systems for moving files, libraries, fonts between layer boundaries. In addition, the paths containing the stratum binary files are added to the PATH
variable. This way, we can access them over the bash or any shells.

I am installing the neofetch
package on Ubuntu. You can install it from the Ubuntu apt repositories. Then, when I use the neofetch
command, the base system appears as bedrock. To run neofetch
in the Ubuntu stratum.
$ strat -r ubuntu neofetch
The command should be used. With restrict cross-stratum hooks are disabled. This way neofetch
will only work in the ubuntu
stratum.

To create another stratum,
$ brl fetch --list
alpine
arch
...
...
$ brl fecth void
You can check the distros out with the command. Then it is downloaded and installed from stratum mirror with brl fetch
.
For example, for void Linux using runit
, after the packages are pulled, void Linux can be seen in the init menu. When strat -r void neofetch
is run again, it will warn that the package is not present.
Because there are no hooks in between, it cannot reach the neofetch
package in the ubuntu stratum. In this stratum, the package is installed and run with sudo xbps-install neofetch
.
There are both ubuntu and void startums
in the system. Here the xbps
package manager and apt package manager can be used jointly. E.g
$ sudo xbps-install filezilla
via this command, Filezilla can be installed and run in the ubuntu stratum. The opposite is also true. For example, in Arch Linux stratum, you can install a package from AUR packages and access it from other startums.
For this, git can be installed with Pacman and the spring helper software can be installed from the GitHub repo. With yay -Sy brave
a package belonging to arch stratum can be used by all stratums.
In the next system startup, there are three options for init selection. Besides arch and ubuntu using systemd
, void Linux init system using runit
can be used.

In the next system startup, there are three options for init selection. Besides arch and ubuntu using systemd
, void Linux init system using runit
can be used.

System-related settings can be made in the bedrock.conf
file. For example, the default init can be changed, the timeout period can be shortened, the directory where the fonts are located, or the priority settings between the stratums can be made. Mirror servers can be changed for brl fetch
. For detailed information, you can use this link.
Summary and Conclusion
This system is completely productivity-oriented. There may be some security-related problems. The official page has some answers for those who have security concerns. However, if security is at the forefront for you and the features of multiple distributions are desired to be used together, it is more appropriate to use distributions such as Qubes.
Qubes virtualizes each OS to the next level. It is a system that aims to provide security through isolation. It recommends Whonix by default, but you can also install windows or fedora, Debian. Safety and productivity/speed are two conflicting concepts here. I think this distribution is a meta distribution to be used by distro-hoopers after the major 1.0.0 release. Even this version is free from many problems and lives a very stable user experience.
I think it may be very useful for developers who use Linux distribution as well. Creating a wide and powerful development environment sometimes may be very hard in a Linux distribution but this meta distribution allows us to use more different Linux distribution applications at the same time. In my opinion, it will increase the productivity of every developer, or any engineer who performs operational tasks.