Project page   -   Download

General description
NeHaBoDi (NethackBootdisk) is a very small Linux distribution, containing the famous role playing game Nethack.
Nevertheless it is completely fitting onto a single 1.44 MB floppy.
So you just have to insert the disk, boot the computer and are able to play a round ;)

I started this project to learn something about the Linux bootprocess and how real distributions are working.
A nice side effect is, that I am now able to play my favorite game at computers on which I am not able to install additional software ;)

You can also test the floppy image by using the CPU emulator QEMU (qemu -fda filename.img -boot a).

Technical details
This distribution is using a Linux kernel in version 2.4.28, because it is much smaller than the recent 2.6 series.
To save space for nethack, I left features and drivers out, that are not really needed.
Busybox is used to provide the programs required for login (init, getty, login) and a small shell (lash).

The complete rest of the disk-space is used by Nethack and its datafile.
Nethack was patched with the hpmon and menucolor patches (I cannot play without them ;D) (you can find these patches via Google).

The applications have been compiled with GCC 3.4.4pre.
Busybox and Nethack are linked statically against uClibc to hold the binary size small.
The Linux kernel is optimized for i686 platforms to hold down the size (I needed nearly every byte...).
UPX (1.92) was used to compress the Nethack binary. Though UPX is also supporting bzImage compression, I was not able to boot with a compressed kernel and init did not want to start with a compressed Busybox.
If you have suggestions for saving more space, please report them.

To correctly copy the image onto a floppy, use the following command:
dd if=filename.img of=/dev/fd0
(That works only at Unix systems. Use rawrite for use with Windows)

Legal issues
Nethack is licensed under the terms of the Nethack General Public License.
The Linux kernel and busybox are licensed under the terms of the GNU General Public License.
The rest of this project (bootscript and configuration files) is public domain and can be used for whatever you want ;)

Projects that made this project possible Logo