muLinux (micro-Linux) is a full-configured, minimalistic, almost complete, application-centric tiny distribution of Linux made in Italy, fitted on a single 1722K floppy.
Its aim is to demonstrate the power and scalability of
this operating system. The 2.0.36 kernel is compiled for the 386
(without co-processor) and
modularized as much as possible. The binaries are taken from the
dozens of distibutions and boot-floppies on my 3 big
hard-disks. Are you wondering why I chose a particular binary,
when I had two of them with the same name? I simply took the smallest
and the one which needs only
I won't bother you telling about
all the dirty hacks to save space: it's enough for you to know
that I rewrote in C the
expr command, because I couldn't understand
why it takes 50328 bytes when I can do the same job with only 4586
bytes. I even substituted
sed and other similar stuff.
muLinux is not intended for the newbie, who wouldn't be very
happy with its spartan interface, but for the Linux
fan in general, the curious person who wants to look inside
scripts to understand why a
sendmail of only 1216 bytes is really able
to deliver mail with the correct return-address. Moreover, a
portable Linux would be ideal in a number of situations: maintenance
in different places, as a demonstration, or just to see it booting at
times, for no particular reason.
Most PC hardware will work fine. The very minimum is a 386 with 4MB of
RAM. A math coprocessor
is NOT required since
mulinuz has math emulation built in.
A hard-disk in not required. Of course, you can mount the existing partitions on your hard-disks if you want. SCSI disks are not directly supported because of the huge variety of controller cards. If you want SCSI support please read How can I personalize muLinux?
In order to personalize the root partition, muLinux has a script
setup, see setup -h ) which is able to read (
setup -r) and write
muLinux configuration to and from the floppy, the
type of keyboard, ethernet data, where the mouse and modem are located,
which modules the kernel has to load at each boot, the phone number of
your ISP, and so on. Thank God, you only have to bother with this configuration
the first time you boot the floppy. The user, however,
is able to type a command like
setup -f ppp or
setup -f net
each time he wants (
-f means "force"). Or, if you want, you can
setup -f -a, where
-a means "all". In order to use the
floppy in various positions, the
setup command manages
a sort of "multi-configuration". You are able to switch from
to another one whenever you want. You can save different
configurations with different names. For example, with
setup -r "home"
you can load a configuration with only ppp support; with
"pc12" you can load a configuration for an ethernet card and the IP for
PC #12. All this stuff resides in the
/init directory of
the BOOT segment, while the current configuration resides in
When muLinux boot, setup ask you for a configuration to load. Special config name are "NONE" and "lock": with NONE, setup skip any operation and if your last saved config is named "lock", setup load them without confirm.
setup command, you can also load in memory a
compressed modules: setup -m module_name, and other.
Starting from version 2.0, muLinux is able to install itself not only in RAM, but permanently into a DOS directory (UMSDOS installation) or into a free partion of your hard-disk (EXT2 installations). You only need about 8-10M of free space somewhere on your hard-disk.
To perform this kind of installation, the muLinux kernel comes
DOS support, and we added
to the floppy. In both cases, we use
loadlin to boot muLinux, so
it is necessary to start from the DOS prompt with the command
linux.bat. The reason behind this choice is that muLinux was
built to be used temporarly on PCs which we do not own: we must
perform non-invasive and easily removable installations.
UMSDOS installation realizes this concept: you can share disk
space between Linux and DOS; you do not have to repartition hard-disks
and you can remove it without particular effort.
EXT2 installation, on the contrary, is just a curiosity and it is
the only intrinsecally dangerous one: muLinux will have to format the
chosen partition (like every Linux installation floppy) and it is possible
for a novice user to chose the wrong partition. By the way, if you
really have a spare partition sufficiently big, why don't you install
a true Linux?
At this point you will be asking about the title of this
section. Actually, what we described until now are not real
installations but actually a cloning process. The entire muLinux
filesystem (even mounted devices) is copied (with
cp -a, that's
true!) into the chosen destination.
Just a few word of advice: do not leave your cd-rom or any NFS volume mounted while cloning mulinux if you do not want the entire universe being replicated into your DOS partition!
Cloned muLinux systems work just as normal systems mounted in RAM. Setup and autoconfiguration procedures are consistent between the three installation modalities. The user will not notice any difference. This feature makes muLinux different from similar floppy-Linux offerings, which have a stronger link with the floppy.
The cloning process (see
muLinux and the sheep Dolly), which can be run by the user with the
clone command at
any time, will automatically start when the system recognizes that there
is insufficient RAM available (<4M).
In this case, muLinux stays at "runlevel 3" (only the
commands available), immediately creates a swap file in the DOS
partition, and starts cloning itself without delay.
When you see the message
Automatic reboot in progress, extract
the floppy and start DOS. At the dos prompt cd into
linux.bat: the cloned muLinux will soon be up and
The first boot of this new system is exhausting like the pains of a
muLinux realizes that some components are missing (typically
X11), it starts copying them from floppy to HD.
If instead you manually cloned muLinux starting from a RAM-mounted
system already configured, the cloned system will already be complete.
Beware that on a 386 with 4M the entire cloning process and "re-animation" can take more than 15 minutes the very first time, but you will then be able to see XWindow starting on your 386!
Starting from version 3.0, code-name "Hammameth", muLinux is able to install its root filesystem via NFS (Network File System), provided you have a working LAN-server supporting this traditional TCP/IP protocol.
The nfsroot-service is configured with the usual setup procedure (see The setup command): muLinux will ask to configure the Ethernet parameters and to specify the nfs_root, i.e. the remote directory containing a Linux system (which can also be a copy of muLinux).
muLinux kernel was slightly modified in order to mount the "real root" only after the configuration of the variuos network drivers: muLinux kernel is modular, so it is not possible to configure these drivers via the usual boot parameters (nfsroot= and nfsaddrs=). The patch is so tiny (just one line) that it can be the subject of an email or it can be written on a stamp!
For example, suppose your muLinux clients have IP addresses given by (in dot-notation) 192.168.1.x, and that the nfs_root is /remote/root. The /etc/exports on the server could be something like
#/etc/exports /remote/root 192.168.1.0/255.255.255.0(rw,no_root_squash)
Once you saved the configuration on the floppy (with your favourite name, for example "nfs"), the next time muLinux is booted you only have to request this "nfs" configuration: muLinux will configure the network drivers and mount the nfs_root.
If the remote system is itself a muLinux system, it is possible that at the first boot the "remote" muLinux will ask you to restart the setup one more time. Forgive him: how can he know that you already answered all those questions?
In order to prepare the remote system it is enough copying the entire muLinux tree into the server's /remote/root. Another solution is exporting the entire server's root (THIS SOLUTION IS NOT SAFE).
If you have a spare EXT2 partition on the server (/dev/hdb1 for instance), you can also prepare it with a working Linux distribution and export it to the workstations. In this case it is enough to mount this partition at boot time (place the line "mount -t ext2 /dev/hdb1 /remote/root" into one of the server's boot scripts) in order to make it available to the clients. The clients' /etc/fstab should contain something like
/dev/nfs / ext2 defaults 1 1
If the client needs swap space, it must use a local disk: muLinux kernel is not able (at this time) to swap via NFS.
For machines with low memory (less than 4M of ram), the boot process is slightly changed: muLinux will immediately ask if you want to clone the system to disk (like previous versions), or if you want to mount root via NFS. With little effort it is possible to transform your 386 into a diskless workstation based on Linux+XWindow. This solution is very cheap and efficient for many schools with obsolete computer labs (like many Technical Institues you can find in Italy).
______________________________ __|__ ___|___ | | local network | | ______ PPP-link to provider | PC | 192.168.1.0 | Linux |--|modem |------------------> | | | Router| |______| x.x.x.x |_____| |_______| (dynamic IP-address) pppd
IP filtering firewall is designed to control the flow of packets
based the source, destination, port and packet type.
In muLinux (version > 2.7,
setup ipfwadm) You can
enable IP masquerade feature and IP generic protection
on a Linux server, allowing connected computers (running TCP/IP,
but without registered Internet address) to connect to the Internet
through your muLinux box.
The floppy is made up of 1722 blocks of size 1024K. It is logically divided into three parts:
An ext2 non-compressed (i.e. mountable) file-system. It
will be mounted under
A gzipped ext2
file-system image, obviously mounted under
bzipped ext2 file-system image. It will be mounted under
The X11 floppy addon (1772K) is, instead, in tarred+bzipped (tbz) format.
The kernel is loaded, as usual, via LILO. When the kernel is loaded,
/sbin/init. BOOT is mounted from the floppy
/startup, while USR is mounted under
as ramdisk. Accessing
/startup we are able to permanently
save to floppy our muLinux configuration: see section
The setup command.
Startup scripts take also care about creating a fourth partition into
RAM, loaded under
The Linux kernel has a limited capability to accept information at boot in ther form of var=value entry. In general, this is used to supply the kernel with information about hardware parameters.
Boot-prompt arguments typically only apply to hardware drivers that are compiled directly into kernel, so in muLinux this feature is rarely useful.
If You, at "boot:" prompt, press [SHIFT] or [TAB] key, LILO waits for the name of a boot image (in our case: mulinux) and pass command-line options to the kernel. Example:
boot: mulinux root=/dev/hdb2 vga=extended
This is a brief list usable with muLinux kernel:
specifcs the VGA text mode: normal (80x25), extended (80x50), or "ask".
mount this device as root partition.
specifics the name of init program to execute, ex. /bin/sh, or /bin/rc.1,etc. This is useful for recovery purpose.
specifics the amount of installed memory (if BIOS report is bad).
avoid muLinux root loading.
If You want to supply an alternate mountable root floppy, instead of muLinux standard ramdisk (low-memory system) you can type:
boot: mulinux load_ramdisk=0
The kernel ask you "Insert ROOT floppy ..."
If You want mount an existing EXT2 root partition, type:
boot: mulinux root=/dev/hd...
This list is always a work in progress: whenever I free space on the floppy the list will grow.
/bin/ash: I know it's ugly, but it is much smaller than
bash and it's the same as far as scripts are concerned. "Command history"
approximated support with
help interactive command (VAX style)
elvis tiny (standard UNIX vi clone)
ae Antony Editor (but this on X11 floppy).
Many national keyboard mappings. Codepages: 437,850.
Serial mouse. Bus Mouse: PS/2 (aux port style): /dev/psaux; Logitech BUS Mouse: /dev/logibm; Microsoft BUS Mouse: /dev/inportbm.
Dos, UMSDOS, Windows, vfat, NFS
nfs.o module), WfW/NT fs share Samba/SMB (
isofs.o module). Commands like
date (emulated by clock),
lsmod etc. I dreamt of not
gzip and using the
z option of tar. But tar only
You won't find either
unzip: these are rather big. Maybe
in the future.
lp.o module, by request plus a simple
with escape codes (no spooler). muLinux support only ASCII,
POSTSCRIPT (i.e. Apple Laserwriter) and
HP-PCL (i.e. Laserjet) printer, but print only this format: ascii, pgm,
tiff (g3,fax). Starting from 4.0 release, muLinux support also
remote UNIX printers, BSD style.
ipfwadmfor masqueranding & forwanding processes,
netcat, a general purpose TCPUDP port scanner.
but the modules are on the floppy.
You just have to gzip your own module, and put it on the floppy. See section
How can I personalize muLinux? for further details.
pppd commands. Configuration is automatic and you
start PPP typing
PPP mulinux setup also provide a way
to link together two PCs (or a local network to the Internet),
via null-modem serial cable.
fetchmail only a few K, perfectly
working, with the
-F (flush) option, but also a true
sendmail compatible with the
real one, wich support smarthost and offline processing.
I tested it with pine from my "big" Linux. You can use the
From: field you prefer (
Mail processing with
symlink `mail` (offline supported).
mitermcommand, similar to
minicom, for remote modem session.
agetty(dialin session) and
efax(send, receive fax)
fax script allows You to make,send,receive and print fax files, with
efax packages (C) Ed. Casas. Tested with USR Sportster 3.66, but will
work with any modem, I hope.
sound.omodule (SoundBlaster) and
PC-Speakermodule+patch (by Michale Beck). On my PC the SoundBlaster works. In some cases it may be necessary to give the kernel extra options
mpg123to play MPEG files (layers 1-2-3) (X11 addon)
vrecto record with your microphone.
playcdto listen to cd.
.aufiles directly to
lynx, version 2.6 a fully-featured World Wide Web (WWW) client for users running cursor-addressable, character-cell display devices (e.g., vt100 terminals, vt100 emulators running on PCs or Macs, or any other character-cell display). It will display Hypertext Markup Language (HTML) documents containing links to files on the local system, as well as files on remote systems running http, gopher, ftp, wais, nntp, finger, or cso/ph/qi servers, and services accessible via logins to telnet, tn3270 or rlogin accounts.
netcat. Its one and only notable feature is its size in bytes: 3713.
inews(emulated) used by Lynx for newsgroup posting.
Chimeragraphical Web Browser (in X11 addon)
Starting from release 2.3, muLinux comes with some rustic "servers and daemons" support. A muLinux server is, generally, a shell script (often netcad based) running via init(8) at "runlevel 5", without inetd. Servers shutdown with "init s" and restarts with "init 5"; "init q" update the init(8) status. This list will grow, I hope.
PygmyWWW server, a simple httpd server (2202 bytes), supporting multi-connections,download and directory browsing. Try with lynx://localhost/
atd) daemon for deferred execution (command like
fortune (classical Linux fortunes, in latino),
paganini, piano (sound games)
reverse, blue (solitaires).
mu -i command supports creation of various floppy models, of
size 1440K or 1770K. For example, the two floppy model
BOOT+ROOT(1722K) and USR(1722K), allows to increment the number of
binaries put in ROOT (
/bin) and in USR (
The model BOOT+ROOT(1440K) and USR(1722K) boots much more rapidly.
mu -i has a drawback: DOS-installers cannot choose the model
but they must accept the default BOOT+ROOT+USR on a single 1722K floopy.
This is because LILO is not available as a DOS program.
Tecnically, building a floppy is just a command similar to
cat BOOT ROOT > /dev/fd0, but LILO is necessary to modify the MBR.
I do not know a simple way to do this under DOS (without LILO).
Finally I don't think that distributing a BOOT.1440 and a BOOT.1722 would be a good idea.
See also the file README.custom
Neccessary kernel functionality to do 'mu -r':
- loopback device support
The right versions of 'fdformat', 'lilo' and 'bzip2' are included.
The root partition resides on the floppy, split into two parts (see
What happens at boot time?):
The first part (ROOT) just
contains the directory structure (
The first thing to do if you want to build a custom muLinux is
to unpack the BOOT,ROOT,USR and X11 images with the command
It will unpack the BOOT partition under subdirectory
and ROOT+USR+X11 under subdirectory
Now, add, wipe, replace commands as you like.
If you want to change the kernel, compile it with
make zImage and
copy it under
The necessary modules must be
gzipped and copied in
It is often necessary to specify parameters like
irq and so on
load a module. If your
X.o module needs extra parameters just
write them into
tree/startup/modules/X.param, remembering that
muLinux loads modules with a command equivalent to this
insmod X.o `cat X.param`
Please note that you have to compile
UMSDOS file-system support
ramdisk support directly into the kernel because they are
needed at boot time for UMSDOS muLinux models.
If you look into the
mu script you will find a variable called
BOOT_FREE: with it you can tune the free space you want on the BOOT
partition, where all configurations are saved permanently and
where you may want to save you emails for instance.
Custom keymaps are located under
tree/startup/init/README for customization instructions.
You can save a
mailrc and/or a
You will find the contents of this directory under
You may change this directory without restrictions. If you ran out of space
this is the place to look if you want to purge commands. Remember that
lynx is the biggest executable on the floppy.
When you finished customizing muLinux just type
to rebuild the floppy-image. Pay attention to error messages! If everything works fine reboot now your brand new muLinux!
mu -r mu -x # this if for X11 subsection
This addon consists, basically, of the VGA-16 XServer, the fvwm95-2 & Afterstep Window-Manager and the XFM Application & File Manager.
muLinux mounts the content of this floppy (approximately 4.2M not compressed) under
/usr/X11R6. You will find the new binaries and libraries into
Configuration files are located under
/usr/X11R6/lib/X11, the initial choice of X11R6 developers.
Maybe you want to take a look at the following files:
/usr/X11R6/lib/X11/XF86Config: configuration of the X server;
/usr/X11R6/lib/X11/fvwm95-2/*: fvwm configuration files;
/usr/X11R6/lib/X11/afterstep/*: afterstep configuration files;
/usr/X11R6/lib/X11/xfm/*: xfm configuration.
The XKB feature is disabled: national keyboards are directly exported into X. Finally, a lot of fonts were simply deleted.
Anyway, you will find these X programs: xcalc, xclock, xload, xhost, xmodmap, xsetroot, xinit, xcal, xmixer, pyro, xsnow and xterm.
xterm can be used to run every text-mode muLinux command (lynx, minicom,
xhost is interesting because it allows the local X server to display applications running on a remote workstation.
If you have 16-32M of avalaible RAM, X will run at a terrific speed!!!!
In this 1722K floppy, coming with 4.0 release, some utitily for C developers.
as-- the portable GNU assembler.
gcc-- GNU project C Compiler (v2.7.0)
cpp-- The GNU C-Compatible Compiler Preprocessor
make-- GNU make utility to maintain groups of programs
ar-- create, modify, and extract from archives.
ld-- the GNU linker
ldd-- print shared library dependencies
ldconfig-- determine run-time link bindings
strip-- discard symbols from object files.
flex-- fast lexical analyzer generator ("lex" replacement)
bison-- GNU Project parser generator (yacc replacement)
f2c-- FORTRAN to C translator.
p2c-- turbo-PASCAL to C translator.
qb2c-- Quick-BASIC to C translator (source package)
g48-- C to RPN (Reverse Polish) translator for HP48G (source package)
Moreveor: trues UNIX man pages for ALL that and many sources in /gcc/usr/src, for testing purpose.
This document was written in SGML, and then rendered using the sgml-tools package.
You can find the latest version of this document at http://www4.pisoft.it/~andreoli/mulinux.html.