CBL-Mariner Linux 1.0 Released by Microsoft, Here’s How to Install it

Believe or not, Microsoft own Linux distro.

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.gitCode 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.

Installation Welcome Screen

2.2 Select ‘CBL-Mariner Full‘ for installation type.

CBL-Mariner Installation Wizard

2.3 Accept terms and conditions.

Accept Terms and Conditions

2.4 Select ‘Erase disk‘ option. Of course, there is an option to manually partition the disk.

CBL-Mariner Partitioning

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.

CBL-Mariner System Configuration

2.6 Wait for installation to complete…

Installation in progress...

2.7 As you can see on the image below, the installation process is extremely fast.

Microsoft CBL-Mariner Linux Successfully Installed

Congratulations! You have successfully managed to install Microsoft CBL-Mariner Linux on VirtualBox. Now just login with previously created user credentials.

Microsoft CBL-Mariner Linux Started

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.

Bobby Borisov

Bobby Borisov

Bobby, an editor-in-chief at Linuxiac, is a Linux professional with over 20 years of experience. With a strong focus on Linux and open-source software, he has worked as a Senior Linux System Administrator, Software Developer, and DevOps Engineer for small and large multinational companies.

Think You're an Ubuntu Expert? Let's Find Out!

Put your knowledge to the test in our lightning-fast Ubuntu quiz!
Ten questions to challenge yourself to see if you're a Linux legend or just a penguin in the making.

1 / 10

Ubuntu is an ancient African word that means:

2 / 10

Who is the Ubuntu's founder?

3 / 10

What year was the first official Ubuntu release?

4 / 10

What does the Ubuntu logo symbolize?

5 / 10

What package format does Ubuntu use for installing software?

6 / 10

When are Ubuntu's LTS versions released?

7 / 10

What is Unity?

8 / 10

What are Ubuntu versions named after?

9 / 10

What's Ubuntu Core?

10 / 10

Which Ubuntu version is Snap introduced?

The average score is 68%

19 Comments

      • 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!.

  1. 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.

      • for now can’t find package xorg, lightdm, xfce, if someone have any idea just message me please

      • 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

  2. 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.

  3. 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

  4. 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.

  5. 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.

Leave a Reply

Your email address will not be published. Required fields are marked *