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

  • This Month's DVD

    Tanglu 3.0 and Kubuntu 15.04

  • Chakra Linux

    KDE lovers can rejoice at Chakra Linux's beautiful and functional operating system.

  • Uranos Installation Framework

    The virtualization breakthrough has not reduced the number and diversity of operating systems that admins must install and manage. Uranos server sets out to give administrators of complex operating system zoos more freedom.

  • FAI

    FAI helps you automate the process of installing and configuring new Debian systems.

  • Ubuntu 6.06 “Dapper Drake”

    Is Ubuntu 6.06 Dapper Drake worthy of an update? That depends on what you are looking for. We took a tour of the latest Ubuntu.

comments powered by Disqus

Direct Download

Read full article as PDF:

News