Smoothwall Firewall project

Tuesday, 23 June 2009

Using Ubuntu on a USB drive as my PC

I needed to create a portable PC on a USB drive so that I could have all my data and Linux applications with me at all times. The need was driven by having a machine with Windows Vista pre-installed, that I didn't want to change or use, but the BIOS was enabled to boot from any device.

Here are the items I used to create the setup:

1) Copy of Ubuntu 9.04 desktop
2) 1 Kingston Datatraveller II 2 GB disk to use as a live CD installer
3) 1 16GB Kingston Datatraveller disk to use as the "PC on a USB drive"
4) 1 Dell XPS 1330 with Ubuntu installed

Step 1:

I booted into my Dell and clicked on the USB creator and selected the Ubuntu 9.04 iso image

Ubuntu USB Drive Creator

This installed the live Ubuntu CD image onto the 2GB Kinston Datatraveller II ready to be booted from.

Step 2:

Now I put this 2GB Kinston Datatraveller II into one of the USB ports on the Dell XPS and re-booted the machine. The machine now boots off the USB stick, make sure you select your language and to run in live mode, as this allows you access to all of the tools when you want to start to install.

Step 3:

Now place the 16GB Kingston Datatraveller into the other USB slot on the Dell XPS and click on the install icon on the desktop. Everything will be wiped off this USB drive, so make sure you have backed it up . Follow the standard Ubuntu install, but when you get to the disk partitioning, make sure you select the 16GB drive. Be very careful at this stage as you don't want to erase the wrong disk, like your hard drive ;-(. The live CD has the Gparted application available, so you may want to load that up before you start this process and make sure you know which disk is which.
I used the custom disk option and selected the 16GB Kingston Datatraveller, which in my case was /dev/sdc. I only used a single partition, which I formatted ext4, and no swap. It will complain about not having a swap file, but just press continue. This setup is highly unlikely to ever need a swap partition as you are only going to using it for light duties. It would also shorten the life of the USB stick by constantly swapping to it on a machine with little RAM.

Step 4:

The process will continue until you reach a point where you have to press commit, check the details once again and then press Finish. This will format the 16GB Kingston Datatraveller and copy over the operating system.

Voila, you now have an Ubuntu 9.04 PC on a stick. You can store applications and data on there, and it can go where ever you go, very convienient. If you have important data you wish to keep then I would always keep a backup on another data USB stick. Relying on a £30 USB stick to safely store your next million selling SciFi book is not something I would recommend.

I have been using this for months now and have installed Compiz, Google Chromium and Firefox 3.5. The performance has proved to be fine on the following machines:

Dell XPS 1330 3GB Ram
Dell 6400 4GB Ram
Dell D600 1GB Ram
HP DC7700 4GB Ram
HP Pavillion DV9000 2GB Ram
Asus 1000 2GB Ram
Sony Vaio 2GB Ram
Toshiba Sat 1GB Ram

No comments: