Friday, February 4, 2011

Second Life on a stick

Ener Hax has written several great blog posts about running your own OpenSim server on a memory stick. In this post, the focus is not OpenSim, but Second Life.

Obviously, Second Life's sims and servers resides at some computer center operated by Linden Lab, and can't be put on a stick (at least not by us).  But the second life CLIENT, along with a suitable operating system, like Ubuntu Linux, CAN be installed on a stick.

Why would I want to do that?  Well, my rather security-concious employer has issued me with a laptop that is completely locked down when it comes to installing and running unauthorized applications. And Second Life, being officially categorized as a game by our firewall vendor, is definitely a no-go.  So to avoid having to lug around with two computers when I get to spend a night at a hotell and want to go inworld, I need a free OS on my laptop.

The trick that worked for me was to actually remove the hard drive from the laptop and boot the laptop with an Ubuntu install CD.  Then I inserted a 16GB memory stick, and started the Install.

This procedure also works for an external USB hard drive, btw, and since a HD is generally faster than a flash disk memory stick, you get a better result.  

When the install is done, I just put the hard drive back in place again.  So now, whenever I want a free computer, i just hook up the usb disk and hit escape when starting the PC.  This gives me a choice to boot from the USB stick, and it boots Ubuntu Linux with Second Life installed.

There are a few tuning tasks that must be completed for this setup to work well.

First, you need to define a RAM disk to use for caching and temporary file storage.  USB memory is not very fast, and if you let SL store it's cache on the stick there will be a rather annoying pause every few seconds. Codfather has a nice blog post about how to do this, including how to set up Firefox to use the RAM disk.  In the Second Life client, you choose preferences, Setup, and set Cache Location to /var/ramdisk. 

Then, you need to disable some services normally running in the background, all of them creating disk wait situations.  Go to System->Settings->Startup programs and disable things like disk warnings, external desktop, Evolutin warnings, update warnings, print services, check for new devices and Ubuntu One. 

Apart from the fact that this is a typical business PC, not very suitable for running 3D graphics stuff like SL, this setup works unbelievable smoothly.  Running on low graphics, tuned a bit up with 184 meter draw distance, I get an average framerate of 11, which is quite useable. 

I had a wonderful morning in SL today using this setup, and I hope it won't be the last!


iliveisl said...

dang! your are like James Bond or something! that is a very clever way to do this!

so your USB stick is a "live" stick? that is brilliant!

Cristopher Lefavre said...

Yes, when it is installed it's like a live stick, though custom installed to this computer, with correct drivers etc. It's very stable and very functional.

I guess one of those USB 3.0 sticks would work even better; I might try that one day.

/me smiles as he close the door on his Aston Martin and inserts his USB stick in the ignition key port...