*** Please help me launch my first Kickstarter: MySliceOfThePie and Learn Python on Raspberry Pi! ***

Levinux – A Tiny Version of Linux for Education

January 19, 2012

This is the fastest way to start getting hands-on experience with Linux Server. Start your life-long love affair with the “short stack” (V2.4).

LevinuxLevinux (download ~20 MB) is a tiny virtual Linux server that runs from USB or Dropbox with a double-click (no install or admin rights required) on Macs, Windows or Linux PCs—making it the perfect learning environment, and way to run & keep your code safe for life! Think of it as an introduction to old-skool “short stack” development—more relevant now then ever as Linux/Unix gets embedded into everything.

Levin-whuh? What’s this guy trying trying to accomplish?

Sparked your interest? I’ve made videos to help you learn Raspberry Pi, Python, vim and git. Or just get to know me and my dog.

What I propose…

Even if you never programmed before, I propose starting teaching you how to do it “old skool” within minutes of reading this. Download and double-click the Levinux file, and follow the instructions. It could expand your abilities and alter your life. After this virtual machine, I propose putting real hardware like the Raspberry Pi into your hands at the whopping expense of $35 so you can continue on a better-than-virtual system. The “short stack” will still apply — as it will to every other computing situation you ever encounter, with the exception of those designed to entangle you in vendor dependency.

My approach is at odds with today’s paralyzing array of tool-choice — and that is precisely why it will give you an edge over the competition. In short, I propose you take up the “core technologies” that lurk underneath everything, instead of the more heavyweight modern software fads. This will let you achieve greater mastery over a smaller set of timeless and infinitely useful tools. They will serve you for the rest of your life, and even if they don’t become your main thing, it will always be like always having the Swiss Army Knife of information tech in your pocket… though there is also no reason you couldn’t build an empire on it.

And I’ll admit it right here. I view Levinux and Linux just as a means to get a consistent Python code execution environment available. All Python tutorials I make in the future will be identical to your environment. Imagine that? Perfectly reproducible results, because it lives in a virtual box that instantiates identically under 3 different host OSes. All you Reddit’ers who can even grok such notions, consider. This is the pre-Raspberry Pi Pi. It’s the kicking the tires of text-based Linux with no graphics beyond talking to a browser—probably through a Web server, which is like project #1 of what I’ll be presenting here. And all knowledge almost 100% transferrable to other similar things. See the dots getting connected?

Vote on Hacker News

DEVELOPER HELP REQUESTED: Do you know how to compile QEMU binaries for Windows, Mac and Linux with configuration files custom tailored to your needs? I could use your help! Everyone else who just wants to learn Linux, keep reading down this page.

What does Levinux look like?

When you double-click the launch script, a black window that looks much like this will pop up. The first time you run Levinux, it will “inflate” by hitting a software repository to pull down a webserver and an SSH server. You need an Internet connection and not-too-restrictive firewall for this to work correctly.

Learn Linux

A journey of a thousand miles begins with a single step

The videos below will give you a little more idea what to expect. The first goal here is to make an easily reproducible positive old-school Linux Server experience for you, no matter what platform you’re starting out on. There is great reward in this (for reasons described elsewhere), and it is my heartfelt belief many more people can do it than give themselves credit. This stuff just LOOKS intimidating if you don’t have the right introduction (what I’m trying to do here). But just like anything else, once you get through the difficult initial first tries and stick with it, everything starts to make sense, and come naturally to you. So, have no fear. There is nothing you can screw up. You can just unzip Levinux again and try over. Easier still, you can double-click the Reset icon to set it back to its initial state. Work your way through these same experiences these videos describe, and you’ll start getting the foundation for a timeless, valuable, and nearly platform independent approach to programming. So welcome on board, and there’s a few places you can reach out to the burgeoning Levinux community.

Levinux Community

Here’s what Levinux looks like booting the 1st time

And here’s why it works great with Dropbox

Learn how to program Python, a Hello World example

