Table of Contents
  • Home
  • /
  • Blog
  • /
  • Step By Step Procedure To Build A CBL-Mariner ISO Image!
December 8, 2023
|
5m

Step By Step Procedure To Build A CBL-Mariner ISO Image!


Step By Step Procedure To Build A Cbl Mariner Iso Image

Are you a developer working on Microsoft’s cloud platforms like Azure? Then, you should read this post. Microsoft has released a new open-source Linux project, ‘CBL-Mariner’, an internal Linux distribution for Microsoft’s cloud infrastructure as part of an open-source initiative. Well, this is not the first initiative project by Microsoft. It has contributed its investments in developing various Linux-based technologies, such as SONiCAzure Sphere OS, and Windows Subsystem for Linux (WSL). Now, you might want to know where should I download the CBL-Mariner ISO file. Microsoft didn’t release a bootable ISO file for the public. You have to build a CBL-Mariner ISO Image on your own. Let’s explore how to build a CBL-Mariner ISO Image in this demo.

Table of Contents

What Is CBL-Mariner?

Let’s clear the concept, CBL-Mariner is an open-source internal Linux distribution developed for Microsoft’s cloud infrastructure and edge products and services. It is not the OS developed for end-users like Ubuntu, Debian, and Mint Linux distributions. It is designed to provide a consistent platform for cloud services. Visit this git page to read more about CBL-Mariner.

Prerequisites To Build CBL-Mariner ISO Image:

Microsoft didn’t release installable files like its ISO, VHDX, or VMDK. We will show you how to build ISO images on your own and also share pre-built ISO images to make you more convenient. We are going to build a CBL-Mariner ISO image on Ubuntu Linux for demonstration purposes. Let’s quickly install the required packages on the Ubuntu on which we are going to build the CBL-Mariner ISO file.

Packages Required to Build CBL-Mariner ISO file:

  1. Ubuntu Linux or any popular distribution.

  2. Go Language

  3. Docker Engine

  4. make

  5. tar

  6. wget

  7. curl

  8. rpm

  9. qemu-utils

  10. golang-1.15-go

  11. genisoimage

  12. python-minimal

  13. bison

  14. gawk

  15. git

How to Build CBL-Mariner ISO Image?

  1. Run this command to add a backports repo to install the necessary version of Go on Ubuntu:

  2. $ sudo add-apt-repository ppa:longsleep/golang-backports
    $ sudo apt-get update

  3. Run this command to install make, tar, wget, curl, rpm, qemu-utils, golang-1.15-go, genisoimage, python-minimal3.8, bison, and gawk packages on Ubuntu:


    $ sudo apt -y install make tar wget curl rpm qemu-utils golang-1.15-go genisoimage python-minimal bison gawk

  4. Run this command to install pigz on Ubuntu. This is an optional package to install. It is recommended but not required to have:


    $
    sudo apt -y install pigz

  5. Create soft link of go inside user’s bin directory to fix go 1.15 link:


    $
    sudo ln -vsf /usr/lib/go-1.15/bin/go /usr/bin/go

  6. Run these commands to install the Docker engine on Ubuntu


    $ curl -fsSL https://get.docker.com -o get-docker.sh
    $ sudo sh get-docker.sh
    $ sudo usermod -aG docker $USER

    Note: Log out and Log in to save the changes to the user.

  7. Install git on Ubuntu if not installed:


    $ sudo apt install git

  8. Clone CBL-Mariner to your local disk:


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

  9. Check out the desired release branch. Sync to the latest stable build.


    $ git checkout 1.0-stable

  10. Change your directory to CBL-Mariner/toolkit/ and build ISO bootable image using this command:


    $ cd CBL-Mariner/toolkit/
    $ sudo make iso REBUILD_TOOLS=y REBUILD_PACKAGES=n CONFIG_FILE=./imageconfigs/full.json

    Note: This process may take 1 to 2 Hrs. Wait to complete the process.

Tutorial
Step 1. Run this command to add a backports repo to install the necessary version of Go on Ubuntu:

$ sudo add-apt-repository ppa:longsleep/golang-backports
$ sudo apt-get update

Step 2. Run this command to install make, tar, wget, curl, rpm, qemu-utils, golang-1.15-go, genisoimage, python-minimal3.8, bison, and gawk packages on Ubuntu:

$ sudo apt -y install make tar wget curl rpm qemu-utils golang-1.15-go genisoimage python-minimal bison gawk

Step 3. Run this command to install pigz on Ubuntu. This is an optional package to install. It is recommended but not required to have:


$
sudo apt -y install pigz

Step 4. Create a soft link of go inside the user’s bin directory to fix the go 1.15 link:


$
sudo ln -vsf /usr/lib/go-1.15/bin/go /usr/bin/go

Step 5. Run these commands to install the Docker engine on Ubuntu:

$ curl -fsSL https://get.docker.com -o get-docker.sh
$ sudo sh get-docker.sh
$ sudo usermod -aG docker $USER

Log out and Login after this to save the permission changes.

Step 6. Install git on Ubuntu if not installed:

$ sudo apt install git

How to Build CBL-Mariner ISO Image?

After installation of all the required packages. Let’s see how to build CBL-Mariner ISO Image.

Step 1. Clone CBL-Mariner to your local disk:

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

Step 2. Check out the desired release branch. Sync to the latest stable build.

$ git checkout 1.0-stable

Step 3. Change your directory to CBL-Mariner/toolkit/ and build ISO bootable image using this command:

$ cd CBL-Mariner/toolkit/
$ sudo make iso REBUILD_TOOLS=y REBUILD_PACKAGES=n CONFIG_FILE=./imageconfigs/full.json

Note: This process may take 1 to 2 Hrs. Wait to complete the process.

You will see bootable CBL-Mariner ISO Image inside /CBL-Mariner/out/images/full:

Download the Pre-Built CBL-Mariner ISO file:

We are going to share the CBL-Mariner ISO file which we have created. You can download the bootable CBL-Mariner ISO file from here.

CBL-Mariner ISO fileDownload

As promised, we have shown a step-by-step procedure to build a CBL-Mariner ISO image along with a prebuilt ISO file which would save you time to build a CBL-Mariner ISO from scratch.

Thanks for reading this tutorial post. Please visit our site to read more such interesting tutorials.

You may also like these articles:

Arun KL

Arun KL is a cybersecurity professional with 15+ years of experience in IT infrastructure, cloud security, vulnerability management, Penetration Testing, security operations, and incident response. He is adept at designing and implementing robust security solutions to safeguard systems and data. Arun holds multiple industry certifications including CCNA, CCNA Security, RHCE, CEH, and AWS Security.

Recently added

Tutorials

View All

Learn More About Cyber Security Security & Technology

“Knowledge Arsenal: Empowering Your Security Journey through Continuous Learning”

Cybersecurity All-in-One For Dummies - 1st Edition

"Cybersecurity All-in-One For Dummies" offers a comprehensive guide to securing personal and business digital assets from cyber threats, with actionable insights from industry experts.

Tools

Featured

View All

Learn Something New with Free Email subscription

Subscribe

Subscribe