Download my Damn Small Linux OVA here (mirror link). Note: OVA was exported from a VMware ESXi 6.0 host. It might need to be converted for a different hypervisor.
I am getting ready to build my F5 BIG-IP Application Delivery Controller, commonly known as load balancer, home lab and one of the things I need for the lab is to have servers in the internal network side. While I have some Linux VMs already in production, they are not that small compared to Damn Small Linux. I’ve heard and/or read about this distro a long time ago, but never really bothered to check it out until now.
What is Damn Small Linux?
Damn Small Linux is a very versatile 50MB mini desktop oriented Linux distribution. DSL was originally developed as an experiment to see how many usable desktop applications can fit inside a 50MB live CD. It was at first just a personal tool/toy. But over time Damn Small Linux grew into a community project with thousands of development hours put into refinements including a fully automated remote and local application installation system and a very versatile backup and restore system which may be used with any writable media including a USB device, floppy disk, or a hard drive.
VM Hardware Specs
For this install, I used the following:
RAM = 64MB – Using 32MB of vRAM was too slow for my taste.
HDD = 128MB – I didn’t test if I can go smaller using Frugal Install. Make sure to use IDE because SCSI won’t work. One could try to play with boot options to make it work but IDE is fine.
CPU = 1 x vCPU and 1 x core
NIC = 1 x vNIC – Network adapter is set to Flexible
How to install Damn Small Linux?
If one has to create his own version, please follow the steps below. Obviously, change the values for one’s needs.
1. Boot the ISO. You will be greeted like the one on the screenshot. Type dsl 2 on the boot prompt.

2. Once booted, run cfdisk. Prompt will show something like root@tty1[/]#. Type cfdisk there and hit enter key.
3. A new prompt will show. Type y and hit enter.
No partition table or unknown signature on partition table Do you wish to start with a zero table [y/N] ?y
4. A new screen will appear.

5. Hit tab to go to the [New] option.

6. A new screen will show up with three options: Primary, Logical, and Cancel. Select [Primary] and hit enter.

7. A new screen will show Size (in MB). Type 75.

8. A new screen will show three options: Beginning, End, and Cancel. Select [Beginning] and hit enter.

9. Make hda1 bootable. Select [Bootable] option and hit enter.

10. Select the Free Space partition by hitting the down arrow key. Follow step 6, 7, 8, and 9. For step 8, change it to 25.
11. Change the file system type of hda2 to swap. Tab (or right arrow key) to [Type].

12. Type 82 and hit enter.

13. Select the Free Space partition by hitting the down arrow key. Follow step 6, 7, 8, and 9. Size will be the remaining one.
14. Once completed, select [Write] option by hitting tab or right arrow and hit enter. A new screen will show up and type yes and hit enter.

15. Exit out of the cfdisk utility. Select [Quit] and hit enter.
16. Prepare the partitions and power off.
root@tty1[/]# mke2fs /dev/hda1 root@tty1[/]# mke2fs /dev/hda3 root@tty1[/]# mkswap /dev/hda2 root@tty1[/]# swapon /dev/hda2 root@tty1[/]# poweroff
17. Once completely powered off, turn it back on and let it boot. May need to manually power it off. By powering it off, it will not eject the ISO on the next boot. Boot will fail without the ISO since the OS is not installed yet. Once booted, one will be greeted by an old fashioned GUI.


18. Install Damn Small Linux (DSL). Right click somewhere in the desktop and go to Apps > Tools > Frugal Install > Frugal Grub Install.
19. A terminal window appears. Follow the steps shown on the screenshot or the text below.

Enter the target partition to hold image (EXAMPLE: hda2): hda1 Install from: [L]iveCD or Frugal Install [P]endrive Local [I]so File Fetching latest iso from [W]eb From Poormans via [B]ootfloppy Choose (l/p/i/w/b): l Enter partition to be used for MyDSL extensions.(EXAMPLE: hda3): hda3 List boot options: Example: vga=normal toram tz=US/Pacific ssh fuse: <hit enter> Choose language/keyboard if other than english: Example: cs da de es fr nl it pl ru sk: <hit enter> For INSTALL answer y to format, for UPGRADE answer n. Format the target partition /dev/hda1 (y/..)? y Last change to exit before destroying all data on /dev/hda1 Continue (y/..)? y Formatting /dev/hda1 <-- Output ommitted for brevity --> Grub Installation Completed. Press Enter key.
20. Power off the system. Open a terminal and issue sudo poweroff command.
21. Before turning on the VM, remove the ISO to verify that the installation was successful and it boots from the hard disk. Let it boot or just hit enter to boot instantly.
22. DSL X Setup. Go to Cancel option and hit enter.
23. Edit the GRUB menu. Open a terminal window.
dsl@box:~$ sudo su [/home/dsl]# mount /mnt/hda1 [/home/dsl]# vi /mnt/hda1/boot/grub/menu.lst
Comment out all the title, kernel, and initrd lines. One could technically remove everything but for backup purposes, just comment them out. Once commented out, add a customized DSL. Once added, save and quit.
default 0 timeout 3 title DSL kernel /boot/linux24 root=/dev/hda1 quiet vga=normal noacpi noscsi frugal dma toram restore=hda3 home=hda3 opt=hda3 host=DSL dsl mydsl=hda3 initrd /boot/minirt24.gz
Sample GRUB menu.lst file.

24. Reboot DSL.
25. DSL X Setup is going to pop up again. Just hit cancel.
Optional
The OVA file has all the ones mentioned below so download it to save some time.
Want to stop Dillo browser from starting up every time DSL boots up?
Edit the .xinitrc file. Find the line where it says dillo and comment that line out. Please use the screenshot below as a reference.
dsl@box:~$ sudo su [/home/dsl]# vi .xinitrc

Want Monkey Web Server to start automatically during boot up?
Edit bootlocal.sh file. This file is like autoexec.bat in DOS. Add the line below.
[/home/dsl]# vi /opt/bootlocal.sh /opt/monkey/bin/banana start
Want SSH Daemon to start automatically during boot up?
Edit bootlocal.sh file. Add the line below.
[/home/dsl]# vi /opt/bootlocal.sh /etc/init.d/ssh start
Thoughts
I spent several hours researching and playing with DSL to get a perfect base VM, but I eventually decided to leave it alone. It’s only going to be used for my F5 load balancer lab, so why spend more time into it. Did I need to do all this? Probably not. I could have cloned a base Ubuntu Server VM with LAMP installed but I really wanted a small Linux VM. It’s perfect for resource constraint machines, not that my ESXi host is, like notebooks.
This is far from perfect DSL install since I couldn’t figure out how to make my password changes permanent. Also, the SSH keys gets generated every boot up so when I connect via SSH, I kept getting new keys every time the server gets rebooted. Yes, one of the links listed below have a way to auto start SSH daemon, but it won’t start because the SSH keys need to be generated. Launching sshd at boot does not necessarily mean it will be successful. No SSH keys, no workie.
References
Frugal Install
Bootlocal.sh
Monkey Web Server
Disclosure
NetworkJutsu.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com.