And here’s an introduction to the git distributed version control system

Here’s resetting the server and some file layout explanation

This is an introduction to Python Web development work with bottle.py

How to use pip, the Python software repository, and make installs permanent.

Only for Advanced Linux folks, modifying Levinux Recipes

Okay, what is the ultimate goal here?

There are tons of approaches to learning to program, and reasons for doing so. You might want to build an empire, or just have a few extra skills in your back pocket. Levinux supports your pursuit either goal and everything in-between. It does this by focusing on one particular “short stack” approach: learning the least-possible software possible of the most timeless nature to enable you to do interesting things. It can be your primary programming environment, or just sort of a safety-net as you pursue other more sexy platforms like mobile app development. Programming is just automating machines to do your bidding, with a just little more control than The Sorcerer’s Apprentice. But still that provides a pretty good model for the broad, important concepts you’ll be mastering if you stick with me: Become a Tech Superpower

Under The Hood

Note: this will read like blah, blah, blah to newbies who can focus on the videos. But here’s the it is for all you Reddit and HackerNews folks…

Levinux is based on Tiny Core Linux and QEMU. Tiny Core is an extremely minimal distribution of Linux created by Robert Shingledecker, the guy who “matured” Damn Small Linux (DSL) into such a creative and popular distro and was responsible for the United States’ first large-scale municipal government Linux install. Tiny Core’s philosophy comes from the world of “embedded systems” where operating systems aren’t generally installed across hard drives and allowed to go corrupt over time. Instead, it’s a perfect state on every boot-up. Tiny Core is in-turn based on BusyBox, which is a tiny program used in many embedded systems that replaces what is called the GNU commands—or really, the OS proper, which is what gets Tiny Core down to ~20MB.

Levinux is also based on QEMU, which is a computer emulator used in Android development, Oracle VirutalBox and the Linux kernel virtual machine. I am currently using the most popular mainstream binaries pointed-to by the QEMU website after a long adventure of trying to compile my own, and am in the process of recruiting QEMU and Linux kernel gurus to help with this project. Yes, there’s nothing wrong with starting out with Debian, Arch, Fedora, CentOS or any of the other fine GNU-based Linux distros, but I propose to get you on your way within seconds of a tiny 20MB download.

If it makes you feel better, consider Levinux a stepping stone for newbs, because it gives you a taste of Linux Server and sets you on your way to being able to do SOMETHING within minutes, instead of fiddling around with LiveCDs or hard drive partitioning. And the work you accomplish here is as valid as the work you accomplish anywhere else. Python is still Python. vim is still vim. git is still git. Push your code up from Levinux and pull it down from whatever other system you end up using in the future. You might even learn something more than starting with Debian or such, because a true short stack only has what you intentionally put there and plan on using—which is also a better security model, scales better, and installs on a wider variety of hardware than kitchen-sink distros.

System Requirements

Pretty much any modern Mac, Windows or desktop Linux system with about 60MB free on the hard drive will do. I’m still working out problems from 64Bit Linux desktops, and will put the full list of tested OSes and versions here at some point in the future. But since it’s only a ~18MB download that inflates fully out to only about 60MB after the Python, vim and git server build, and no install is required on your host system, why not just download it and give it a try?

Known Issues

  • A lot of firewalls break Levinux’s initial run and server-build. If you get a login and not a menu, it’s likely a firewall issue. Stop trying! Run Levinux somewhere else, if you’re determined.
  • Many things like Google AppEngine host conflicting websites on port 8888.
  • It’s tricky to zip the file so it decompresses with proper permissions for all OS host platforms.
  • Some Linux distros refuse to run .sh files with a double-click regardless of permissions.

Frequently Asked Questions (FAQ)

About how long on average is it between version changes in Levinux?

