Installer framework Calamares at a glance
Modular Kit
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.
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).
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.
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).
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.
Buy Linux Magazine
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.
News
-
ESET Discovers New Linux Malware
WolfsBane is an all-in-one malware that has hit the Linux operating system and includes a dropper, a launcher, and a backdoor.
-
New Linux Kernel Patch Allows Forcing a CPU Mitigation
Even when CPU mitigations can consume precious CPU cycles, it might not be a bad idea to allow users to enable them, even if your machine isn't vulnerable.
-
Red Hat Enterprise Linux 9.5 Released
Notify your friends, loved ones, and colleagues that the latest version of RHEL is available with plenty of enhancements.
-
Linux Sees Massive Performance Increase from a Single Line of Code
With one line of code, Intel was able to increase the performance of the Linux kernel by 4,000 percent.
-
Fedora KDE Approved as an Official Spin
If you prefer the Plasma desktop environment and the Fedora distribution, you're in luck because there's now an official spin that is listed on the same level as the Fedora Workstation edition.
-
New Steam Client Ups the Ante for Linux
The latest release from Steam has some pretty cool tricks up its sleeve.
-
Gnome OS Transitioning Toward a General-Purpose Distro
If you're looking for the perfectly vanilla take on the Gnome desktop, Gnome OS might be for you.
-
Fedora 41 Released with New Features
If you're a Fedora fan or just looking for a Linux distribution to help you migrate from Windows, Fedora 41 might be just the ticket.
-
AlmaLinux OS Kitten 10 Gives Power Users a Sneak Preview
If you're looking to kick the tires of AlmaLinux's upstream version, the developers have a purrfect solution.
-
Gnome 47.1 Released with a Few Fixes
The latest release of the Gnome desktop is all about fixing a few nagging issues and not about bringing new features into the mix.