COMP 3000 2011 Report: Damn Small Linux

From Soma-notes
Jump to navigation Jump to search

Part 1

Background

Damn Small Linux Logo.

The name of the distribution is "Damn Small Linux". It comes from the fact how small the size of the distro - a whopping 50 megabytes.<ref name = "DSL_main">"DSL information": damnsmalllinux.org (Last accessed 2011-12-19)</ref> Damn Small Linux or "DSL" was created to see how many usable desktop applications could be crammed into a 50MB disc. It was designed for everyone who wanted a compact operating system and can run fully on a machine with as little 128MB of RAM. John Andrews originally created DSL, but the project has now grown into a reasonably sized community project including Robert Shingledecker, the creator of Tiny Core Linux, who created the MyDSL system, DSL Control Panel, and other defining features of Damn Small Linux.<ref name = "DSL_about">"About Damn Small Linux - DSL Wiki": http://www.damnsmalllinux.org/wiki/ (Last accessed 2011-12-19)</ref>

The official site of DSL, http://www.damnsmalllinux.org/download.html, hosts the mirrors of the ftp servers to download the bootable image. There are many ways to install DSL; you can use a bootable CD, a USB pen drive, or boot from within a host OS. <ref name = "DSL_faq">"Frequently Asked Questions - DSL Wiki": http://www.damnsmalllinux.org/wiki/ (Last accessed 2011-12-19)</ref> As noted earlier, the OS (operating system) is only 50MB and have been frequently asked whether it will ever exceed that size, but has always been denied because they feel it would become a different OS if it were to exceed 50MB. DSL was based on Model-K, a very basic version of Knoppix, but later built around the actual Knoppix since it was easier to improve upon it.

Installation/Startup

Boot Process.jpg
Boot Process 2.jpg
Startup Screen
Virtualization Splash Screen

I went to the official site of Damn Small Linux to find the ISO. The first link on the download page returned an error and the second link said the page it no longer exists, no surprise since its latest release was back in 2008. I decided to click on the last link and found myself at an ftp server.<ref name = "DSL_ftp">"FTP Mirror of DSL": ftp://ftp.heanet.ie/(Last accessed 2011-12-19)</ref> I downloaded the dsl-4.4.10.iso from the current folder and burned it on a disk. I tried booting it at startup but after a few steps the screen was just black for ten minutes or so.

Back at the ftp server, I then downloaded the dsl-4.4.10-embedded.zip file. After I obtained DSL I extracted and executed a bat file called dsl-base.bat. A console appeared, listing the I/O devices like my CD-Drive and my hard drive, while booting up the kernel and shortly after I was greeted with a GUI. The whole boot up process took as little as a minute or less. The embedded version of DSL uses an emulation process called QEMU. The emulation uses dynamic translation methods to attain reasonable speeds but it is not as fast as virtual machines such as VirtualBox without the help of the kqemu accelerator.

Since DSL can also be virtualized, I decided to use VirtualBox to launch DSL as a Live CD, meaning I can boot the OS without having a secondary storage system like a hard disk. <ref name = "DSL_VirtualBox">"DSL with VirtualBox - DSL Wiki": http://www.damnsmalllinux.org/wiki/ (Last accessed 2011-12-19)</ref>Here are the steps I used to get DSL running:

  • Opened Virtual Box.
  • Clicked on the "New" button
  • Gave it a name, "DSL", chose "Linux" as operating system, and used "Linux 2.4" as the version (DSL is not a 64-bit OS)
  • Set base memory size to 64 MB, the minimal requirement.
  • Unchecked "Boot Hard Disk", continued to the next step and accepted the warning about the hard disk.
  • Finish the setup
  • Right-clicked on DSL and viewed settings
  • Clicked on the "Storage" tab, and displayed the "CD/DVD ROM"
  • Clicked on the disk icon under "Atributes" and chose a virtual CD/DVD disk file
  • Opened "dsl-4.4.10.iso"
  • Clicked "OK" to save settings
  • Launch DSL