Levinux is Inspiration+My_Reality-ware. In other words, it relies on my inspiration and is subordinated by my reality—being that my greatest professional value is answering questions and doing neat tech tricks for customers with deep pockets and regular budgets. The success of pop culture pays for my altruism. That means I can't do what I want at the rate I want to. That, plus I'm now a Dad of a 2&1/2 year-old that I will be helping to educate, and that will consume a lot of my time. So, I've got at least three lines that must converge before you see the perfect storm of awesomeness that is Levinux that I foresee: First, my day-job has to buy into the fact that the best thing I could be doing for the company is performing cool open source projects in public, coming into compliance with GPL, sharing back to the community, and doing it in lifestyle-creating ways that simply hasn't been done in public before—and certainly not for/by a marketing agency. Maybe Marco Arment pulled off precisely the trick I plan. But he did that as a professional programmer in the programmer-for-hire circuit. I plan on doing it while working for the man... low-risk... something all the common wisdom tells you can't be done. Well, I'm just displacing the risk. You'll see! Second, I need to merge two projects on which I'm currently working: 360iTiger.com and MikeLev.in/ux. They are incredibly complementary projects, that it would be a crime for me to not unify them. Fortunately, one of my assigned tasks right now is "extracting" Tiger functionality to run in a stand-alone fashion as a callable script. Even just that request is loaded with the need for more project qualifiers. They have to do with input/output queues... timing, formats & protocols, robustness, scalability, and basically everything one can imagine in the types of beyond-the-web information systems that an individual must be able to control and master without a team should be capable of. This is the "core-tiger" code once you extract all the Google Spreadsheet dependencies that it is riddled with today. It makes the UI awesome and tasks definable and perform-able by almost anyone. But it can't be scheduled or scaled or distributed easily. Again, my current time-crunch assignment is actually the perfect merging of my day-job and my passion. But because of time-crunch, I will probably be taking shortcuts and not documenting it and making it a tutorial. It is just work that will get done... but it sets the stage for step three. Work and passion merged! They let me perform stupid FOSS tricks in public, abiding by GPL in the most sharing sense. And my day-job work and passion merge. Step 3? Thirdly,  I have to 6-minute-ify the parts of this experience that are important step-1 encoding built strongly and directly on the previous step. The less obvious and more important the nuances are in each step, the more sophisticated and awesome of a system you have. It'll look straight-forward and stable... but suddenly you discover a macro-effect emergent property of that molecule or crystal-structure that wasn't obvious at first, but oh so important! ...like semiconducting!!! If that sounds strange... well my first Levinux videos were easy to conceive-of and produce because the lessons were clear and necessary in my mind. You cannot bootstrap yourself without bootstrapping processing space and initial tasks. So, there's me making the magical POOF, you're booted moment. Then, there's the need to remote login (not everything will have screens or high-bandwidth connections—think "rice-sized" computers). Terminal control is a must. Then, a powerful-enough and always-there text editor is the second, then a language to write in and a way to keep your code safe for life are the third. I accomplished all that. In a very real way, my main goal of Levinux is done, and all I'll be doing is getting the process with the qemu executable on each platform more bullet-proof and solid. The feature-set might not change much at all from today. Maybe I'll get in-sync with the latest heavily-used Python, and keep dependencies from breaking... stuff like that. But thankfully, I get to merge my work-project with Levinux, so there may be a special bonus coming. But then most of my new activity will be all about Python (and git), and not so much about Levinux anymore. Stay tuned!

vim: What’s the big idea? What’s the Python workflow?

