Being safe with Ubuntu on a USB flash drive

One of the best things a Windows user can do for Defensive Computing is to have a bootable copy of Linux on hand. The classic reason being to rescue a broken copy of the operating sytem, but the much more important reason is for on-line banking.

Anyone that does online banking on a Windows machine is taking a huge risk.

Most likely they don't understand how sophisticated the bad guys are at writing malware. Or, perhaps, they put way too much trust in their antivirus program. Or, they may fail to appreciate how hard it is to keep all the installed software up to date with the latest patches. Perhaps the worst type of infection, a man-in-the-browser, can even defeat two factor authentication schemes.

No amount of Defensive Computing for Windows can ever be close to perfect. Linux is the only safe option for Windows users interested in online banking.

Bootable copies of Linux used to mean Live CDs, but that ship has mostly sailed. I travel with a bootable copy of Linux on a USB flash drive. For one thing, many more computers have USB ports than have optical drives. Also, running Linux off a USB flash drive can be much faster than running it off a CD. And, flash drives offer a choice of whether or not to save system changes. 

The truly paranoid will note that a Linux Live CD is safer because it absolutely can't be infected with a virus. The flip side of this argument is that bug fixes can't be installed to the system. To me, having a copy of Linux that's only used for online banking seems safe enough, especially if its kept updated with patches.

One downside to USB Linux compared to CD Linux is that older computers can't boot from a USB flash drive. But these are fading away.

My USB flash drive with Linux was getting a bit old, so I set out to create a new one with the latest version (10.10) of Ubuntu.

I was pleasantly surprised that the Ubuntu download page now includes instructions for installing the system onto a USB flash from Windows, OS X and, of course, Ubuntu. In the old days, I used to create a CD, boot to it and then use the included Startup Disk Creator from within Ubuntu to create a bootable copy on a USB flash drive. This was documented poorly and failed as often as it succeeded.

Thankfully, Canonical, the company behind Ubuntu, now seems to have endorsed the Universal USB Linux Installer available at I've used it in the past, from within Windows, with good success.

The bad news is that Canonical's documentation is far from complete. You are much better off reading about the Universal USB Installer from the source.

In brief, this is what you need to know.

  • The Universal USB Installer runs under Windows XP, Vista and 7. It can install many Linux distributions.
  • The flash drive needs to be formatted with the FAT32 file system. The installer program used to be able to format the drive for you, but this feature has been removed.
  • Files on the flash drive before starting the installation, are not wiped out when Linux is installed.
  • The flash drive should be at least two gigabytes. Four gigabytes is what I used. Any more seems wasteful, unless you want to store other files on the drive. This is certainly possible, my experience has been that having a few extra folders does not interfere with Ubuntu running from the flash drive. Ubuntu 10.10 took up 692 megabytes on my flash drive.
  • You should download the ISO file for your preferred Linux distribution ahead of time.

The first step to running the Universal USB Installer is to chose the Linux distribution you want to install onto the flash drive from the list of supported distributions. Then you point the software to the already downloaded ISO file. In my case, it automatically found the ISO file.

Next, you point it to the drive letter with the USB flash drive. It offers an intelligently chosen list. When I ran it, the only drive letter I could use was, in fact, the correct one.

The last step, persistence, is poorly documented.

If you disable persistence, then your USB flash drive will, like a CD, be exactly the same every time it's booted. This is not clearly stated but seemed to be true in my testing. 

There is documentation for persistence, but you know you're in trouble when it starts by defining the word, as if 6-year-olds were interested in installing Linux. Mostly, it lists the pros/cons without specifically explaining things.

For example, I was offered a choice of creating a 4GB casper-rw file. What "casper" is, is not explained, but it appears to be the work area where system changes are saved.

How a 4GB file would fit on my 4GB flash drive alongside the OS is also not explained.

I opted to create a 2GB casper-rw file and the installation proceeded without a hitch. Afterwords, Ubuntu 10.10 booted just fine on both a ThinkPad laptop and a Samsung netbook. Changes made to the system persisted across reboots and switching computers.

As an experiment, I renamed the casper-rw file, while in Windows, and rebooted to Ubuntu. Sure enough, Ubuntu booted in a virgin state. My system changes has been lost. 

However, on three different laptop computers, this newly reverted copy of Ubuntu failed to recognize the internal mouse hardware. It also failed to recognize an external USB mouse inserted after the system had booted. But, if it was booted with an external USB mouse present, all was well. Go figure. 

One time after renaming the casper-rw file back to its original name, a subsequent reboot was fine, the system changes I had made re-appeared. But, a later test of this same procedure didn't go as well, there were a handful of applications that failed to startup.

I did this testing because I've had more than one copy of Linux go bad on me after installing bug fixes.

The flash drive I used was a Patriot Xporter XT that was recently purchased for $13. It came pre-formatted with the necessary FAT32 file system.

The drive is advertised as being relatively fast (I haven't tested this in detail and the vendor does not offer much in terms of hard numbers to document the speed) and Ubuntu booted and ran fast enough to satisfy most people.    

I'm not a big Linux user, but anyone running Windows should get in the habit of using it, along with Firefox, for online banking. The time and effort to make a bootable Linux USB flash drive is certainly justified. It doesn't take long, the expense is minimal and the added safety for online banking is huge

Copyright © 2010 IDG Communications, Inc.

7 inconvenient truths about the hybrid work trend
Shop Tech Products at Amazon