Installer framework Calamares at a glance

Modular Kit

© Lead Image © ChriSes, photocase

© Lead Image © ChriSes, photocase

Article from Issue 201/2017
Author(s):

Calamares helps you create simplified routines for installing a distribution, but there are some pitfalls, as we explain.

Installing Linux today is quite straightforward compared to, say, 15 years ago when the process could be quite time-consuming. That said, installers still confront newcomers with issues such as partitioning, which is similar to open heart surgery and can easily go wrong. Installing Arch Linux is the exception in this case, because there is no official installer for the system. But, if you look at Debian, Fedora (Figure 1), or openSUSE, their setups offer an abundance of possibilities, even including LVM/RAID on encrypted systems.

Figure 1: The Fedora installer Anaconda offers so many options that identifying the switches and key settings can overwhelm beginners.

This diversity can easily be confusing for beginners. Additionally, these users may be accustomed from Windows or Mac OS X to always having the same installer, which you get to know better over time. Users who often switch distros on Linux, however, are repeatedly confronted with different interfaces.

The situation improved with the emergence of Ubuntu. In version 6.06, its developers presented Ubiquity [1] as a wizard for the installation of a live system. The features of the Debian installer are used in the background. The roots of the software were in the Spanish distribution Guadalinex, which received government funding.

Almost all Ubuntu offshoots subsequently moved to Ubiquity and thus unified the image of distributions based on Debian. But, in the realm of the RPM distributions and Arch Linux derivatives, wild variety prevailed and still does today.

A Brilliant Idea

About three years ago, KDE developer Teo Mrnjavac (see "Interview" box) then implemented an idea that takes much of the work off the distributor's hands. The distribution-independent Calamares installer framework [2] composes modules to create an installer with a custom look or lets you create these modules yourself. Rudimentary knowledge of Python helps you understand the code of the module – but this is not a precondition.

Interview

Linux Magazine: Teo, about three years ago, you had the idea of a distribution neutral installer framework that then appeared some time later as Calamares. How did you get this idea?

Teo Mrnjavac: Before Calamares, it was customary for new distributions to take the installer from some other distribution and to adapt it to your own needs. In the end, this resulted in forks of forks, each with their own errors and shortcomings. I realized that much time was being wasted here, and that it would make more sense for distributors to collaborate on a product that everyone shared.

LM: Some 20 distributions already rely on Calamares; many have collaborated in the development of the framework. And, it looks as if more distributions will be following suit. What are your future plans for the project?

TM: Calamares is a modular tool that allows distributions to compile the installer itself, rather than a finished product. Calamares' fate thus depends on objectives and priorities, and last but not least, on the needs of the respective user. My main goal in this project is to enable distributors to implement their own ideas in terms of the installer and to ensure a trouble-free installation.

LM: What kind of skills does a distributor need to create a deployable installer with Calamares?

TM: Calamares is designed to support ease-of-use. In most cases, the distributor only needs to modify a few configuration files. In addition, there is the option of extending the framework with your own modules in Python or C++ – this is something you can do, but by no means have to.

LM: Teo, thank you very much for the interview!

Mrnjavac, who previously helped develop the Amarok and Tomahawk audio applications, worked for Blue Systems at the time [3]. This company employs about a dozen well-known KDE developers and is currently supporting KDE Neon, Netrunner, and Maui distributions, as well as other Linux projects, both financially and in terms of development.

After nine months of development work, Calamares 1.0 was ready in February 2015. The result included 25 modules, covering everything from basic bootloader support, partitioning, user management, and the installation itself. There is also an interface for modules created by distributors themselves. KaOS and Siduction are two distributions that make use of this by displaying release notes directly in the installer (Figure 2).

Figure 2: The KaOS distro uses the interface to Calamares to display its proprietary module with release notes in the installer.

Continuous Development

About a year later Calamares 2.0 appeared. The use of KDE Partition Manager (Figure 3) was new; this saw the tool revived after years of slumber. This simplified partitioning on the one hand and offered advanced options for the operation on the other. Calamares also supported operations immediately after installation, which made it possible to run commands, such as removing parts of the live session that were no longer needed.

Figure 3: The KDE Partition Manager – restored to its former glory and now featured in Calamares.

Since Calamares 2.2, the software has also supported state-of-art NVM Express (NVME) drives. Version 2.3 added complete encryption of the system to be installed to its repertoire, including the bootloader and the optional swap partition based on the Linux Unified Key Setup (LUKS) specification. This even applies to dual-boot environments, for example, with Windows 10.

The developers also introduced the Replace Partition function, which lets you reuse a partition without changes to its size or type at the push of a button (Figure 4).

Figure 4: The Replace Partition option lets you install without changing the type or size of the filesystem.

More and More

The latest version is Calamares 3.1 (from April 2017), which is already use by about 20 distributions. It is written mostly in C++; the developers used the Qt framework for the interface. Scripting in the modules is handled by Python 3, and the software configuration is done by the YAML [4] markup language. Users never get to see some of the modules; those that handle the interaction appear on the left edge of the window as tabs.

In the first tab – Welcome – you select the desired language (Figure 5). Calamares adjusts the locale, the time zone, and language accordingly in the second tab. The keyboard model and the layout are then set in the third tab, and you can test the parameters there, if necessary.

Figure 5: Calamares offers the possibility to customize the Welcome screen. Only the language selection is standard.

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Nitrux 3.0.0 Has Been Released

    The latest version of Nitrux brings plenty of innovation and fresh apps to the table.

  • This Month's DVD

    Tanglu 3.0 and Kubuntu 15.04

  • Manjaro 21.3.0 Is Now Available

    Manjaro “Ruah” has been released and includes the latest Calamares installer, GNOME 42, and much more.

  • TUXEDO OS 2

    The popular Linux PC forge TUXEDO extends Ubuntu to include the latest KDE packages and says goodbye to Snap for its in-house TUXEDO OS distribution. The latest version is suitable for any PC.

  • News

    In the news: KSMBD Finally Reaches a Stable State; Nitrux 3.0.0; Linux From Scratch 12.0; Linux Kernel 6.5; UbuntuDDE 23.04; Star Labs Reveals a New Surface-Like Linux Tablet; SUSE Going Private (Again); Devuan GNU+Linux; CIQ, Oracle, and SUSE Form Alliance to Thwart Near-Closing of the RHEL Source; and Rolling Release Rhino Linux.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News