Q (via Rommel Asibal on website): First off i want to say really nice work on Levinux, its got tons of potential.  I am teaching a beginner IT class and showed it to my students and they think its pretty cool. I'm curious about your idea about vim though.  Can I ask what your workflow is when using vim with python?  I look forward to seeing your ideas on vim in the future. A: vi is the de facto standard Unix editor and part of nearly every Unix and Linux installation - EVEN the embedded stuff (a text editor even in Linux wristwatches, and stuff) because its part of BusyBox. So, you will never be at a loss for a text editor if you use vi. In fact, vi is part the industry-standard definition of Unix called POSIX. So, if it doesn't have vi, it can't even be called even be called standard base Unix or Linux. So in other words, vi is reliably there—and that's half the battle with a text editor in many cases. However, vi alone isn't really powerful enough nor provide enough conveniences to be your main text editor for life. I would not recommend focusing on vi as a replacement to an integrated developer environment (IDE). If you want an IDE, maybe Eclipse based on Java is what you want, or invest into the proprietary worlds of Visual Studio or XCode. But if you want to be free of both vendor lock-in and the encumbrances of the Java Runtime Engine (JRE), and also want to be learning the ubiquitous vi, and ALSO want a powerful alternative to an IDE that IS powerful enough to be with you for life, then vim is a very good bet. vim is like vi on steroids. Learn how to use it, and you can both be moderately functional editing text on any system you sit down at, and super-functional when you sit down at your own machine with your own special customizations. To answer the last part of the question: My workflow is edit Python code in vim, then jump over and run it in another remote login shell window... or alternatively in the case of Web programming, run it by stopping and starting the server and doing a refresh in my web browser. The workflow is made further robust and supporting of text, development, deployment and production servers with the addition of git or Mercurial. Then, steps such as commit and push and pull get added to the workflow, and the details vary per application goals.

Why is Levinux so small? Is it real Linux?

Levinux is based on Tiny Core Linux,  which in turn is based on BusyBox Linux, which is an extremely scaled-down clone of the the GNU command set. BusyBox is about a 500 kilobyte file (not even 1 meg) that is commonly used in embedded systems where the developers want Unix-like functionality but without the hundreds of megabytes of a full install. The tiny size of BusyBox allows the system to be smaller and boot faster, making it perfect for use in a myriad of devices, and exemplifies an alternative "world of Linux" than the more familiar desktop versions we know as Ubuntu, RedHat and others. So while tiny, Levinux is still entirely legitimate, and just as much Linux as mainstream desktop distributions. What you learn on Levinux will most often directly transfer over to the desktop Linux world if that's your intention.

Is Levinux just Tiny Core Linux on QEMU?

Most of the interesting things going on in Levinux are a result of features in the Tiny Core Linux distribution and the QEMU computer emulator. Levinux simply connects a few dots to result in some very unique features. Specifically, the special file arrangement plus the QEMU launch-scripts provide the ability to run Levinux with a double-click from any x86 desktop. Next, a few commands in a modified bootsync.sh file that is remastered into microcore.gz results in the Levinux server-building recipe system. This connecting of dots releases the tremendous potential of these two products working together that has always been there.

Revision History (View files)

Current version: Beta 2.4

  • Attempted to make the Mac binary more broadly compatible. Tested on 10.8.5
  • Mac QEMU compiled in Homebrew again. QEMU  version 2.0.0.
  • Removed 64 Bit Linux files for simplification of testing. 32 Bit runs on 64 Bit systems.

Beta 2.3

  • Mac QEMU (version 1.6.1) now being compiled from source via Homebrew
  • A lot of .dylib files added for new Mac dependencies (until I solve Homebrew static linking issues)
  • Radical altering of start script for Mac version to use text-only curses mode and eliminate pointer grabbing
  • 64 Bit Linux QEMU now being compiled from source (now in parity with 32 bit version)
  • Moved keymap files out of subfolder so Mac qemu binary could find them.
  • Added efi-1100.rom for Mac qemu binary dependency.

Beta 2.2

  • Changes in this version will only be visible to 32-bit Linux users
  • Ubuntu users MUST now click “Run in Terminal” after double-clicking Levinux.
  • Big step towards using updated qemu binaries, but only on 32-bit Linux
  • Replaced qemu-system-i386 with a static compiled curses enabled version
  • This should eliminate pointer-grabbing on 32-bit Linux
  • This is a prelude to doing it across all platforms: Windows, Mac and 64-Bit Linux
  • This is also a prelude to formal GPL compliance

Beta 2.1

  • Broke Webapp2 out into optional Libraries menu
  • Added color coding to Libraries menu to show what’s been installed

