Friday, 15 July 2011

A portable linux distribution.

Summer is sometimes a great time to organize you life a little, and these weeks I've been busy streamlining the way I keep my computer-life organized. The most important things I did so far:
  1. Change my mail reading program to Gnus, so that I can now keep exactly the same mail reading experience wherever I am.
  2. Get all contacts and passwords into a usable format. Cleaning up the data is not finished yet, but necessary in the long run.
  3. Avoid wasting time; reclaim my privacy; do things locally, if possible: so I closed my accounts at: Facebook, Anobii, LinkedIn, Twitter, XING, Dropbox, Yahoo (which also deleted flickr, so I transfered all the pictures to Picasaweb with migratr). I'm still looking for a way to drop Delicious as well and organize my bookmarks locally.
  4. Get a portable linux distro that I can use to go quickly to my workbench whenever I happen to be using another computer.

A portable linux distribution.

Sometimes I need to work away from my computers, and doing so is sometimes a bit annoying: sometimes I cannot find a decent terminal emulation software to connect back to my workstation; other times the machine is using Windows; etc. So I looked at a number of small Linux distributions that I can put in a USB pendrive and carry with me at all times.

In the past I have installed a number of computers with PuppyLinux and this time I also tried SliTaz. SliTaz looks really nice, fast and small, but I had to go for something more heavy becuase hardware recognition is a bit flaky (as with many other small distributions). If I wanted to give a second life to an old computer, I certainly would go for one of these two, but in this case I wanted to get a Linux system that I can carry in my bag and that it will work in most computers without the need to tweak boot parameters, etc.

So, I decided to go with what I currently have in my workstation: Ubuntu 10.04.02 LTS (though 32-bit). To get it all working I did the following:

  1. Create a VirtualBox virtual PC and install the server edition of Ubuntu, with NO extra software.
  2. After first boot, install the "basics" (taken loosely from here): xserver-xorg-core, xinit, network-manager, lxde, alsa-utils, gdebi-core and google chrome (see how).  
  3. In the file /etc/NetworkManager/nm-system-settings.conf change "manage=false" to "manage=true"
  4. Make nm-applet to start automatically (see instructions).
  5. Install Remastersys (followed these and these instructions) and create modified ISO file.
    • sudo apt-get update ;; sudo apt-get install remastersys
    • modify /etc/remastersys.conf file
    • "sudo su" to become root and then run "remastersys dist"
  6. Test the created ISO file (I managed to get it down to 350MB) with VirtualBox. Once satisfied with the result it is time to make it into a LiveCD (just record it to a CD with, for example, K3b) and a LiveUSB.
  7. In order to create the LiveUSB, at my workstation (Ubuntu 10.04 LTS) I launch the "Startup Disk Creator", selecting the customized ISO file, and my 16GB USB pendrive. I erase the entire USB disk, and reserve 128MB (though you could reserve all the remaining space in the pendrive) for "extra space" to store documents and settings (see for example these instructions).
  8. Trial run: go to one of the "offending" machines, and reboot with the USB pendrive. It looks fine and I get both wired and wireless connectivity, though there are some small problems:
    • The persistence file seems to be working, but I always get a "Install Portable Linux" icon in the desktop.
    • The password I set for my account is deleted every time, so I just can login with no password.

 The mandatory screenshot:


    • I tried the same with the newest version of Ubuntu 11.04, but then I had problems booting from the USB (it would just show the "boot:" prompt, but then it would get stuck in there). 
    • With another, smaller pendrive (1GB), I also had problems: I managed to login the first time, but on reboot the pendrive would complain. No idea why...

      No comments: