Subscribe to How-To Geek

Create a Bootable Ubuntu USB Flash Drive the Easy Way

We've already covered how to use an Ubuntu Live CD to backup files from your dead Windows computer, but using the boot cd can sometimes be a little slow. We can speed up the booting process by installing Ubuntu to a bootable USB flash drive instead.

To accomplish this, we'll use a tiny software package called UNetbootin, which is designed to make the installation process simple and easy.

Create the Bootable Flash Drive

You'll first need to download the UNetbootin software and save it somewhere useful, since there's no installation required, just double-click to run.

I chose to use an already downloaded ISO image of the Ubuntu installation cd, and then chose my flash drive, and clicked the OK button. Yes, this step is as simple as that.

image 

The process will extract the files from the ISO image (or download them), copy them to the flash drive and then install the bootloader. Depending on what you are installing, this really doesn't take very long.

image

Once the process is completed, you'll be prompted to reboot… which you don't necessarily have to do unless you want to test booting the flash drive on the same machine you are using.

image

Otherwise you can hit the Exit button.

Make Sure the Partition is Active

If you get a boot device error when you try and boot from the flash device, it could be that your partition is not marked as active. What we'll do is use the command line diskpart utility to fix this… if you are in Vista open an administrator mode command prompt by right-clicking and choosing Run as Administrator.

Now you'll need to run this command to figure out the number of your flash drive:

list disk

This will show you the list of drives, and you will use the disk number in the "select disk" command:

select disk 1

select partition 1

active

The "active" command will actually mark the current partition as active, which is why you need to select the disk and then the partition. At this point you should be done.

image 

Booting From the Flash Drive

Now that you are all finished, you can try and boot from the flash drive. Every BIOS is different, but most of them will have a message like "Press F12 for the Boot Menu", which is highly suggested. The boot menu will allow you to select the USB drive as the boot device. (apologies for the simply horrible camera phone screenshots)

image

Instead of the regular Ubuntu boot menu that you might be used to seeing, you will see the UNetbootin menu, which has essentially the same options.

 image

Useful Note

If you are having issues booting Ubuntu Hardy (8.04) on a Dell machine, you might want to switch back to using Ubuntu 7.10 instead.

I was able to boot all the way into the desktop in about 35 seconds using the flash drive… way faster than using the regular live cd.

image

Stay tuned, we're going to explore even more options for bootable CDs and USB drives that help you repair your computer.

Download UNetbootin from sourceforge.net

The Geek is the founder of How-To Geek and a geek enthusiast. This article was written on 09/2/08 and tagged with: Linux

Daily Email Updates

You can get our how-to articles in your inbox each day for free. Just enter your email below:


