There are some pretty exotic solutions for running Ubuntu and other versions of Linux from a USB stick, eg so you can carry your OS around with you and boot it on almost any PC you happen across, but we're just looking at running the basic Live Disc so you can at least try it out.
You'll need at least a 2GB stick, larger ones give you the option of using the spare space as storage, ensure you enter a suitable value into UNetbootin. Also be aware using USB storage brings its own set of issues. We had no problem with a Toshiba 16GB stick, but a San Disk 32GB stick would start but Ubuntu wouldn't then load.
We don't really have space here to go into the full ins and outs of backing up any existing Windows partition, resizing partitions and installing Ubuntu by hand. The good news is Ubuntu will largely do the last two automatically for you, if you let it.
Be warned though, it's easy to destroy your Windows partition, the Windows bootloader or to leave your PC unusable if you should choose the wrong options or if something else goes wrong along the way. We don't recommend installing or upgrading any OS unless you have backed up any files, created an image of your drives and the system isn't critical to any business, personal use or other operation. With that dire warning out of the way, on to the fun!
As a general rule if you have Windows on the boot drive, Ubuntu will happily resize this and fit itself alongside Windows on the drive. Before trying to ensure the drive has enough free space. These days drives can be easily 500GB or larger, as long as there's 20GB free there shouldn't be an issue; more space is required than just for Ubuntu as there needs to be space to move Windows files out of the way too.
If there isn't this free space, run the Windows Disk CleanUp Tool, ideally choose to re-run it as Administrator, and get it to remove unused system files too.
If you don't have 20GB free don't try to install Ubuntu. Once you start the Ubuntu install process don't interrupt it. If you break your bootloader or partition tables they are a real pain to fix, but if you do break something don't panic Windows will still be there.
1. UNetbootin Linux
To run Ubuntu from a USB stick, you first need a USB drive at least 2GB in size, 8GB would be ideal. You'll need the Ubuntu ISO file as discussed in the VirtualBox walkthrough and we'll use the download tool UNetbootin.
This installs the Live Disc ISO file directly to your USB drive.
2. Install Ubuntu
The tool can download the ISO image, but it's best practice to do this yourself. So select Diskimage, locate the file in the Download folder. Use the Ubuntu storage box to create reusable space—512MB should be fine use more on larger sticks.
Ensure you have the correct USB drive select in the bottom pulldown menu and click 'OK' to create the drive.
3. Boot and run
You can now boot your PC from the USB drive. However, you'll need to ensure your PC selects the USB drive as the boot device. Usually when you first turn on your PC a message says press F11 or F12 to select the boot device.
Some PCs have their own specific button, consult your manual or manufacturer for details. Ubuntu will now run.
- Enjoyed this article? Expand your knowledge of Linux, get more from your code, and discover the latest open source developments inside Linux Format. Read our sampler today and take advantage of the offer inside.