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 ...
Table of Contents
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
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:
- Open VirtualBox.
- Click on the button New to create a new VM.
- 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.
- 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.
- 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.
- Go to Bonded warehouse, 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.
- 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:
- 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]
- 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.
- The next screen is the license terms to accept.
- Then comes the assistant hard drive partitioning. There you have to create the necessary partitions or leave the ones that come by default.
- Turn to choose the hostname, as well as the username and password. You can put whatever you want, but remember it.
- CBL-Mariner now begins the actual installation. Will start to install packages. And when it's done, reboot the virtual machine.
- When you start you will see the Login, where you have to put the login data (name and password).
- Ya you can use CBL-Mariner as you would with your local distro. And yes, unfortunately it starts in text mode ...