Greeted by a splash screen, I pressed enter to begin. All the console output matched the same output of the console from the setup process of the embedded version of DSL. The whole virtualization also booted up within a minute with ease.

Basic Operation

Basic Programs
Games
Tiny C Compiler

The first thing I noticed when using this distro is the usage of the desktop. Both left and right click bring up a standard menu bar which threw me a little bit off thinking if my mouse was working properly, though it does provide a useful menu bar which has many shortcuts to the main programs a typical user would use. That same menu bar can also be found as the start menu. Firefox is the standard internet browser of DSL but it takes relatively slow to load – slow enough to wonder if it will load up or not – and the same goes for rendering pages. The reason Firefox was slow because DSL was running by emulation. The Firefox I tested during the virtualized DSL ran much smoother due to the lack of need to go through a translation process. There is also another browser that comes with the OS called Dillo. Though it may be more responsive than Firefox running on QEMU, it renders its page in a weird fashion shifting everything to the left.

The editors and the calculator are all basic as you would normally expect. However, the image editor’s interface is quite confusing. There are a couple of games familiar to everyone such as Solitaire, Tetris, and Minesweeper, plus other games that maybe unheard of. I played several rounds of Minesweeper and almost all of the time, clicked on a bomb on the first try.

The terminal can be found at the bottom of the interface and uses the bash shell. I tried creating a hello world c program and shortly realized DSL does not have a compiler pre-installed. Looking around for a compiler using http://www.ftp.be/packages/damnsmalllinux/mydsl/system/, I found and downloaded a package called Tiny C Compiler under tcc.dsl. Once I installed it, I tried compiling hello world again but the compiler could not find stdio.h for some reason. I downloaded libc6-dev.dsl and libc6.dsl from the same ftp server above and installed them both. Compiling hello world again, it finally compiled with no errors and was able to be executed as well.

Usage Evaluation

Damn Small Linux proves itself to be a small lightweight OS that's easy to obtain and easy to install, but if you want to do more than just basic operations, you must find the packages yourself which is all located at the ftp server provided above. There are many packages that can expand the use of DSL with just a simple execution of a .dsl file. There are many ways to install DSL and only take less than a minute to boot up. The Graphical User Interface is quite simple and though it may be confusing, the drop down bar provides categories to easily find any program you want to run.

An instance why someone would use DSL is at a public computer hub like an internet cafe. Perhaps that person is concerned about their privacy while browsing the internet, so by running DSL on a USB key, the problem is circumvent because all cookies, saved passwords, and history is saved on the USB and not the host OS. Almost every aspect of Damn Small Linux is very minimal and provides little flexibility with what you can do, making it perfect for older computers that need as compact OS.

Overall, if you want an OS that takes fast to boot and does not take up a lot of power, DSL may be for you, but be prepared to satisfied and nothing above that.

Part 2

Software Packaging

Changing link to the mirror server
Enabling apt-get to use add/remove packages

Damn Small Linux, as mentioned before, is based on Knoppix which is also based on Debian. Unfortunately, the entire /var/lib/dpkg/ which is the system that maintains packages was removed to created space on the iso. It is possible to to restore dpkg<ref name = "DSL-EnableApt">"Enabling Apt - DSL Wiki": http://www.damnsmalllinux.org/wiki/ (Last accessed 2011-12-19)</ref> in order to list all the packages, but the dpkg-restore scripts fails due to the closure of the host server. Luckily, the server can be changed to an existing mirror by editing a text file, or you can find the dsl-dpkg.dsl on the server through the ftp server and manually download and install it yourself. After executing dsl-dpkg.dsl, the option to enable apt-get can finally be switched on.

Like any Debian based OS, list all the packages by this command:

$ dpkg -l

To add or update packages, use:

$ dpkg -i <package-name>
or 
$ apt-get install <package-name>

To remove them:

$ dpkg -r <package-name>
or 
$ apt-get remove <package-name>

Like every aspect of Damn Small Linux, its software catalog is not extensive at all compared to its other Linux siblings.

Major Package Versions

