{"id":2148,"date":"2021-07-21T23:39:14","date_gmt":"2021-07-22T05:39:14","guid":{"rendered":"https:\/\/www.itayemi.com\/blog\/?p=2148"},"modified":"2021-07-22T14:53:37","modified_gmt":"2021-07-22T20:53:37","slug":"building-microsoft-cbl-mariner-linux-iso","status":"publish","type":"post","link":"https:\/\/www.itayemi.com\/blog\/2021\/07\/21\/building-microsoft-cbl-mariner-linux-iso\/","title":{"rendered":"Building Microsoft CBL-Mariner (Linux) ISO"},"content":{"rendered":"\n<p>NOTE: I was able to build the ISO on Ubuntu 20.04 as the work platform (I got lots of errors with Ubuntu 18.04)<\/p>\n\n\n\n<p>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)<\/p>\n\n\n\n<p>root@ub2004:\/wip# add-apt-repository ppa:longsleep\/golang-backports<br>root@ub2004:\/wip# apt-get update<br>root@ub2004:\/wip# apt -y install -y make tar wget curl rpm qemu-utils golang-1.15-go genisoimage python-minimal bison gawk<br>root@ub2004:\/wip# apt -y install pigz<br>root@ub2004:\/wip# ln -vsf \/usr\/lib\/go-1.15\/bin\/go \/usr\/bin\/go<br>root@ub2004:\/wip# curl -fsSL https:\/\/get.docker.com -o get-docker.sh<br>root@ub2004:\/wip# sh get-docker.sh<br>root@ub2004:\/wip# usermod -aG docker $USER<\/p>\n\n\n\n<p>root@ub2004:\/wip# git clone https:\/\/github.com\/microsoft\/CBL-Mariner.git<br>root@ub2004:\/wip# pushd CBL-Mariner\/toolkit<br>root@ub2004:\/wip\/CBL-Mariner\/toolkit# git checkout 1.0-stable<br>root@ub2004:\/wip\/CBL-Mariner\/toolkit# make package-toolkit REBUILD_TOOLS=y<br>root@ub2004:\/wip\/CBL-Mariner\/toolkit# cd ..<br>root@ub2004:\/wip\/CBL-Mariner# cp out\/toolkit-1.0.20210722.0141-x86_64.tar.gz .<br>root@ub2004:\/wip\/CBL-Mariner# tar -xzvf toolkit-*.tar.gz<br>root@ub2004:\/wip\/CBL-Mariner# cd toolkit\/<br>root@ub2004:\/wip\/CBL-Mariner\/toolkit# make iso REBUILD_TOOLS=y REBUILD_PACKAGES=n CONFIG_FILE=.\/imageconfigs\/full.json<\/p>\n\n\n\n<p>root@ub2004:\/wip\/CBL-Mariner\/toolkit# du -sh \/wip\/CBL-Mariner\/out\/images\/full\/full-1.0.20210722.0200.iso<\/p>\n\n\n\n<p>678M    \/wip\/CBL-Mariner\/out\/images\/full\/full-1.0.20210722.0200.iso<\/p>\n\n\n\n<p>I was able to install the ISO on VirtualBox.<\/p>\n\n\n\n<p>You can follow the steps on this page to install the output ISO on VirtualBox:  https:\/\/linuxiac.com\/microsoft-cbl-mariner-linux-1\/<\/p>\n\n\n\n<p><strong>VMWare OVFTools required to build OVA CBL-mariner images (VHDX, OVA\/VMDK)<\/strong><\/p>\n\n\n\n<p>&#8211;&nbsp;download 64-bit Linux VMWare-tools from&nbsp;<a href=\"https:\/\/my.vmware.com\/group\/vmware\/downloads\/details?downloadGroup=OVFTOOL441&amp;productId=646\">https:\/\/my.vmware.com\/group\/vmware\/downloads\/details?downloadGroup=OVFTOOL441&amp;productId=646<\/a><br>#&nbsp;chmod a+x VMware-ovftool-4.4.1-16812187-lin.x86_64.bundle<br>#&nbsp;.\/VMware-ovftool-4.4.1-16812187-lin.x86_64.bundle<br>(NOTE: &#8220;.\/VMware-ovftool-4.4.1-16812187-lin.x86_64.bundle &#8211;uninstall-product vmware-ovftool&#8221; to uninstall)<\/p>\n\n\n\n<p>&#8211; # make image REBUILD_TOOLS=y REBUILD_PACKAGES=n CONFIG_FILE=.\/imageconfigs\/core-ova.json<br>(builds OVA, VMDK, and VMX files in CBL-Mariner\/out\/images\/ )<\/p>\n\n\n\n<p><br>&#8211; # make image REBUILD_TOOLS=y REBUILD_PACKAGES=n CONFIG_FILE=.\/imageconfigs\/core-efi.json<br>(builds a 381MB VHDX file in CBL-Mariner\/out\/images\/core-efi\/ )<a href=\"https:\/\/confluence.oraclecorp.com\/confluence\/display\/~ayotunde.itayemi@oracle.com\/Building+Microsoft+CBL-Mariner+%28Linux%29+ISO\"><\/a><\/p>\n\n\n\n<p>NOTE: in the VMDK file, the password field for the root user in the \/etc\/shadow file is set to &lt;NULL>. Which meant that after creating a VM with the VMDK, I couldn&#8217;t login after I booted up the CBL-Mariner. I had to slave the VMDK to another VM, in order to manually change the &lt;NULL> to the encrypted value of a known password. Alternatively, you can use the VMware disk tool to mount the VMDK after generating it on the Ubuntu instance, and edited the \/etc\/shadow file. On the other hand, the username and password for the CBLMarinerDemo is mariner_user\u00a0 and p@ssw0rd<\/p>\n","protected":false},"excerpt":{"rendered":"<p>NOTE: I was able to build the ISO 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 &hellip; <a href=\"https:\/\/www.itayemi.com\/blog\/2021\/07\/21\/building-microsoft-cbl-mariner-linux-iso\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":336,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[1312,1313,1315,1314,1282,1316],"class_list":["post-2148","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-cbl-mariner","tag-common-base-linux","tag-microsoft-linux","tag-ubuntu","tag-virtualbox","tag-vmware-ovftools"],"_links":{"self":[{"href":"https:\/\/www.itayemi.com\/blog\/wp-json\/wp\/v2\/posts\/2148","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.itayemi.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.itayemi.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.itayemi.com\/blog\/wp-json\/wp\/v2\/users\/336"}],"replies":[{"embeddable":true,"href":"https:\/\/www.itayemi.com\/blog\/wp-json\/wp\/v2\/comments?post=2148"}],"version-history":[{"count":4,"href":"https:\/\/www.itayemi.com\/blog\/wp-json\/wp\/v2\/posts\/2148\/revisions"}],"predecessor-version":[{"id":2153,"href":"https:\/\/www.itayemi.com\/blog\/wp-json\/wp\/v2\/posts\/2148\/revisions\/2153"}],"wp:attachment":[{"href":"https:\/\/www.itayemi.com\/blog\/wp-json\/wp\/v2\/media?parent=2148"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.itayemi.com\/blog\/wp-json\/wp\/v2\/categories?post=2148"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.itayemi.com\/blog\/wp-json\/wp\/v2\/tags?post=2148"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}