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.
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.
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.
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.
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)
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.
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.

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

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


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.
What size USB Flash Drive would you suggest?
@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.
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.
any tips on to bootup linux distros from portable hdds
Great article. Is it possible to have an fully customised Ubuntu ditsro installed on the USB stick?
Is it possible to do same with CD? How ?
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”?
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.
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.
Hi, this boot disk is working, however not seem to be persistent. So no changes will be saved.
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.
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.
noonish, this is a live cd-type thang: doesn’t touch your HD.
sweet … I have the flash drive with the live but havent done the install … gonna work on it next … many thanx, noobish
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
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’
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.
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
Great piece of advice!
Thanks very much for such a kind supoort.
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?
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.
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
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.
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.
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.
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?
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.
James Charlton, How did you get the usb_prep to point to a linux ISO? For me it’s only looking for XP.
Nifty! Love it!!! Thanks, guys!
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.
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?
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)
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
Hey, thanks for this. I am going to give it a go, but still wondering about that USB size. The Ubuntu site suggests that the desktop installation of Ubuntu 8.10 can take up over 2Gb. So are we looking at a minimum stick size of 2Gb or more, or are there ways round that (like pick and choose what to install)? Also, stupid question, but can this be run as a “fully-fledged” Linux installation, I mean, it’s not “read-only” like a live CD would be?
Aha, OK, I got it now. Perhaps it wasn’t clear from the article, or I missed it – this method will create a Live USB boot disk, not a full boot of Ubuntu. So it only takes up the same 700Mb or so. Once you fire up Ubuntu you have the option of doing a full install. I have no idea whether that could also be done on the USB (I don’t think it could be done on the same one, for obvious reasons!), but I am pretty sure that would take up close to the 2Gb specified as the required diskspace.
I have been using Ubuntu 8.10 on a Dell laptop (updated from Hardy) since it was released. I had tried several times on different USB Flash drives to use the inbuilt create a usb startup disk. Each time it created the installation on the drive without any error message but it would never boot. I would get an error message about it being invalid boot or system disk.
I then booted the laptop from the live CD and selected install Ubuntu and chose the 4GB USB flash drive and the guided option. VERY IMPORTANT!!! Select Advanced! Install Grub and MAKE SURE you select the USB drive for Grub installation. It took a long time to do the install (around an hour) but when it was finished I could boot from the USB drive with the grub menu giving all the options for my other Ubuntu installations on the laptop as well.
When running from the USB drive It picked up my wireless connection quickly and I could use system update (240 MB) and copy Deb packages over from my Hard disk and install. I hope this helps anyone
Why doesn’t my XP diskpart application see the usb stick when I use it? Hard to make the partition active + I get boot error.
Thanks, Colin! Did you make the USB-install “persistent” so changes are preserved?
@Bush
It just installs like a normal Ubuntu installation and you have your normal Home folder to save files to.
Synaptic works in the usual way for adding or removing packages. I have the latest firefox 3.x with my bookmarks imported from my laptop and Open Office3 running on my drive. It is not the fastest but it works and you can carry a fully working OS and files with you anywhere.
I had extract it into 4GB thumb drive and it works fined… later it turn into error after i perform some update. izzit because of / partition is full? Izzit possible to extract *.iso into ext usb hdd?
Dear Geek,
I’m sending this message using Ubuntu 10 which is residing on my pqi 1 GB flash disk. I tried to use diskpart from my original Windows XP, but it didn’t show my flash drive. Instead, I simply restarted the machine after the extraction process, modified the BIOS so that I can boot from my USB drive, and voila!!
The whole process as per your description only took around 7 minutes (thanks to a Pentium Core 2 Duo 2.66, and 2 GB memory).
Thank you a lot!!
Yassir
To answer whether you can customize your USB install, theoretically you should be able to. When using a live cd boot, I was able to add/remove content off the machine booted with it as if it was actually installed. This just add/removed contents from the RAM, though, since the CD was not writable back. With a flash stick, though, you should be able to write your changes back to it, thus letting you maintain your customization. Also, with part of the USB stick set aside as a home directory, you can make changes to your desktop, etc and save those. Since a USB stick is re-writable, it should act just like having Ubuntu installed on a hard disk, it’s just on a USB stick.
I have successfully installed and booted ubuntu from 2gb flash disk, but when i restart ubuntu all my settings and data is going.
please advise how to save configure and files on ubuntu installed on 2 gb flash disk ??????
find below the results, if anyone can help me with this it will be great.
root@r-nav:/etc/network# iwconfig
wlan1
IEEE 802.11bg ESSID:”Abc”
Mode:Managed Frequency:2.462 GHz Access Point:
00:1B:9E:BE:AA:03
Bit Rate=54 Mb/s Tx-Power=27 dBm
Retry min
limit:7 RTS thr:off Fragment thr=2352 B
Encryption key:off
Power
Management:off
Link Quality=14/100 Signal level:65/65
Rx invalid
nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid
misc:0 Missed beacon:0
root@r-nav:/etc/network# ping google.com -c 4
ping: unknown host google.com
This sounds really easy, but I have tried repeatedly, and can’t get my XP autoplay to not interfere with the copy process. It pops a window after almost every file, then hangs at 100th file. I’ve reset autoplay each time. (In case this matters, I’m trying to install Ubuntu Ultimate 2.0) Anyone have any ideas??
I’m not using the ubuntu iso, I have a vista iso and thats what i used instead of the ubunto iso, but when i go and boot from my USB, the UNetbootin menu comes up but theres nothing on it, no links, nothing. All it says it at the bottom “[Tab] to edit options” or something like that, and a countdown timer to boot automaticly, and if you let the timer go out, it just restarts agian…..
please help!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
For those having problem detecting the thumb drive in windows xp, you can activate the partition using the HP USB Disk Storage Format tool, just format yout thumb drive with it, and then run unetboothin. This will activate your partition in the drive and then load the linux boot.
I am very new at this, so be gentle. I ran the build with out errors, but when I try to boot from USB drive I get “no O/S found” error message. Any suggestions??
Hello Jack,
Assuming that you created the OS correctly on the flash disk, make sure that you have configured your BIOS to boot from the USB drive. Follow the instructions in the section titled “Booting From the Flash Drive” above. If you are sure that the BIOS is configured correctly, then most probably the OS was not created in the right way. I hope this helps.
Yassir
The BIOS went to the USB flash drive alright, just couldn’t find anything to boot. I will try again to build it. I am using a Dell XPS M1730, 4 Gig of RAM, dual hard drives (one with XP Pro, the other with Vista home premium) want to try Ubuntu and see if I can get my cooling fans to run before I put it on a hard drive.
very nice..good
Right, Well I have the DELL Studio 15 (1535) and amazingly the Slot Loading DVD Failed, and then ironically my Windows XP partition got corrupted, even better i had hidden my vista partition using the boot mgr and then went into xp, restarted, xp was gone, couldnt access my vista, tried everything, nothing worked, its now 4 months later then i thought, ubuntu would work, if only on usb, and thank god for this, im downloading the iso of ubuntu and i just cant wait to see it going as my laptop m.i.a for 5 months.
I just want to put vista back on it though, for my games nothin more.
Thanks for this!
Thanks…
Thanks a lot !
very nice
I just installed Ubuntu 9.04 on a 4GB thumb drive just like I was installing it on to the laptop.
I just choose the drive when asked what partition to install to everything seems to be working ok in Ubuntu, however when I attempt to boot the laptop in to the Win XP os without the USB connected, I get a grub error. How can I get around this? Does any one have any ideas how this can be fixed? Did Ubuntu write a grub record to the master boot record? How can I edit this
Very good guide! However, it kinda sucks that the author didn’t mention that the USB drive as to be a FAT32 drive and not NTFS for instance
Is this the tutorial on how to install ubuntu on a flashdrive so that you can use it in a handy way and whenever you plug the flashdrive, the OS will run in any computer?
I have an old windows machine, and it currently runs xp. I successfully put ubuntu 8.04.2 on the usb drive, but when i try booting from the usb drive, there is no grub to choose what to boot form, instead i belive linux’s start up code runs, and then some stuff flashes that i can’t read, and then xp boots. Do you have any idea whats happening? thanks
Hey what about giving us some instructions to get a Windows XP ISO on to a USB stick using this App
Great build, using it about a year. Simple and perfect instructions also included.
http://depositfiles.com/ru/files/kcnd005tt
- Best Windows XP usb flash edition 2009.
@Irony, some people either don’t have any spare CDs or perhaps use a Netbook without a cd drive? Bit pointless only showing how to do this in Linux, if you have Windows pre-installed on your machine?
Unetbootin is a great tool, really helps us out on our eee pcs!
MY PROBLEM
#DISKPART> list disk
#
# Disk ### Status Size Free Dyn Gpt
# ——– ———- ——- ——- — —
# Disk 0 Online 699 GB 0 B
#
#DISKPART>
Well I can’t choose and activate USB flash… so How to fix it ? please post here.
Hey there! I followed your guide and setting up the program was simple as could be! However, I do have one problem – complete lack of persistence. I installed the program on a 16 gig jump drive just to test it out. Booted up fine and looked just like a live CD. So I ran update and made a folder on the desktop called “test folder”. I restart. Upon rebooting I find all changed to the desktop are gone. HOWEVER, the OS is still fully updated. >_> Any suggestions on how to get it to run like a normal ubuntu install?
thanks fo this tutorial. It gave me the tipp to use diskpart, which is not mentioned anywhere else.
However, it worked for me only after so additional steps:
1. format the USB prior to this procedure with FAT32 using HP USB Disk Storage Format tool
becaus unetbootin was unable to clean an existing MBR
2. after diskpart (in XP) the MBR was gone (or not yet available?!?) so I had to produce it with syslinux -f [usb-drive]:
then it worked fine!