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

Bedrock Linux 1.0beta2 Nyla


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

Bedrock Linux 1.0beta2 Nyla Stratum Setup Instructions

These are instructions for installing other Linux distributions as strata within Bedrock Linux 1.0beta2 Nyla.

See the tips, tricks and troubleshooting page after installing each of these for other advice about using the specific distribution as a stratum.

Any Linux Distribution

If there are no instructions below specific to a Linux distribution which you would like to make into a stratum for your Bedrock Linux install, you can usually fall back to installing the distribution through its normal installation means. Once it is installed, you may simply copy its root directory to /bedrock/strata/stratum-name. When installing the Linux distribution by its normal means, be very careful when partitioning, and be careful to avoid having the bootloader take over your system.

For example, if you install Slackware to a USB flash drive, you can mount the USB flash drive in Bedrock Linux and copy its contents to /bedrock/strata/slackware.

However, this method requires rebooting as well as raises the possibility of unintentionally wiping something important when partitioning or forcing you to reinstall your bootloader, and thus the distro-specific instructions described below may be preferable if available.

You may also be able to install a stratum distribution in a virtual machine which you can mount and copy the files out, or you can use a scripts or tools used to build containers such as LXC.

Debian-based Linux distributions

The essentials of Debian-based Linux distributions can be installed through a program called debootstrap. Debootstrap is a shell script which can be easily installed into most Debian-based Linux distributions, and is often available in the repositories of non-Debian-based Linux distributions, such as Fedora. While it is possible to install debootstrap (by first installing dpkg and pkgdetails) into just about any other Linux distribution as well, it is not covered here. Busybox's dpkg does not seem sufficient for debootstrap.

Boot into a Linux distribution which can run debootstrap, or use an existing stratum which can use debootstrap in Bedrock Linux if available. LiveCD/LiveUSBs such as Knoppix or an Ubuntu installer should work.

Ensure the pre-requisites for debootstrap are available. This can be done by installing debootstrap through the distribution's package manager (which should bring in its dependencies) if available. Next, download the .deb file for the debootstrap specific to stratum Linux distribution release you would like, or a newer debootstrap .deb from the same distribution. For example, for Debian Jessie, grab the file made available from here. If you are attempting to use debootstrap from a non-debian-based Linux distribution, convert the .deb file to the native package format with something such as the alien package.

Install the package. If on a debian-based system (as root):

dpkg -i debootstrap_VERSION.deb

Make a directory in which to put the target stratum Linux distribution. If you are doing this from something other than Bedrock, such as a LiveUSB/LiveCD, be sure to mount the appropriate partition which you would like to contain your stratum and create the directory in there.

mkdir /bedrock/strata/stratum-name

Use debootstrap to download and set up the target stratum Linux distribution.

debootstrap --arch architecture release path repository

For example, to install the (64-bit) x86_64 Debian jessie to /bedrock/strata/jessie using http://ftp.us.debian.org/debian:

It may take a bit to download and unpackage the various components.

Check to see if it created a non-blank /var/lib/dpkg/statoverride file, and if it did, delete the content (ie, leave a blank file in its place). See this troubleshooting item.

Don't forget to edit /etc/apt/sources.list and other stratum-specific settings.

Finally, create an entry in /bedrock/etc/strata.conf file as explained in the configuration page, such as:

[jessie]
framework = default
init = /lib/systemd/systemd

Arch Linux

There are three strategies to acquiring an Arch Linux stratum at this point in time. Follow any of the methods below to acquire the files for Arch Linux, placing them into /bedrock/strata/arch. Once you have done so, you may still have to set up pacman - continue reading below.

Once you have the files, you may still have to setup pacman's keys. Chroot into the stratum:

Run the following commands to setup pacman. It may speed things up to use your mouse and keyboard to help generate entropy.

When you have finished, run the following to clean up:

Edit the following two files to configure pacman to your liking:

Remove/comment out "CheckSpace" from /bedrock/strata/arch/etc/pacman.conf.

Finally, create an entry in /bedrock/etc/strata.conf file as explained in the configuration page, such as:

[arch]
framework = default
init = /lib/systemd/systemd

