Linux on a stick

This may not be as interesting as multidimensional spirituality, but it may be useful to some people for a few years. Of course, the world of computing changes so fast that this will have no lasting value. But then again few things have in this world.

Recently, the first reasonably fast USB memory sticks (memory keys) arrived. Before, it had been a handy but slow medium. And the capacity was not much to write home about either. Recently, we have got much bigger memory keys, and then we got a breakthrough in speed as well. The 16 GB Transcend JetFlash 600 dual-channel memory stick is noticeably faster, especially noticeable in writing speed, which is traditionally a bottleneck with flash storage. Actually, it is still a bottleneck, but it is a wider bottleneck than before. It is not all that useful to have a large memory that you have to leave overnight to finish writing.

With its speed and capacity, this was ideal for my experiment: To install Linux on a memory stick. I had already made a small (2GB is small these days!) boot key with Ubuntu 9.10, the most recent complete version. There is a new version in beta, it should be official any day now, but it was in beta while I tested this. Since it is still planned for release in April, it is called Ubuntu 10.04 (the format is year.month). I have tried both of these.

I started with 9.10. I already had this installed on one computer, and it includes a tool that lets you make bootable memory sticks. These work like boot CDs, except they don’t need a CD-ROM. This is handy with the new ultra-small computers, netbooks. (It won’t help with iPad, though, since it does not even have USB.)

So I first made a boot disk / installer on the small, slow key. Then I used that to install Ubuntu Linux, but to the Transcend instead of to the main hard disk. Both of the USB flash drives were on an Acer Aspire One, which is one of the earliest and weakest netbooks around. It does not even have a hard disk, only a flash disk, and a rather small one at that. Not having a hard disk or a CD-ROM saves a lot of battery power and weight, since there are no engines to spin, or moving parts at all. And since it already uses a flash disk, flash USB should not make that much of a difference.

It did not, at first. When I chose at startup to boot from the Transcend, it took a little longer to boot, but it was still tolerable. And once it was up and running, I could have a couple programs open simultaneously, like listening to music while surfing the web. The test seemed to be a success.

Seemed to. Having tested it with Ubuntu 9.10, I upgraded to Ubuntu 10.04. It was in alpha 2 at the time, a very early stage, even though the release was only weeks away. They sure have confidence. Of course, as with any large piece of software, it is sure to get a flurry of patches when a large number of people start using it for real purposes. With computer games, we call this phase “paid beta”, but Ubuntu (like most other Linux distributions) is actually free, despite the huge work that goes into it. Even so, if you are vaguely nervous around computers, you should wait 3-6 months after a new release before upgrading. With me it is the other way around, of course: I upgrade before it is even in beta.

It was fairly stable, although the new features related to social media crashed every day. This may have been because I ran it from a USB memory key on a machine that was weak even when it was first released to the market, but which I bought when it was already long in the tooth, and that again was a year or two ago. Ubuntu makes no pretense at being super fast – that’s its little brother Xubuntu. So it seems one of the programs was terminated when it did not load within a certain time, which had been decided by the programmers with no regard for extreme cases like my setup. This was later fixed, but there were still a couple related programs that crashed. Of course, the program was still not finished at the time. It is still not released as I write this, the final date is April 29.

Whatever the case, apart from having to start the gwibber (social media client) manually, it worked OK. Except that it grew slower and slower with each passing day. Then again each passing day saw me download perhaps a hundred or so updates to various and sundry programs and functions. I assume this was what slowed it down somehow, but I can think of no logical mechanism by which that would happen. Unlike a hard disk, fragmentation has no effect on flash drives. They don’t have a moving head – like the needle of an old gramophone – moving from place to place on the platter, like hard disks do. Solid state drives may write more slowly, but their read speed is unmatched. It probably reads as fast as the USB port and the processor can take it. Or should have.

I still don’t know. I know that when I took the stick to the HP Mini 2 (with 2GB RAM instead of 0.5 GB) it ran fast enough again. Unfortunately, after I installed that day’s updates, something went horribly wrong. It worked fine afterwards, but the next time I tried to start, it did not run on either the Acer or the HP. It did not even get so far that I could diagnose it and learn what was wrong. So I wiped it clear, installing 9.10 from start again.

I have upgraded it again, which took several hours as almost every part of the operating system was modified, or so it seemed. After this it runs fine again. I mean, it runs really well for a machine that is just barely more than a toy. Right now I have Opera running with 3 tabs, one of which plays streaming music. I also have a Terminal window open (same as a dos prompt in Windows) and the Ubuntu Software center where you can download innumerable programs for free. I am also in editing mode in an OpenOffice Writer document (roughly equivalent to Microsoft Word) and have open a movie player that has finished playing an Xvid movie that is stored on an external hard disk on my old Xubuntu machine. So that machine streams it over the local network to the USB stick on the netbook, which plays it. I played the movie with all these same programs open, except I did of course not stream music in Opera while playing the movie. There were a few cases of stuttering now and then through the movie when played in fullscreen mode, but not enough to make it unwatchable by any means.

The one thing I can’t do with it is install new programs in the background while working. But this is most likely due to the weak processor. In conclusion, it works quite well – as long as it does not suddenly crash forever, like it did last time. You should not overload it with a large number of open programs on a machine with little memory though. Writing to flash memory is much slower than reading, and if the system needs to swap memory to the stick constantly it will slow down, even with a Transcend JetFlash.