The following list displays a few major packages that are included in DSL. <ref name = "DSL-Packages">"DSL - Packages": http://www.damnsmalllinux.org/ (Last accessed 2011-12-19)</ref>

Kernel
Package Name: kernel-image-2
Version: 10.00.Custom
Description: Linux kernel binary image for version 2.4.22

Libc
Package Name: libc6
Version: 2.3.2.ds1-10
Description: GNU C Library: Shared libraries and Timezone
Vintage: 10/02/2005
Upstream: http://packages.debian.org/stable/base/libc6
Latest Stable Version: 2.11.2-10

GUI Toolkit (GTK)
Package Name: libgtk1.2, libgtk1.2-comm
Version: 1.2.10-14
Description: The GIMP Toolkit set of widgets for X, common files for the GTK+ library
Upstream: http://www.gtk.org/
Latest Stable Version: 3.2.2

Utilities (Busybox)
Package Name: busybox
Version: 0.60.5-2.1
Description: Tiny utilities for small and embedded system
Upstream: http://busybox.net/
Latest Stable Version: 1.19.3

Shell (Bash)
Package Name: bash
Version: 2.05b-8.1
Description: The GNU Bourne Again SHell
Upstream: http://www.gnu.org/software/bash/
Latest Stable Version: 4.2

Software Packaging (Dpkg)
Package Name: dpkg
Version: 1.10.10
Description: Package maintenaince system for Debian
Upstream: http://www.debian.org/doc/manuals/debian-faq/ch-pkgtools.en.html
Latest Stable Version: 1.15.7.2

Internet Browser (Dillo)
Package Name: dillo
Version: 0.7.3-1
Description: GTK-based web browser
Upstream: http://www.dillo.org/
Latest Stable Version: 3.0.1

Word Processor (Ted)
Package Name: ted-common, ted-gtk
Version: 2.14-1
Description: Common files used by ted and ted-gtk, graphical RTF editor
Upstream: http://www.nllgg.nl/ted/
Latest Stable Version: 2.21

PDF (XPDF)
Package Name: xpdf-common
Version: 2.02pl1-1
Description: Portable Document Format suite
Upstream: http://www.foolabs.com/xpdf/
Latest Stable Version: 3.03

Image Editor (XPaint)
Package Name: xpaint
Version: 2.6.2-2
Description: Reasonably versatile X-based image editor
Upstream: http://sf-xpaint.sourceforge.net/
Latest Stable Version: 2.6.2

Most of the vintages of the packages can not be found and almost every package is behind their latest stable counterpart except for XPaint which stopped iterating after version 2.6.2. The kernel was definitely modified heavily by just look at the version provided by dpkg. It is based on the Linux 2.4 kernel because the 2.6 version is much larger and drops a lot of support for legacy technologies and hardware. DSL with a 2.6 kernel is available through DSL-N(Damn Small Linux Not!). Each package and I mean each package was selected because they were written with size-optimization and limited resources in mind.

Initialization

Searching around the directories, I was lead to the /etc/rcS.d, where I found some boot scripts, although it runs the scripts in the /etc/init.d folder. The knoppix-autoconfig is the first script ran by the init process.<ref name = "DSL_BootProcess">"DSL Boot Process - DSL Wiki": http://www.damnsmalllinux.org/wiki/ (Last accessed 2011-12-19)</ref> It first configures the regional settings such as the timezone and keyboard mapping, then tries to detect all the available hardware and load the right modules and setup the network using DHCP. The script finally scans all storage partitions and create a fstab. A fstab is a filesystem table, a system configuration file that can list all disks and their partitions and indicates how they are integrate with the filesystem.

Next comes the dsl-config script which controls DSL specific configuration. It starts off by, creating a symbolic link, a file that contains a reference to another file or directory using absolute or relative path, to /opt to the ramdisk to allow /opt to be written to. Then sets up /home/dsl using /etc/skel as a template, loads DSL extensions and finally if it exists, restore a backup file. The /opt directory contains the bootlocal.sh script which in turn runs all the startup programs such as acpi, jwmThemes, monkey, samba and any other custom startup programs you command.

References

<references />