Beta 2.0

  • Added support for OpenSUSE 12.3 64-bit
  • Added the requests object for Python, because it is the right thing to do.
  • Added webapp2 framework to make it similar webdev to Google App Engine.
  • Made entire /usr/local/lib/python2.7/site-packages directory persistent after every time “filetool.sh” -b is run. This makes pip package installation and persistence MUCH easier under Levinux.

Beta V1.9

  • Added libSDL-1.2.so.0 for Ubuntu 13.04 64 bit compatibility
  • Added a menu for easily adding common client libraries, starting with Google core APIs

Beta V1.8

  • Made pip persistent.

Beta V1.7

  • Added missing libraries for some 32-bit Linux systems.
  • Updated the README.txt based on user feedback.
  • Using an appended path for LD_LIBRARY_PATH for 64-bit Linux.

Beta V1.6

  • Corrected issues with Ubuntu 64-bit Linux

Beta V1.5

  • Replaced qemu Linux binary with qemu-system-i386 and qemu-system-x86_64
  • Changed Linux launch script to auto-sense 32 or 64 bit and use correct binary.
  • Added tce-load -wi python-distribute to Python.sh
  • Added sudo easy_install pip to Python.sh
  • Added entries to .filetool.lst to make pip persistent
  • Added pxe-rtl8139.bin and vapic.bin to MacOS folder per net feedback

Beta V1.4

  • Set the stage for a git video tutorial
  • Added curl and expat2 requirements for git when Python server builds
  • Added “export GIT_SSL_NO_VERIFY=true” to .ashrc for git pushing

Beta V1.3

  • Greatly enhanced tutorials at localhost:8080
  • Added bottle.py Python Web framework
  • Opened port 8888 for Python web development work

Beta V1.2

  • Added menu option #4 for installing Python, vim & git
  • Expanded Reset scripts to clean up Dropbox collision files

Planned longer term improvements

  • Eliminate use of SDL library. Replace with ncurses and pdcurses.
    • Get rid of “flashing” problem in Linux
    • Get rid of pointer-grabbing
  • Find or compile the “perfect” binary for each platform (older qemu’s?)
  • Find or compile the “perfect” Linux kernel (less hardware support)
  • Compile & submit my own optimized Tiny Core Linux extensions
    • Get rid of XLibs and other graphics related overhead

Call For Help: QEMU & Linux Kernel Gurus

I need QEMU compiled with barebones hardware support and ncurses/pdcurses support. The binaries should be as small as possible, with as few dependencies as possible—which means probably not the latest version of QEMU. So, I need to choose the ideal QEMU version, and strip out as many of the hardware support options as possible, for Linux, Mac and Windows platforms. I also need a similarly minimal Linux kernel. If you’re a QEMU or Linux kernel guru interested in helping with the Levinux project, I want to hear from you (use the contact form on the side).

Minimal Linux Distro Considerations

I chose Tiny Core Linux due its all-in-RAM embedded Linux philosophy along with its decent software repository system, but I am always keeping my options open, looking for better cloud compatibility. Here are some versions I’m keeping tabs on:

  • Tiny Core Linux – Chosen due to nearly incorruptible all-in-RAM embedded OS philosophy.
  • TTYLinux – Installs on Amazon EC2 and uses the more standard pacman package manager. Very strong contender.
  • Slitaz – Seems more popular and “user friendly” than Tiny Core.
  • Aboriginal Linux – Aboriginal Linux is a shell script that builds the smallest/simplest linux system capable of rebuilding itself from source code.

The Levinux Forum

Home Forums Levinux

This forum contains 64 topics and 184 replies, and was last updated by  Dave Amata 2 months, 1 week ago.

Viewing 15 topics - 1 through 15 (of 64 total)
Viewing 15 topics - 1 through 15 (of 64 total)
Create New Topic in “Levinux”
Your information:





Like my site? Please show me!




Kickstart MySliceOfThePie!