Linux.com

Home Linux Community Community Blogs Distributions Create a custom distro: Choice of the right base (P.2)

Create a custom distro: Choice of the right base (P.2)

previous page...

 

Debian

This is one of my favorite distribution for servers, when I don't have enough time for a fine tuned HW optimization (Gentoo) or when I don't have so much time to spend on the installation and configuration process (Arch) I usually adopt Debian. With Debian you can do some sort of “dumb/quick installation” (Debian is not dumb!), the installation process gives you a working machine in half an hour. That's what I'm definitively using it on production servers, rock-stable, optimized and well supported. ….but, I've tried to install it in an USB stick with space constraints, read-only root partition and some customizations, you can do it but someone else gives you a better result (read below). I've tried to apply Linux Live-CD scripts for my personal read-only installation, you can do it but I've had few issues, mostly on:

  • startup scripts optimization, I'd like to install packages and modify startup scripts later. If you'd like to have a “prebuilt-template” to apply to it you've to manually add everything later on

  • Debian is not aimed to a live USB/CD environment, it's made for something else (servers for example)

  • root partition is not compressed (knoppix style), you may do it externally. Disk space for a tipical installation doesn't fit under 100Mb. Now “minimal” Debian installation is not so minimal

  • You may do something on a typical installation and then reduce it later on but it's not an automated system and you need to reproduce each step manually every time you need to change something

Sadly this is one of my favorite choices but this is not the right kind of solution to my own problem

 

OpenSuSe

I've not against SuSe, it even has the best tool for building a tailored distro, everything on the web in the cloud, SuSe studio is an impressive tool but:

  • Like Debian their minimal installation is not so minimal, you cannot go under 200Mb

  • You may do customizations on it after the installation but what I'm trying to do is a read-only image

  • Cloud computing is fine for me but I prefer to have my own virtual machines in my own environment and waste my own disk as often as possible, what happens if I don't renew my account or if I don't log often in their website ? What happens if I'd like to work on my own machine and I don't have an Internet connection ?

  • I want to apply patches or modify init scripts for my installation, after package selection but before installation

I like it but as Debian I think it's not aimed to Live-CD/USB creation

 

if you're still reading this article...

Relax, I don't want to write a review about every possible Linux distribution available in our planet, I've really made these tests before choosing the right one (the one I'm most comfortable with in this particular situation). I'd just like to tell you a simple thing:

“every distribution was made for a specific task, you may do everything you want with it but there're easier approaches to your problem every time you need something different, an easy approach with a specialized distribution is always preferred if it doesn't compromise stability, speed and optimization“

I've really spent a lot of time to find out possible solutions with all these listed distros and I've finally decided to use a distro for their unique characteristics. My final choice for this particular problem is : SLAX. If you're still reading this article and you're still interested in my decision here are topics achieved with it:

  • I was using LiveCD Scripts (they're very popular) with LFS and Gentoo, I think this the best approach and the simple one

  • You don't need to deal with targeted/specialized packages (legacy distro packages: gentoo, ubuntu, fedora, ...) to build a live appliance, you've a live distro aimed built around live CD creation

  • you've a modular approach, this is tipical in a live cd environment, on slax there's just one required package: “The Core” (~50Mb), everything else is an option

  • You've AUFS (http://aufs.sourceforge.net) ready to use and it's already there

  • Every “module” (a package) is compressed and easily pluggable into your own personal system, you just need to copy it into the “modules” directory

  • You may create your own LiveCDs or LiveUSBs in just few minutes

  • Documentation is simple

  • You may add your own scripts or alter final file system structure just by adding files to the final root dir. This is the thing I love more, SLAX is using UnionFS approach to make live customizations. If you don't know UnionFS take a look at http://en.wikipedia.org/wiki/UnionFS, this is one of the biggest benefits when dealing with live distributions

  • It's based on Slackware, that's one of the reasons I've never cited it in the first part of the article. Slackware has a lot benefits for this kind of system but SLAX is really focused on my own system

  • A lot of cool different projects are using it for live cd tools (registry editors, demos, security, auditing, ...)

I was discussing in the forum section of this site about Live CD scripts a month ago with other folks, obviously Slackware addicted guys (:-) Matthew, Eric, … thanks :-) ) were more focused on it, I was already using it but I've always used it as the “Slackware little bro”. I've ran it few times (auditor, …) and used it for a while but I've always left it in a corner.

But after spending weeks with LiveCD scripts (http://www.linux-live.org/) and other distros (mostly LFS, Gentoo and Debian) I've decided to use them in their “original environment”: SLAX.

It was damn easy to use it, customize a current Slax installation, produce my own USB install, create and port new packages to it. In just half an hour (GCC installation time on Gentoo...) I've created my Slax build station and I was ready to create USB sticks. Everything available from the original Slax environment, easy customizations, minimal footprint (my first install: 80Mb!) and no external tools involved in my process creation. Just a file manager to handle/copy files and few minutes for everything ! That's what I need and this is definitively what I need to finish my appliance.

 

Where's the code ? Where's the solution ?

System requirements, hardware selection and distribution choice are mandatory sections (even the boring ones) for a project like that, in the next section I'll start with hands on descriptions and I'll start publishing some code involved in this particular project. I've decided to explain my specs with these chapters so I may start a discussion with you about the overall project, I could start my articles with sentences like: “I use Slax to do that” but maybe building a custom Linux distro it's not so appealing if you don't know the reasons and initial requirements

 

As usual feel free to add your comments or discuss about my choices.

 

Andrea (Ben) Benini

 

 

Previous chapters:
Choosing the hardware
Creating a live distro for target appliance

Next chapters:
Create a custom distro: building the build machine

Create a custom distro: building the first target machine

Building a minimal image

 

 

Comments

Subscribe to Comments Feed

Upcoming Linux Foundation Courses

  1. LFD211 Introduction to Linux for Developers
    08 Dec » 09 Dec - Virtual
    Details
  2. LFS220 Linux System Administration
    08 Dec » 11 Dec - Virtual
    Details
  3. LFS520 OpenStack Cloud Architecture and Deployment
    08 Dec » 11 Dec - Virtual
    Details

View All Upcoming Courses


Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board