September 25th, 2012
For no other reason that seeing if it was possible, I wanted to create a mobile development environment to allow me to (or anyone else) to code on “any” machine. Since I’m doing Beaglebone development on the side, I thought this would be a good chance to explore mobile environments. The goal was to create a full Linux development machine that could work directly from a USB flash drive, preferably within a virtual machine.
I was spending some time researching the concept of a mobile work machine/environment. With developments in cloud infrastructure and virtual machines, I figured that there is no real reason to work on a particular compurter, since all your information is now accessible from the web. Given this, it would still be nice to have your own setup, customizations, and files with you all the time, without needing to lug around a laptop. I was looking at the Imation solution for mobile secure computing called the Secure Workspace:
This is basically a bootable USB drive with Windows 7 installed on it that provides a completely secure workspace (file encryption, cloud storage, secure communication/VPN channels) so that you could theoretically plug it into any machine and work. Pretty interesting stuff, especially when it comes to BYOD policies that are taking over the workplace.
To try this out, I tried a number of Linux OS’s installed a USB thumbdrive and realized quickly that it just won’t work. USB2 thumbdrives are just too slow, especially if the OS is configured for swap or paging (Windows). Although USB2 speeds are fine, the read/write speeds of the USB stick just won’t cut it trying to run a full OS from it. Researching different distros optimized for USB sticks, I came across Puppy Linux (http://puppylinux.org). It’s not the sexiest on the planet, but it has some very nice modifications that make it totally usable from a USB drive. The best parts are low memory footprint, runs from a Live CD ISO distro but still allows for saving of your environment through a clever mounting/saving scheme, and very extendable system through the use of SquashFS sfs files.
After a little tweaking, I now have a complete development environment running Puppy Linux 5.2, Eclipse Juno, and the Angstrom build tools on a little Corsair USB stick on my keychain. I run it completely within a VirtualBox (http://virtualbox.org) virtual machine with only 1GB of RAM (could be 512MB). This way, I can work on the local machine, but have the development environment working alongside in its own window, with little to no loss in performance on the host machine.
I’ve checked the project into a public Git repository if you want to recreate the setup. Check it out at: https://github.com/mlmassey/puppycfg
Those most interested might want to grab the Angstrom cross-tools SFS for building projects for the Beaglebone.
Entry Filed under: Uncategorized