CBL-Mariner 1.0 is the first stable release of this new Linux distro developed by Microsoft for internal use. Learn how to install it on VirtualBox.
Definately, Microsoft has shown much more love for Linux in recent years. Windows Subsystem for Linux is a clear example of this.
Microsoft’s Linux System Group is the team at Microsoft which created the WSL2. And now the team recently released the first stable version of its own Linux distro called CBL-Mariner. If you were wondering, CBL stands for Common Base Linux. The distro is used by Microsoft engineering teams to build its cloud infrastructure and edge products and services.
CBL-Mariner consumes limited disk and memory resources. The lightweight characteristics of CBL-Mariner also provides faster boot times and a minimal attack surface.
However, let’s make an important clarification: CBM-Mariner is not a general purpose Linux disro. Its purpose is to be used as an internal lightweight Linux distro for Microsoft’s engineering teams into the Azure infrastructure.
How to Install Microsoft CBL-Mariner Linux
1. Build your own installation ISO image
First, let’s install some prerequisites we’ll need for building the ISO image:
sudo apt install make tar wget curl rpm qemu-utils golang-go genisoimage python2-minimal bison gawk
Next, clone the CBL-Mariner GitHub repo:
git clone https://github.com/microsoft/CBL-Mariner.git
Cloning into 'CBL-Mariner'... remote: Enumerating objects: 32298, done. ... Receiving objects: 100% (32298/32298), 506.43 MiB, done. Resolving deltas: 100% (15482/15482), done.
Finally, enter into
CBL-Mariner/toolkit directory and build the installation ISO image. The following builds a bootable ISO image from precompiled RPMs:
cd CBL-Mariner/toolkit sudo make iso REBUILD_TOOLS=y REBUILD_PACKAGES=n CONFIG_FILE=./imageconfigs/full.json
... WARN 99.64% done, estimate finish Mon Jul 12 21:58:14 2021 WARN Total translation table size: 2048 WARN Total rockridge attributes bytes: 29673 WARN Total directory bytes: 71680 WARN Path table size(bytes): 222 WARN Max brk space used 44000 WARN 346267 extents written (676 MB)
Done. You’ll find the ISO file in the
../out/images/full/ directory under a name such as
2. Install Microsoft CBL-Mariner Linux on VirtualBox
Create a new VirtualBox VM. Configure the hardware with 1 CPU, 1GB of RAM and an 8GB disk. This would be enough for a test. Select a start-up disk, in our case
full-1.0.20210712.2155.iso, and begin the installation process following the screens shown below.
2.1 Choose ‘Graphical Installer‘ option.
2.2 Select ‘CBL-Mariner Full‘ for installation type.
2.3 Accept terms and conditions.
2.4 Select ‘Erase disk‘ option. Of course, there is an option to manually partition the disk.
2.5 Enter your preferred name, username and password. Note that this user will have root/sudo privilege. When you’re done, just hit the ‘Install‘ button.
2.6 Wait for installation to complete…
2.7 As you can see on the image below, the installation process is extremely fast.
Congratulations! You have successfully managed to install Microsoft CBL-Mariner Linux on VirtualBox. Now just login with previously created user credentials.
As you can see, the CBL-Mariner package system is RPM-based. It use
tdnf (Tiny DNF) which is a C implementation of the DNF package manager without Python dependencies. Alternatively, you can also use the well-know
dnf command for the package management.