Lightweight specialty distributions

The Specialists

Article from Issue 274/2023
Author(s):

In the Linux world, form follows function. A specialty distro is a Linux-based system designed to serve a specific role. We look at some classic examples.

For a special job, you need a special tool. Occupying a special place beside the grand old generalists are a number of Linux distributions that have a very narrow focus, such as audio, gaming, or security. Specialized Linux distributions come in all sizes, but even the huge ones often fall into the "lightweight" category, because, even though they might need a lot of space for their specialist tools, they don't have to make room for all the other general-purpose software you're used to seeing in a Linux system. Hundreds of specialty distros exist in the wild. This article highlights a few popular alternatives (Table 1). I'll introduce you to Daphile, an audio server; Linux From Scratch, an educational roll-your-own Linux; Recalbox, which lets you run classic games on EmulationStation; SystemRescue, the universal repair tool; and Kali Linux, the Swiss Army knife for pentesters and other security experts.

Table 1

Distributions

Distribution

SystemRescue

Kali Linux

Daphile

Linux From Scratch

Recalbox

Website

https://www.system-rescue.org/

https://www.kali.org/

https://www.daphile.com/

https://www.linuxfromscratch.org/

https://www.recalbox.com/

Version

10.01

2023.2

23.01

11.3

9.1

Released

05/2023

05/2023

01/2023

03/2023

06/2023

Linux Kernel

6.1.30

6.1.27

5.15.86

6.1.11

5.17.15

Window Manager

xfwm4 4.18.0 (Xfce)

Gnome 44

ISO Image Size

737MB

3.9GB (Live)

276MB

3GB

Daphile Audio Server

If you have an unused older computer, why not turn it into your new headless audio server? Install the Daphile distribution [1], store your music on its hard disk, and access it in two ways: via a web app and via a Samba share (Figure 1).

Figure 1: Control Daphile via a web browser, or find music on its Samba share.

Daphile promises "Digital Music Convenience for Audiophiles": It provides a web application that lets you manage the system from any computer in the local network: Just enter its IP address in a browser's address bar, and you can start using Daphile. The integrated audio player sends music to the server's sound card (and not to the client that you use for controlling it!), so the intended use is to connect the Daphile PC to, say, your living room's hi-fi system and then control it from a notebook or phone (Figure 2).

Figure 2: When you're sitting on the couch, your phone's browser is the most comfortable way to access the Daphile computer.

To let you hear the music on Daphile's hard disk from a remote location, the distribution launches a Samba server to which you can connect from any Linux, Windows, or macOS machine. The Samba server gives you access to artist folders with album subfolders inside.

Setting up Daphile is easy. The website offers three downloads (64-bit, 32-bit, and 64-bit with realtime kernel), so you can use a modern computer, but Daphile will also work on a very old machine. For our test, we picked the first option, the 64-bit image (daphile-23.01-x86_64.iso, 276MB). Note that Daphile is available under a restricted license – a disclaimer on the website reads: "Daphile distribution is made available free of charge for non-commercial private use. Any commercial usage and redistribution of Daphile in any form is strictly prohibited."

Write the ISO image to a USB stick, boot your intended audio server from that stick, and check the output on the screen: It will show its IP address. This is also the last time you need to have a monitor connected, because Daphile runs in headless mode – you cannot even login directly at the computer.

Connect via a browser and go to the Settings tab. There you can launch an installation: Select a hard disk that will be repartitioned (and will lose all previous data). Daphile creates two partitions, a small one named DaphileBoot (which holds the software) and a large one named DaphileData (where you store your music). If you don't want to use the computer's hard disk or only want to try the software out, you can also install onto the USB stick that you've just booted from. Reboot from the target disk (or stick) and reconnect to the server in the browser. Now you can start adding music.

Daphile includes a CD ripper that you can use to add music to your library. You have to insert CDs in a drive that is connected to the server – and not to the client that displays the web app interface. Ripping works well, and the ripper program finds album metadata (interpret and titles) and cover art automatically. It converts the ripped tracks into large FLAC files with excellent audio quality. However, ripping takes time, and the fact that you need physical access to both the server and a client makes this approach a bit impractical. If you already have a collection of MP3 or other digital audio files, copy them to the Music folder, for example, via the Samba share. Transferring gigabytes of music over the local network will also take a lot of time, but you can let it run unattended.

Linux From Scratch

Linux From Scratch is a very special distribution that has existed since 1999 and is still active: The current version 11.3 was released in March 2023 [2]. When you go to the download directory, you won't find an ISO image – instead you get a book (370 PDF pages or HTML), a collection of boot scripts, and a download list that points you to 90 source code archives.

Working with Linux From Scratch means building it from scratch. You'll read the book and go through all the necessary steps that will eventually let you boot the operating system and run some basic programs on it. For example, you'll get the Vim editor, but there is no graphical desktop.

The final product is not the true goal, it is all about the journey that leads you there. You will learn how to build and use a cross-compilation toolchain and how programs and libraries work together. You will dig into the System V-based init mechanism (though there's also a variant of the book that introduces you to the modern sysvinit alternative systemd), deal with device files, and install all the other parts that a minimal system will need.

Note that the book is not completely self-explanatory. It shows the commands you need for compiling and installing the various software components, but it does not go into detail for every single component.

Recalbox

If you want to play retro games on your PC, you have a lot of options: You can install emulators for your preferred platforms (for example, the Commodore C64, the Atari ST, or the Sony Playstation), or you can use a front end like EmulationStation [3] that integrates various emulators and games for those bygone machines.

Recalbox [4] is a specialized distribution that is based on the Buildroot tool [5], which lets developers create embedded Linux systems. You can download recalbox-x86_64.img.xz and uncompress it into a 3GB image file, write it to a USB stick, and boot it. The first boot process takes a while because an auto-installer claims the rest of the USB stick and creates a partition where you can later store your own game files (roms). Keeping Recalbox restricted to the stick means that you need not repartition the hard drive, and you can use the PC for other tasks when you're not playing.

As a first step, you should set up your game controller. Its main buttons will work already, so press Start to open EmulationStation's main menu. Then select Controller Settings | Configure a Controller and assign functions to all the buttons that your controller has. At the end of the list, you need to assign a button to the Hotkey entry: You'll use it to exit games.

The Recalbox image contains a lot of games, so you can start playing immediately. Navigate through the machines – when you select a computer, you'll see the list of games (roms) that it can run. Select a game and start playing within a few seconds (Figure 3).

Figure 3: With Recalbox, you can run all the classic home computer emulators from EmulationStation and play their games.

If you want to add your own game files, you can log in via Secure Shell – the root password is recalboxroot. Then navigate to the /recalbox/share/roms/ folder: This is where you should put your files, for example, C64 disk images in the c64/ subfolder. You can also cd into that directory and download games from the Internet Archive with wget – following are the commands for the classic Q*Bert game:

cd /recalbox/share/roms/c64
wget https://archive.org/download/d64_Q-Bert_1983_Parker_Brothers/Q-Bert_1983_Parker_Brothers.d64

Then press Start on the game controller to bring up the Options menu. Select Update Games Lists in the Options menu and select Yes. EmulationStation will restart after a few seconds, and you should find your new games in the list.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

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

comments powered by Disqus