The Linux Router Project

A look at one of the fastest growing Linux distributions, that you may never actually see.

If you build it, they will come... The following definition can be found at http://www.linuxrouter.org/; however, LRP needs a little more thorough explanation than this:

Linux Router Project (LRP) n. A networking-centric mini-distribution of Linux. LRP is small enough to fit on a single 1.44MB floppy disk, and makes building and maintaining routers, terminal servers, and typically embedded networking systems next to trivial.

LRP began because of my intense desire to learn Linux. After mutilating an installation of Slackware and actually installing Debian 1.0, I finally had a clue as to what was going on. I planned to dive deep into TCP/IP networking and decided I needed a dedicated Internet connection for which I would need a router. Of course, I could have bought a router, but that would have been too easy (beside, I am too cheap). So I said, “Hey, let's build one. That will be a great way to waste countless hours—oops, I mean learn Linux.”

In my travels for information on building a router with Linux, I could not actually find anyone who made what I had in mind. Either they were using a full distribution on a hard drive, or something on a floppy that was so minimal a second complete machine was needed to configure the disk. I decided to try to make this self-contained “mini-system” myself. I started with a minimal base install of Debian 1.1 which totaled around 35MB and began slashing (and fixing what I had broken) until it was down to around 3.2MB. This was small enough to fit on a 1.68MB floppy as a gzipped initrd image. It was not pretty, but it did the job as a router for my 33.6K line, which eventually progressed to ISDN.

After several months, I wanted to take what I had made and create a more generic system for other people to use. I put out the call on Usenet and a few private lists, then began a mailing list with a handful of interested people. The rest, as they say, is history. That mailing list now exceeds 600 names, and at least 25 new downloads of LRP are done each day. This is all with LRP still remaining mostly unadvertised.

My single-disk hack job has evolved into a modular micro-sized operating system. It makes a capable base platform for just about anything you could want to build for “light”, secure, efficient use: routers to terminal servers, mini web servers to DNS cache and even doorbells. (No, I am not kidding.)

LRP Defined

First, Linux Router is quite small. The base root file system is only 2.5MB and compresses down to 830KB. With the addition of a kernel, it easily fits on a 1.44MB floppy with several hundred kilobytes to spare for kernel modules and additional packages. A Zip or LS-120 will provide seemingly limitless space. Flash RAM can also be used and companies like Sandisk and M-Systems make Linux-capable products.

LRP's root file system is contained in a gzipped tar archive. The directories /etc (etc.lrp), /var/log (log.lrp) and /lib/modules (modules.lrp) are broken out into their own archives for easier backup. At boot, the Linux kernel dynamically creates a MINIX file system on /dev/ram0 and mounts it as / (root). It then extracts the root archive (root.lrp), storing it in the / directory, then proceeds to execute linuxrc. linuxrc sets up the base root file system (like creating /dev) and then attempts to mount the boot device and install any remaining packages (such as etc.lrp, log.lrp, and modules.lrp). The remaining bootup is noticeably similar to a typical full-sized Debian Linux install.

The system will be running solid state from the RAM disk. This means all changes you make will have to be backed up to the boot medium. This is not a difficult task, as it is all automated by scripts that can recreate the root and add-on packages from package listing files found in the /var/lib/lrpkg directory. lrcfg is a menuing system that gives you a nice interface to the package backup system as well as configuration files and (minimal) on-line help.

Note that LRP does not have to run from RAM. It is perfectly fine just to dump the root and package archives to a hard drive partition and bypass the “embedded” RAM disk features.

Included in LRP

If you should drop to the command line, you will find ash as your default shell. ash supports full Bourne shell scripting, and nearly the entire LRP base is fully customizable shell scripts. Moving around at shell level, it will be hard to tell you are not using a full distribution.

Some of the finer details include complete SysVInit, cron, libc6 (glibc) and sed. The system and binaries are generally kept up to date with the current Debian release. Over 60 commands are available in minimal or emulated form (using ash and sed): cat, cp, dmesg, dd, grep, cut, passwd, gzip, tar, tail, mnc (mini-netcat), et al. Of course, all standard and many extended networking commands and daemons are also available: route, netstat, ipfwadm, ipautofw, ipportfw, inetd, telnetd, tftpd, routed, et al. Anthony's Editor (ae) serves as your editor.

If this is not enough, you can also load Secure Shell, pppd 2.3.5, Portslave RADIUS client, gated, snmpd and others. Add-on packages such as minicom and bash 2.0 are also available. Add-on packages are installed once and merged with the root archive at back-up time, unlike full packages which are kept autonomous.

Slackware users can stuff in almost anything else by hand. Remember that LRP is real Linux—just smaller. It is capable of running anything a full-size distribution can run, given the libraries and space.

______________________

White Paper
Linux Management with Red Hat Satellite: Measuring Business Impact and ROI

Linux has become a key foundation for supporting today's rapidly growing IT environments. Linux is being used to deploy business applications and databases, trading on its reputation as a low-cost operating environment. For many IT organizations, Linux is a mainstay for deploying Web servers and has evolved from handling basic file, print, and utility workloads to running mission-critical applications and databases, physically, virtually, and in the cloud. As Linux grows in importance in terms of value to the business, managing Linux environments to high standards of service quality — availability, security, and performance — becomes an essential requirement for business success.

Learn More

Sponsored by Red Hat

White Paper
Private PaaS for the Agile Enterprise

If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.

Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.

Learn More

Sponsored by ActiveState