This article has been originally published in italian (here).Feedbacks on content and translation are appreciated. It will also take me some time to replace screenshots and links with the english ones. Contributions are welcome. The original article must be considered the reference in case of updates.
So, last time Ubuntu minimal install went well and now it’s about time to go the same way with Debian. As one might expect, there are very few differences between the two, although final results may be a little surprising.
As soon as I get these two “naked” penguins, I can dive in my ultimate challenge: building a working installation geared with a simple graphical interface and the few applications that fit my usual needs (web and multimedia). My target is to have a system using the least possible resources, in order to fit a pretty old laptop I was given. I am therefore collecting information on available WM and DE and I will show the results of this search in a dedicated post.
As usual I have created a virtual machine in Virtualbox to carry out the “experiment”: the spare-pc-to-be will not suffer (many) tinkerings to set it up, benefiting from the best result I can get on the VM. Of course “best” does not necessarily mean “working”…
Debian netinst (release “testing”) has an important pre-requisite: downloading the installation mini CD😉 ->here<- (~230 MB, 32 bit), a little bigger than the Ubuntu mini ISO. Files for different architectures are available, as well as the ones for 64 bit machines.
In case someone didn’t know, Debian versions are named after Toy Story characters: the current testing has the name of the penguin “Wheezy” while the stable is “Squeeze” (the green three-eyed alien). By chance I own a bunch of little Squeezes, one of the funniest features of the films, but that’s another story.
The Debian installer menu, showing the big red “swirl”, allows to choose between graphical and textual installation (in Ubuntu only the latter one is available) and different installation modes. I will be using the “graphical – expert” mode, that requires additional choices on some system options during the process.
In the “Advanced options” a DE different from the standard Gnome 2.x can be selected (KDE, XFCE, LXDE): the selected environment will be automatically installed at the end of the process.
Let’s have a look at the required operations: as usual most of the default values will be left untouched and the descriptions of the current step are pretty self explanatory. Be ready to carelessly click on “Continue” – “Continue” – “Continue” a few times…
Once we have selected the system language at the very beginning, we are presented with the full list of installation steps. In the lower left corner a nifty screenshot button may come at hand to track settings provided to the installer (proxy, loaded modules, user name, etc.).
The first important decision we have to make, after the initial hardware detection spins, is about enabling the root user (in Ubuntu it is disabled by default). Debian does not include “sudo” in the basic installation: standard users can perform operations with root privileges through “su” or installing the “sudo” package at a later stage and modifying the file /etc/sudoers to grant the standard user(s) the proper rights (details).
Enabling additional repositories is another important feature to set. Debian “Social Contract” suggests to use only free software (GPL license, for instance), though leaving the final choice to the end user. At this stage of the process we can choose which of these additional repositories to enable. I hope hardcore Debian users forgive me, as I enable all of them: maybe I have got this bad habit using (K)Ubuntu.😳
Repository selection in this step saves us from editing file /etc/apt/sources.list later, to add the desired software sources. Since the system will initially have no graphical interface or front-end for apt (like “synaptic”) this operation must be made manually, with all the related risks.
Last but not least, software selection. As I have done with Ubuntu, I’d rather add no software now. Take care to deselect “Debian desktop environment”, that would start the installation of Gnome (or the alternative selected DE, as I noted at the beginning).
Standard system tools add a bunch of packages containing, among the other things, less, nfs-common, python, openssh and the text browser w3m: these tools can be useful but are not essential. Anyway the disk space taken by them is about 100 MB and about 2 MB RAM to run some related daemons; as a first trial I will leave this option included. To further reduce the install (in a more “extreme” trial) I might then exclude this group and add one by one the tools I need.
Here attached you can find the list (pdf) of different packages in the two cases (with or without base utils, still no DE): diff_pkg_base_utils. Of course this list was not compiled by a keen although anachronistic amanuensis, rather by a few combined shell commands.
A “tutorial inside the tutorial”: “See how far you can get with the right command set”
In both cases (with and without base utils, having two separate installations) I can generate the list of installed packages by “dpkg”, redirecting the output to a text file (for example list_with_utils e list_without_utils).
dpkg --get-selections > list_filename
Then I take the two lists on the same disk in order to view them on after the other (“cat”), sort the output and remove the duplicated lines (“uniq -u”), again redirecting the output of the whole process in a text file.
cat list_with_utils list_without_utils | sort | uniq -u > differences
With the attached list (copy the content in a plain text file – WordPress does not allow the upload in this format) we might put back in the system some or even all the packages excluded at the beginning (refer to man page of dpkg for details):
dpkg --set-selections diff_pkg_base_utils
End of “tutorial inside the tutorial”
Basic information of the system show the modest resources requested: 1,1 GB on disk, 14 MB RAM (!!!) and 1 active process taking 0,3% of CPU, actually the only “top” command being executed. Last time I saw such numbers it was more or less 20 years ago!😀
Ubuntu, by comparison, needs about 20 MB in the same installation mode: detecting such a slight difference is a first noticeable result to help us choose the operating system suitable for available resources. In addition I would say that on a real machine the used RAM will be even lower, since no Virtualbox module is loaded (these modules are automatically added during installation, recognizing it happens in a VM).
From now on the same considerations presented for Ubuntu minimal install can be done. I might decide to have only the command line or a graphical interface, adding the applications accordingly. If we do add a graphical interface, it might in turn determine the suitable applications, since all the system resources not needed by the graphics itself will be left available to run software. “Saving” a few MBytes by giving up animations and 3d effects, for instance, will leave room to run a more familiar although “heavier” browser like Firefox instead of a lighter counterpart like Midori or Arora. Ok, and I love KDE with wobbly windows, transparencies and other “eye candy”, so you can believe me!😉
Nevertheless GNU/Linux is not strictly dependent on a graphical environment, since many softwares, showing fancy icons and nice buttons to click, are simply GUIs (Graphical User interfaces) for command line tools: actually these GUI just make it easier for us to visually “build” (selecting option boxes) the right command to execute. An example for this can be the firewall “ufw” (Uncomplicated FireWall) and “gufw” (Gui to ufw).
Finally, a special acknowledgment to my little co-workers: without them this post would have never been written.🙂