Comments (34)

  1. Mohan

    Excellent tip, I discovered this last week as I got the Asus Eee box and wanted to put Kubuntu on it and after a little googling I ran into UNetbootin and it works like a charm.

  2. Peter

    What size USB Flash Drive would you suggest?

  3. The Geek

    @Peter

    That's a good question, I forgot to include it… you'll probably need a 1GB or larger drive to be able to fit the contents of the ISO image.

  4. raphoenix

    What a nice surprise in my E-mail in-box this morning. Finally a small installer program that doesn't require a 100 page explanation and 10 re-compiles to get a program to run on a machine or device. Hats-Off to the folks over at Source Forge AND to The-Geek for another Great How-To Article.

    Rick P.

  5. haider_up32

    any tips on to bootup linux distros from portable hdds

  6. EJDean

    Great article. Is it possible to have an fully customised Ubuntu ditsro installed on the USB stick?

  7. murl

    Is it possible to do same with CD? How ?

  8. Bush -- not related

    I might've missed it, but does this process create a USB-based disc that allows for persistent writes? That is, a fully editable environment? Or is this merely a USB-based "Live CD"?

  9. Jean-Francois Messier

    Although I did not use the program for hard disks just yet, I understand you would then select Hard Disk and then select the drive letter for your USB-based device. Or just use the USB device, it being a hard disk instead of flash memory. This should be the same as for the software installation/download on the device.

  10. Mick Barker Sr.

    It probably wouldn't hurt to have a Two Gig Flash Drive for this, that way you always have extra space for added programs, backups, etc.

  11. Yang

    Hi, this boot disk is working, however not seem to be persistent. So no changes will be saved.

  12. John

    I tried the latest Puppy Linux on a 512MB stick and it works good. It will allow you to save changes and data to a save file of some kind.

  13. NOOBISH

    does this install to the thumb or write over HD and windows install … dont really want that (yet) till I have driven and see how the games do … then maybe kick vista to the curb … thanks for help.

  14. Bush -- not related

    noonish, this is a live cd-type thang: doesn't touch your HD.

  15. noobish

    sweet … I have the flash drive with the live but havent done the install … gonna work on it next … many thanx, noobish

  16. Daniel

    Dear Geek,

    Excellent website and tips! Just created my UBUNTU USB and it works great, except it will not connect to the wireless signal. I tried it on two different laptops without results.

    Also, is it possible to add items to the UBUNTU, such as a Virus Scanner and a Windows Boot Sector repair tool?

    Daniel

  17. Chris

    Argghhh help. I've followed all your steps Mr Geek but when I go2 my boot menu on my Dell Pheonix Award Bios and select USB its goes threw and say 'unable to load bootmgr' :(

  18. Irony

    Don't people see the sad irony in using Windows and Windows utilities to create Linux/Ubuntu setups? Ubuntu on a USB stick is a great idea. Using Windows to accomplish it, not so much.

  19. Mike Honeycutt

    Thanks for the article.

    Has anyone created the "ultimate USB key" that boots Linux and Windows PE?
    I play with this occasionally and can get one OS to install/boot from the USB key but not both.

    I'd be willing to pay for the details.

    Mike Honeycutt

  20. Javaid

    Great piece of advice!

    Thanks very much for such a kind supoort.

  21. James Charlton

    Awesome..

    so what do you do when the USB thumb wont show up after entering 'list disk'.
    two brand new 4GB Kingston 'data travelers'
    they show when you list volume but not list disk. They work for data transfer and benchmark fine. just an issue with the brand/make

    thoughts?

  22. Bush -- not related

    I've been quite happy with my Kingston data traveler (4GB). I've made and destroyed several bootable drives on it, most recently a puppy linux to run on my eee when I borked the Asus, somehow (can one EVER learn enough Linux to stop doing that?).

    As for the fool who doesn't understand the definition of "irony"… well, if all one has is Windows but one would verymuch like to experience non-Windows, what are the alternatives? It's not ironic, it's cleverly using Windows against itself.

  23. James Charlton

    Hay, i figured it out.

    XP uses Diskpart v5 and vista is v6. v6 wont run in xp cause of the way cmd's been restructured in vista but thats whats letting you change the thumb 'volume' to a 'disk'.

    So XP users, go here. http://www.eeeguides.com/2007/.....thumb.html
    and just point it to a linux iso. Its a bit more work but do-able.

    Otherwise thanks for the post. unfortunately one more reason to move to vista XD

  24. Jeff

    Best idea ever. Here's the challenge: When I run diskpart in XP, it only sees the 3 hard drives and doesn't find the USB thumbdrives. If I open another command prompt and do dir j:, the contents of the thumbdrive show up fine. They just won't boot and diskpart is unable to locate them to make them active. I'm hoping for another way to activate those partitions - perhaps a command in Linux.

  25. Jeff

    Similar to another user above, in XP the thumbdrive is considered a volume instead of a partition, so when I select volume 2 (the thumbdrive with the recently installed but unbootable Linux version) and then select partition 1 of that volume, I get the error that it's a volume, not a partition. Got to be an easier way in Linux.

  26. Alexis

    Hey, it's warking! Thanks a million. I'ts beautiful. Ok, now I need help.
    I need a C compiler (gcc), and the mic1 simulator for programming (.ijvm).
    Where can I find them? How Do I add them? I'm new at Linux! I may need details. Please help me… e-mail me any information available. This greek student is forever grateful.
    Also, I tryied To update and got that message about bugs.

  27. Derin

    I put it on my 512 mb cruzer micro,then did everything including diskpart,and I have a few problems.
    * Does not boot from flash drive with correct settings
    * Diskpart does not show my flash drive
    What can the problem be?

  28. N9NJA

    As far as bootable USB flash, this is great for other Linux flavors. Since the release of WUBI this is completely unnecessary. No need to partition or even burn your CD, just mount the ISO with D-Tools (or similar) and choose "Install Inside Windows" in the autorun menu.

  29. Ryan JL

    James Charlton, How did you get the usb_prep to point to a linux ISO? For me it's only looking for XP.

  30. Dan

    Nifty! Love it!!! Thanks, guys!

  31. Fred

    Hi,
    I tried this with the kubuntu-8.10-alternate-amd64.iso image on a USB stick, but the installation failed as it did not find any /dev/scd0 device.

  32. Aaron W

    Hi Fred,

    I had the same / similar issue trying to use Ubuntu Studio 8.04 (http://ubuntustudio.org/), a specialized Ubuntu distro that I believe is based on the alternate installer. Anyhow, the iso for it is a DVD iso, and I have no DVD burner, so I thought I might be able to get around that by putting it on my USB flash stick, as described above.

    I copied the files on and booted from USB without a hitch. It would boot into the install, and do the first two steps (language and keyboard detection / selection), but then it got hung up because it said it couldn't find the CD.

    Anyone know any possible tips / workarounds for this situation? Any way to tell the installer where to look for the files, to point it to the USB drive, or something?

  33. Fred

    Hi Aaron,

    I finally found out how to work around it.

    1) go to http://archive.ubuntu.com/ubun...../hd-media/ and get the initrd.gz and vmlinuz files [assuming you want the 64-bit installer, otherwise it's the installer-i386/ directory]

    2) run UNetbootin and select a custom distibution. You may set the Kernel and Initrd you just downloaded, though the generated files (ubninit and ubnkern) won't be used (see step 5)

    3) copy the contents of the 'isolinux' dir on the install iso into the root dir on the usb stick

    4) delete the syslinux.cfg file in the root dir and replace it by renaming isolinux.cfg to syslinux.cfg

    5) create a folder on the usb stick called 'install' and copy initrd.gz and vmlinuz into it (they will override ubninit and ubnkern in the usb drive's root)

    6) copy the ubuntu iso you wish to install onto the root of the usb stick

    7) reboot from usb. it will automatically find and mount the iso for install.

    That worked out for me, hope it will be useful to you, as well (note, I don't specifically know about Ubuntu Studio, but *in principle* it should be the same)

  34. Aaron W

    Hey Fred,

    Thanks for the tip! I'll give it a try, and post the results if I get the chance.

    Sounds like that's an easier way to go anyhow, since you don't have to go through the lengthy process of UNetBootIn extracting everything from the iso and copying it to the disk; you just copy the iso.

    Thanks!

    Aaron


Leave a Comment




Leave your friendly comment here.

If you have a computer help question, click here to leave it on the forums instead.

Note: Your comment may not show up immediately on the site.

Sponsored Links
Getting Started
About How-To Geek
What Is That Process?
svchost.exe
jusched.exe
dwm.exe
ctfmon.exe
wmpnetwk.exe
wmpnscfg.exe
rundll32.exe
wfcrun32.exe
Ipoint.exe
Itype.exe
Wfica32.exe
Mobsync.exe
Cmd.exe
Dpupdchk.exe

Copyright © 2006-2008 HowToGeek.com. All Rights Reserved.