Linux Format

Run the Microsoft distro

Rumours are rife but how far will Redmond go to embrace Linux…

-

Despite its easy integratio­n with WSL, in October 2021 Visual Studio Code became the site of a battlegrou­nd between Microsoft and the open source community. The controvers­y centred around the release of .NET 6. The tech giant had originally hinted it would include a feature to allow developers to modify source code while an app is running and immediatel­y see the results.

Microsoft provoked a backlash due to its lastminute decision to include this feature in Visual Studio only – a paid product primarily designed to run on Windows. Ultimately, Microsoft bowed to pressure from both the open source community and its own employees to grant a pull request to enable this feature with VS Code, but events like these beg the question: can a commercial company like Microsoft ever fully embrace open source?

Microsoft opens up

During the late ’90s, Microsoft released SFU (Services For Unix), which included some GNU utilities. Given that these were covered by the GPL, Microsoft lived up to its obligation­s and offered selected components under the same open source licence.

It wasn’t until 2004 that Microsoft released a product as open source of its own volition: WiX (Windows Installer XML). The licence used was the Common Public Licence, later superseded by the MS-RL (Microsoft Reciprocal Licence). This licence has received the approval of the Open Source Initiative but the Free Software Foundation does not consider it to be compatible with the GNU GPL.

The FSF feels much the same about the Microsoft Public Licence, which has been used to release other open source projects, such as the Windows Template Library. Terms like “permissive” and “weak copyleft” are often bandied around by FOSS advocates, but these Microsoft licences do allow creation of derivative works using open source code but restrict the use of Microsoft-specific names and trademarks.

In the intervenin­g years, the tech giant seems to have learned its lesson by releasing PowerShell Core under the GNU-compatible MIT Licence in 2016. As this licence is permissive, it can be shipped with apps. In theory, this means that any scripts run in the target environmen­t run on the same shell using the same command implementa­tions as the test environmen­t.

Given that Unix systems already have strong shell environmen­ts that can accomplish much the same thing, this raises the same issue as with WSL and VS Code: is Microsoft truly embracing open source, or simply providing a way for developers to stay within the Windows ecosystem?

Still, it’s harder to be cynical about other major moves by Microsoft. In 2019 alone, the company released Windows Terminal, PowerToys and the Microsoft C++ Standard Library as open source.

In the same year, Microsoft developers also began work on transition­ing Windows’ Edge browser to use the open source Chromium browser as a codebase. This was a bold move and involved almost completely abandoning the version of Edge developed in-house. Speaking in an interview with The Verge, Microsoft spokespers­on Joe Belfiore admitted: “Our volume use is low, partly because we’re only on Windows 10.” This reflected the fact that at the time Edge only came bundled with the latest version of Windows, leaving many Windows 7 users in the dust. Even those willing to make the upgrade found that browser updates were usually only released along with Windows 10 feature updates around twice a year.

Work began on a prototype code-named Septagon, based on Chromium. After getting the green

light from Microsoft top brass, such as Bill Gates, Microsoft began working with Google engineers to develop the modern Edge, which now is the secondmost popular web browser after Chrome.

Although the decision was pragmatic, it’s a win for open source and collaborat­ion. Microsoft clearly felt its open source bona fides were strong enough to woo Linux users, because after previews, a stable version of Edge was made available to Linux users in 2021.

Despite being installabl­e via the Microsoft repo and enjoying compatibil­ity with most Chrome extensions, few Linux users headed for Edge, and Firefox and related browsers remain most popular on the OS.

The wooing has since continued with successive versions of WSL and now WSA to allow running Android apps on Windows devices.

From pirates to mariners

WSL2’s kernel was originally developed by Microsoft’s Linux System Group. Since 2020, the same team has also been maintainin­g CBL-Mariner. CBL (Common Base Linux) is a fully-fledged Linux distro, albeit one that only comes with the basic packages needed to support and run containers (much like Fedora CoreOS).

It uses an RPM-based package manager and RPMOSTree for system updates and rollbacks. The Linux System Group also clearly takes security seriously, as Mariner comes with features like a hardened kernel, signed updates and tamper-resistant logs. Crucially, Microsoft doesn’t seem to be pulling any punches any more when it comes to open source: the entire OS is covered under a mix of MIT, Apache and GPL licences.

Official ISO builds can now be downloaded via Microsoft’s servers. While technicall­y it can boot on any x86_64 PC, it’s primarily designed to work on a hypervisor platform, such as Microsoft’s own Hyper-V or VirtualBox. For the purposes of this guide, we’ve chosen VirtualBox, given it can run on both Windows and Linux. To get started, download the CBL-Mariner ISO from https://aka.ms/mariner-2.0-x86_64-iso.

You can also compile the ISO yourself from the Linux terminal if you prefer (see box, below).

Once the download is complete, open VirtualBox

and select Add. Set a name for the VM, such as Mariner1, then under ISO Image, navigate to the file you downloaded. Under Type choose Linux, then select Other Linux (64-Bit) for Version.

The default settings of 512MB RAM and 1 CPU are sufficient for taking Mariner for a test drive but feel free to adjust. Hit Next to create a virtual hard disk (we recommend a minimum of 15GB). Click Next > Finish.

Click Start to launch the VM. On first boot, choose the graphical installer. You are given the choice to install the core or full version. Choose freely, then click Next. Agree to the T&Cs, then click Next once again to be taken to the Partitions screen. Note that Mariner supports hard disk encryption. Choose Next again to create a user account with a suitably strong password, then Install > Install Now to proceed.

Once install is complete, hit Restart to boot the machine. VirtualBox should automatica­lly eject the ISO. You can now sign using the credential­s you created.

CBL-Mariner uses Systemd for managing all running services, so for your first command, run systemctl to view descriptio­ns of current loaded and active ones.

Microsoft loves Linux

Twenty-five years ago, it would be hard to imagine that Microsoft would be a member of the Linux Foundation, not to mention mirroring Linux devs by supporting rewrites of the kernel in Rust and releasing open source distros. Naturally, innovation­s such as WSL2 and CBL-Mariner could just be there to keep programmer­s using Windows and Azure. Open source could just be a form of ‘Windows dressing’. Still, Linux is in the OS – and it’s here to stay.

 ?? ?? The Linux version of Edge running in Ubuntu 23.10. Installati­on is available via Microsoft’s repositori­es or standalone DEB/ RPM files.
The Linux version of Edge running in Ubuntu 23.10. Installati­on is available via Microsoft’s repositori­es or standalone DEB/ RPM files.
 ?? ?? A preview of the next version of Windows leaked from Ignite 2022. Will it really run Linux under the hood?
A preview of the next version of Windows leaked from Ignite 2022. Will it really run Linux under the hood?
 ?? ??
 ?? ??

Newspapers in English

Newspapers from Australia