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
Microsoft made CBL-Mariner available on GitHub under an MIT License. While the source code is available, there are no ISO images, but you can build your own. Here’s how to do it by using Ubuntu.
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
Code language: PHP (php)
Cloning into 'CBL-Mariner'...
remote: Enumerating objects: 32298, done.
...
Receiving objects: 100% (32298/32298), 506.43 MiB, done.
Resolving deltas: 100% (15482/15482), done.
Code language: JavaScript (javascript)
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[0001] 99.64% done, estimate finish Mon Jul 12 21:58:14 2021
WARN[0001] Total translation table size: 2048
WARN[0001] Total rockridge attributes bytes: 29673
WARN[0001] Total directory bytes: 71680
WARN[0001] Path table size(bytes): 222
WARN[0001] Max brk space used 44000
WARN[0001] 346267 extents written (676 MB)
Code language: CSS (css)
Done. You’ll find the ISO file in the ../out/images/full/
directory under a name such as full-1.0.20210712.2155.iso
.
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.
Unable to build on Fedora 34 – I believe I have all of the prerequisites – get the following error:
INFO[0000] Enabling update repo
INFO[0000] Creating cloning environment to populate (/home/work/Mariner/CBL-Mariner/build/imagegen/full/package_repo)
INFO[0004] Initializing local RPM repository
INFO[0005] Initializing repository configurations
INFO[0005] Cloning: [hyperv-daemons:C:”V:”,C2:”V2:” build-essential:C:”V:”,C2:”V2:” cmake:C:”V:”,C2:”V2:” createrepo_c:C:”V:”,C2:”V2:” curl-devel:C:”V:”,C2:”V2:” device-mapper:C:”V:”,C2:”V2:” flex:C:”V:”,C2:”V2:” fuse-devel:C:”V:”,C2:”V2:” git:C:”V:”,C2:”V2:” golang:C:”V:”,C2:”V2:” iputils:C:”V:”,C2:”V2:” less:C:”V:”,C2:”V2:” linux-firmware:C:”V:”,C2:”V2:” net-tools:C:”V:”,C2:”V2:” ninja-build:C:”V:”,C2:”V2:” parted:C:”V:”,C2:”V2:” pciutils:C:”V:”,C2:”V2:” python3-pip:C:”V:”,C2:”V2:” tar:C:”V:”,C2:”V2:” texinfo:C:”V:”,C2:”V2:” usbutils:C:”V:”,C2:”V2:” wget:C:”V:”,C2:”V2:” qemu-kvm:C:”V:”,C2:”V2:” qemu-img:C:”V:”,C2:”V2:” shim:C:”V:”,C2:”V2:” grub2-efi-binary:C:”V:”,C2:”V2:” ca-certificates:C:”V:”,C2:”V2:” cronie:C:”V:”,C2:”V2:” logrotate:C:”V:”,C2:”V2:” core-packages-base-image:C:”V:”,C2:”V2:” initramfs:C:”V:”,C2:”V2:” hyperv-daemons:C:”V:”,C2:”V2:” shim:C:”V:”,C2:”V2:” grub2-efi-binary:C:”V:”,C2:”V2:” ca-certificates:C:”V:”,C2:”V2:” cronie:C:”V:”,C2:”V2:” logrotate:C:”V:”,C2:”V2:” core-packages-base-image:C:”V:”,C2:”V2:” initramfs:C:”V:”,C2:”V2:” kernel:C:”V:”,C2:”V2:” kernel:C:”V:”,C2:”V2:” grub2-pc:C:”V:”,C2:”V2:”]
PANI[0005] Failed to clone RPM repo. Error: exit status 254
panic: (*logrus.Entry) 0xc0000a4230
Can this be fixed? Thanks.
Creating Microsoft CBL-Mariner (Linux) ISO
——————————————
It only worked on Ubuntu 20.04 as the work platform (I got lots of errors with Ubuntu 18.04)
The only guide that worked for me is: https://www.techrepublic.com/article/microsoft-linux-is-not-what-you-think-or-hoped-it-would-be/ but I made some changes to the procedure (i.e., I built CBL-Mariner instead of CBL-MarinerDemo)
———————
root@ub2004:/wip# add-apt-repository ppa:longsleep/golang-backports
root@ub2004:/wip# apt-get update
root@ub2004:/wip# apt -y install -y make tar wget curl rpm qemu-utils golang-1.15-go genisoimage python-minimal bison gawk
root@ub2004:/wip# apt -y install pigz
root@ub2004:/wip# ln -vsf /usr/lib/go-1.15/bin/go /usr/bin/go
root@ub2004:/wip# curl -fsSL https://get.docker.com -o get-docker.sh
root@ub2004:/wip# sh get-docker.sh
root@ub2004:/wip# usermod -aG docker $USER
root@ub2004:/wip# git clone https://github.com/microsoft/CBL-Mariner.git
root@ub2004:/wip# pushd CBL-Mariner/toolkit
root@ub2004:/wip/CBL-Mariner/toolkit# git checkout 1.0-stable
root@ub2004:/wip/CBL-Mariner/toolkit# make package-toolkit REBUILD_TOOLS=y
root@ub2004:/wip/CBL-Mariner/toolkit# cd ..
root@ub2004:/wip/CBL-Mariner# cp out/toolkit-1.0.20210722.0141-x86_64.tar.gz .
root@ub2004:/wip/CBL-Mariner# tar -xzvf toolkit-*.tar.gz
root@ub2004:/wip/CBL-Mariner# cd toolkit/
root@ub2004:/wip/CBL-Mariner/toolkit# make iso REBUILD_TOOLS=y REBUILD_PACKAGES=n CONFIG_FILE=./imageconfigs/full.json
root@ub2004:/wip/CBL-Mariner/toolkit# du -sh /wip/CBL-Mariner/out/images/full/full-1.0.20210722.0200.iso
678M /wip/CBL-Mariner/out/images/full/full-1.0.20210722.0200.iso
———————
I was able to install the ISO on VirtualBox.
Hello everyone, i want to install light environment like xfce or i3 on cbl mariner if someone is intserested to help just pm me
thank you in advance
HI, I tried install but err0 version ‘GLIBC_2.32 not found (required by ./liveinstaller
Thank you. I will try this tuto, but I think is the same. I didn’t see the difference.
follow this tuto https://linuxiac.com/microsoft-cbl-mariner-linux-1/#comment-3375
no problem
Can Microsoft software run on this distro
for me this guide is missing a few steps (just sharing):
sudo add-apt-repository ppa:longsleep/golang-backports
sudo apt-update
.
.
.
git clone https://github.com/microsoft/CBL-Mariner.git
pushd CBL-Mariner/toolkit
For me, I could create the .iso file in ubuntu and then could install in virtualbox using command line as it did not work with GUI installation.
i think you should add `git` to the list of prerequisites
First of all, building ISO image is not possible at this moment. Ubuntu version required is 18.04, and fulfilling requirements is not possible due to not secure repos at Ubuntu side. So it seems we need to wait until there will be ISO image available for download.
Hi Mirlan,
Sorry to hear that you had issue creating the ISO file. According to the above requirements, the ISO file builds smoothly under Ubuntu 20.04.
Its creation has been also successfully tested on CentOS 8, but this is outside the scope of the topic.
eu fiz os procedimento deu tudo certo ubuntu 20.04 mas quando digitei o comando final pr criar a iso deu varios erros clonou o git de boa mas deu ero na hora de criar porque alguem que fez e deu certinho nao postar essa iso ai rapaz o povo é ruim em
for now can’t find package xorg, lightdm, xfce, if someone have any idea just message me please
i also try to build with debian 11, its alright
Great. Thanks for sharing it with us.
Thank you kind sir, Microsoft GNU/Linux distro is so cool.
i just finish to build the iso im curious to know if we can install xfce
Unfortunately you cannot. I have been working with CBL Mariner Linux GUI for the past several months and the most I can get is the Xterm windows and xclock. Since the Mariner repos do not have prepackaged xfce4 or other de packages pre-installed, you may have to download all the source code packages to xfce which is very problematic (I tried) and time consuming (over 500 dependencies?). Best of luck!.