CBL-Mariner: How to Install and Test Microsoft Linux System

CBL-Mariner

Microsoft released a few days ago a Linux-based operating system that you can download and install for free like any other distro. However, the launch was not announced with great fanfare, rather it was quite discreet, with hardly any noise ... His name is CBL-Mariner (Common Base Linux Mariner) and here you will learn step by step how to download and install it (in a virtual machine).

The truth is that the Redmond company surprised at the time with some open source releases, or with the purchase of GitHub, as well as with the integration of the Linux subsystem in its Windows (WSL), or with the support for Linux of some of its programs, as well as that operating system for network devices also based on Linux and called SONiC ...

What is CBL-Mariner?

As well indicated in the GitHub page, it is a full Linux operating system developed and maintained by Microsoft itself. Its goal is not to be just another general-purpose GNU / Linux distribution, but rather to serve another purpose. And it is that the Windows company needs it as a basis for WSL2, that is, the new Linux subsystem for Windows 11 and Windows 365 with which graphical applications can also be run.

CBL-Mariner previously existed, and was being used internally by Microsoft for its infrastructure of the Azure cloud. In addition, the Redmond company has been working a lot on the default security of this operating system, with a hardened kernel, signed updates, ASLR, compiler-based hardening, tamper-proof registers, and many other features.

Includes a small set of basic packages. It is also known to employ RPM parcel. Specifically, its compilation system allows to generate separate .rpm based on SPEC files and source code. Also images of the monolithic system generated by an rpm-ostree toolkit. As for updates, they can apply to specific packages or the entire system.

All technologies and code developed by Micorosoft for CBL-Mariner are open source, and have been released under MIT license.

How to download and install CBL-Mariner on a virtual machine

virtualbox

To explain step by step how you can download and install CBL-Mariner To test it, I am going to use an Ubuntu distribution and the VirtualBox virtualization software as a base. It can be done in any other distribution and with other software for virtual machines if you wish. The steps will be very similar in any case.

1-Download and generate the ISO

The first thing to do is download from the CBL-Mariner repository and then generate ourselves the ISO image, as there is not yet an image to download directly. To do this, you need a series of installed packages, many of them sure you already have them, but just in case, run the following command:

<br data-mce-bogus="1">

sudo apt-get install git make tar wget curl rpm qemu-utils golang-go genisoimage python-minimal bison gawk<br data-mce-bogus="1">

Once you have the necessary software installed, now you have to clone the repository from GitHub with the CBL-Mariner code locally, that is, on our computer. And this is done as you already well know:

<br data-mce-bogus="1">

git clone https://github.com/microsoft/CBL-Mariner.git

cd CBL-Mariner<br data-mce-bogus="1">

git checkout 1.0-stable<br data-mce-bogus="1">

Once downloaded and accessed the directory that has been created locally, the next thing is to access a specific directory to generate the ISO from there for startup:

<br data-mce-bogus="1">

cd toolkit<br data-mce-bogus="1">

sudo make iso REBUILD_TOOLS=y REBUILD_PACKAGES=n CONFIG_FILE=./imageconfigs/full.json<br data-mce-bogus="1">

When the process is finished, you will have the ISO file available in the directory ../out/images/full/.

2-Install CBL-Mariner in a VM

Now that you have the ISO image, you can install CBL-Mariner on a virtual machine. To do this, you can use Oracle VirtualBox, which is free. Once you have installed the necessary software for virtualization (you can download and install from that link or also from the repos of your distro, where it is also available), the following is to follow these steps:

  1. Open VirtualBox.
  2. Click on the button New to create a new VM.
  3. Now start the virtual machine creation wizard. Put the name you want and in type choose "Linux", and version "Other Linux (64-bit)". And press next.
  4. Then he will ask you the requirements of virtualized hardware. For CBL-Mariner you must configure at least 1 CPU, 1GB of RAM, and 8GB of disk. If you use a little more RAM and CPU it will work better, so it would be a good idea. Go to next until completing the wizard.
  5. The virtual machine is already generated. Now that you are back on the main VirtualBox screen, you can right-click the entry that appears with the name you have given it and then select Configuration on the menu. You can also select the entry and click the upper Settings button.
  6. Go to Storage, and from there on the icon of the optical disk (Empty) you have to click on Optical Drive and choose "Select a disk file" to be able to load the ISO image. And in the browser that will appear, select where you have the ISO that you generated in the previous step.
  7. It's time Start the virtual machine with CBL-Mariner.

3-Install the system in the MV

Once you have started the virtual machine, it will start up and after a few moments it will show you a menu to installation. The steps you must follow are:

  1. Choose the option "Graphical Installer" for graphical installation. There are also options for text mode, but the graphic is better. And once selected, press Next. [you have to move through the menu with the keyboard arrows and ENTER to select]
  2. Now you will see an installer very similar to that of any other distro. In the Installation Type menu: you have to choose «CBL-Mariner Full » for full installation. In any case, both in Full and Core, as it hardly includes packages, it will be fast.
  3. The next screen is the license terms to accept.
  4. Then comes the assistant hard drive partitioning. There you have to create the necessary partitions or leave the ones that come by default.
  5. Turn to choose the hostname, as well as the username and password. You can put whatever you want, but remember it.
  6. CBL-Mariner now begins the actual installation. Will start to install packages. And when it's done, reboot the virtual machine.
  7. When you start you will see the Login, where you have to put the login data (name and password).
  8. Ya you can use CBL-Mariner as you would with your local distro. And yes, unfortunately it starts in text mode ...

4 comments, leave yours

Leave a Comment

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

*

*

  1. Responsible for the data: AB Internet Networks 2008 SL
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   bengiguy said

    is giving command error nao found na linha
    sudo make iso REBUILD_TOOLS = and REBUILD_PACKAGES = n CONFIG_FILE =. / imageconfigs / full.json
    sudo: make: command not found

    1.    RAZ0229 said

      Try running make without sudo

  2.   Luca said

    it doesn't work with or without sudo ..

  3.   chris said

    error by building iso:
    go: gonum.org/v1/gonum@v0.6.2: unrecognized import path "gonum.org/v1/gonum" (https fetch: Get https://gonum.org/v1/gonum?go-get=1:Not Implemented)
    ...
    go: error loading module requirements

    any solutions for that?