Yum-based distros (Fedora, Centos, Scientific Linux, OpenSUSE)

There is a utility called rinse which can be utilized to acquire various yum-based distros. Acquire rinse, either from its website (then manually acquiring its dependencies) or from a stratum's repository (e.g. Debian has it, Arch has it in AUR, etc). Then use it to acquire the desired files.

Then create an entry in /bedrock/etc/strata.conf file as explained in the configuration page, such as:

[centos7]
framework = default
init = /lib/systemd/systemd

Gentoo Linux

Gentoo Linux provides a tarball of the userland, which makes installing it as a Bedrock Linux stratum fairly simple. Note that this is a quick overview of the steps required in getting Gentoo working as a Bedrock Linux stratum. For more information on configuring and using Gentoo, consult the Gentoo Handbook.

To download the tarball, navigate to the Gentoo mirrorlist and choose the mirror that is closest to you. Once you've followed the link to the mirror, navigate to releases/amd64/autobuilds/current-stage3-arch for 64-bit, or releases/x86/autobuilds/current-stage3-arch for 32-bit, and download the appropriate stage3 tarball to the directory that Gentoo is being installed into.

Unpack the tarball.

The next step is to configure /bedrock/strata/gentoo/etc/portage/make.conf file so that you can compile the appropriate utilities using portage. For information on how to optimize portage for comiplation on your machine, consult Gentoo's Compilation Optimization Guide.

After configuring your compilation optimization variables, it is time to set up the system so that you can chroot into it to finish the installation process.

You will now install portage while inside the Gentoo chroot.

Now, before installing anything with Gentoo, it is recommended that you choose a system profile. This will set up default values for your USE variable, among other things. You can view the available profiles with

and set it by selecting the number associated with the desired configuration

Finally, you may configure your USE flags in /etc/portage/make.conf. USE flags are one of the most powerful features in Gentoo. They are keywords that allow you to tell portage what dependencies and you would like to allow or block from your system. For information on how to use USE flags, consult the USE flags section of the Gentoo Handbook.

It is recommended that you update your system to be compatible with your newly configured USE flags. However before recompiling your system, you may want to emerge gentoolkit, which provides the revdep-rebuild utility. This will allow you to rebulid the applications that were dynamically linked to the now-removed software but don't require them anymore.

Now that Gentoo is fully set up, exit the chroot and remove the mounts

Finally, create an entry in /bedrock/etc/strata.conf file as explained in the configuration page, such as:

[gentoo]
framework = default
init = /sbin/init

Void Linux

Void Linux provides a static version of its package manager, xbps, which can be used to bootstrap a stratum.

First, download a static build of xbps for your CPU architecture. Links to xbps-static for various architectures are listed here.

Then, extract it into its own directory

Next, as root, tell it to acquire the files:

Clean up:

Finally, create an entry in /bedrock/etc/strata.conf file as explained in the configuration page, such as:

[void]
framework = default
init = /sbin/init

CRUX

CRUX's installation ISO includes a static build of the CRUX pkgadd utility. This can be used to install the CRUX system from packages also included on the ISO.

First, download the installation ISO from one of the mirrors.

Next, as root, mount it so that the files are accessible:

Then extract the package manager:

Make some required files and directories in preparation for pkgadd.

Install the packages:

Clean up:

Configure CRUX's /etc/rc.conf at /bedrock/strata/crux/etc/rc.conf. Be sure to set the TIMEZONE to /bedrock/etc/localtime and HOSTNAME to the desired hostname.

Finally, create an entry in /bedrock/etc/strata.conf file as explained in the configuration page, such as:

[crux]
framework = default
init = /sbin/init

Alpine Linux

Alpine Linux provides a static version of its package manager, apk, which can be used to bootstrap a stratum.

First, acquire a static copy of the apk from one of the mirrors. The package will be available at mirror-url/latest-stable/main/arch/apk-tools-static-version.apk

Extract the package manager:

Next, as root, tell it to acquire the files:

Configure apk:

Clean up:

Enable desired openrc services, such as hostname:

Finally, create an entry in /bedrock/etc/strata.conf file as explained in the configuration page, such as:

[alpine]
framework = default
init = /sbin/init