3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Boot and Run Ubuntu from a Flash Drive

Boot and Run Ubuntu from a Flash Drive
«
  • Flash Drive.jpg
  • Ubuntu.bmp
Running an operating system, like Windows, off of your flash drive can be very useful sometimes. You can recover your data from a hard drive and copy it to an external hard drive if that computer won't boot up or scan that computer for viruses and so on... This Instructable will show you how to install, boot, and run the popular Linux distro, Ubuntu from your flash drive. You will be able to automatically save your changes and settings back to the flash drive and restore them on each boot using a second partition.

You can run Ubuntu will all your settings and files, even if you don't have your own computer with you. You will have a whole, powerful operating system in your pocket!

Sorry for the not very helpful pictures. It was to hard to document each little step for each step. Hopefully it is still easy to follow...

I'm not liable for any damage done to your computer and/or flash drive. However, I haven't ever had a problem. Just make sure to follow each step carefully.

*This process is no longer needed as of Ubuntu 8.10 because a USB Ubuntu Creator is built in.
 
Remove these adsRemove these ads by Signing Up
 

Step 1Get Materials

Get Materials
Here are the materials needed:
  • USB 2.0 Flash drive (at least 1G) (You could use USB 1.1, but everything will take 5x longer)
  • Computer w/ CD Drive (Must be able to boot from USB. Newer motherboards will work. Motherboards older than 2 years old probably won't work. A BIOS update from your computer manufacturer might work.)
  • Ubuntu LiveCD (You don't need this if your computer already has Ubuntu installed on it)
  • You should also be somewhat computer-savvy and comfortable with command prompt/ terminal.

I used a 4GB Sandisk Cruzer Micro and Ubuntu 7.10 (current one at time of writing)

You can get the Ubuntu LiveCD at ubuntu.com. Download the Ubuntu Desktop LiveCD iso and burn it on a CD using Nero or another program. You could also request a free Ubuntu CD but that takes 6-10 weeks to ship.
« Previous StepDownload PDFView All StepsNext Step »
119 comments
1-40 of 119next »
May 21, 2012. 8:45 AMtaylud says:
would this work on a 2gb memory stick
and if i download ubuntu from the site do i still need a live cd thanks in advance
Jul 3, 2008. 4:57 PMlopez8675 says:
for part 4, if you have windows could you do that step in it? i no you can format it, but can you partition it?
Nov 24, 2008. 7:23 PMnerdychaz says:
Try this!

http://lifehacker.com/391067/fedora-9-puts-your-desktop-on-a-usb-drive

It's Not Ubuntu, it's better! FEDORA!!!
May 17, 2012. 3:40 AMsupermariofan25 says:
even better, install ubuntu fully directly to your usb, no hacks or 3rd party software, ubuntu has the option to install to a usb flash/hard drive and it runs fine, just make shore that you select your usb drive for boot loader and installation and swap space if use and volla! ubuntu on usb
Jul 3, 2008. 5:52 PMlopez8675 says:
either way, can you partition a flash drive in windows?
Jul 20, 2008. 9:34 AMDerin says:
how
Apr 14, 2009. 10:34 AMReCreate says:
google is your friend,not mine,google is my enemy,it does not find me anything
May 3, 2012. 7:44 AMleon-geyer says:
Just for people who has problems like mine
I am installing from a Netbook already with Ubuntu on it. So no CD-Drive.
Using a downloaded Ubuntu.iso (10 LTS), and had this "can not stat" = didn't find original files to copy.

I figured out: Mount and uncompress files, then drag the folder into the terminal to have the path (like user/home/desktop/folder) to put before cd.

If this ain't right, please correct me.

Question: didn't find «disctree», «ubuntu.ico» and «casper/initrd.gz», not in the folder. Last needed for boot. What can I do? best greetings, thnx
May 3, 2012. 7:44 AMleon-geyer says:
Just for people who has problems like mine
I am installing from a Netbook already with Ubuntu on it. So no CD-Drive.
Using a downloaded Ubuntu.iso (10 LTS), and had this "can not stat" = didn't find original files to copy.

I figured out: Mount and uncompress files, then drag the folder into the terminal to have the path (like user/home/desktop/folder) to put before cd.

If this ain't right, please correct me.

Question: didn't find «disctree», «ubuntu.ico» and «casper/initrd.gz», not in the folder. Last needed for boot. What can I do? best greetings, thnx
Sep 6, 2011. 11:21 AMhenry9419 says:
ok i have a problem when i try to enter +750M to set the partition size it just says value out of range and gives me the option to try again? but this time i just hit enter and set it to the default of 749 but the other steps are messing up...Please help me!!! Thanks!!!
May 3, 2012. 6:48 AMleon-geyer says:
did you remember to put the M? I had your answer when I forgot it
Dec 7, 2011. 3:04 AMJolum says:
I realize this thread is probably dead, but I am trying to intall Ubuntu 11.10 onto a flash drive, so far I have completed all steps save for step 5 bullet 7:

"cp -rf casper disctree dists install pics pool preseed .disk isolinux/* md5sum.txt README.diskdefines ubuntu.ico casper/vmlinuz casper/initrd.gz /media/Ubuntu/"

I get the following error:

cp: target `/media/Ubuntu/' is not a directory

Any Suggestions? Thanks!
Oct 10, 2011. 1:26 AMjsebíH says:
I have troubles with step #5, where it shows:
syslinux: invalid option -- 's'
syslinux: Unknown option: -s

And also in step #7, where it shows
cp: target `/media/Ubuntu/' is not a directory

What should I do with these?

Thanks.
Oct 21, 2008. 4:01 PMdeclanthedork says:
what about my login? what will it be when I log in?
Feb 22, 2011. 4:48 AMElvenChild says:
what you set it up to be during the installation
Apr 12, 2008. 4:47 PMmeowzers says:
I just wanted to ask, how do you get a Mac computer to boot from a USB? Macs don't seem to have a BIOS. Thanks!
Feb 22, 2011. 4:47 AMElvenChild says:
They have an efi not a bios. I found away to run ubuntu off a usb on a mac but it is a risky process as it will most likely delete the contents of your internal hard drive so remove that before you install it onto a usb. oh you should have at least a 4 gb usb.

DISCLAIMER: I AM IN NO WAY RESPONSIBLE FOR ANY OF THE INFORMATION BELOW ANY THING THAT MAY HAPPEN BECAUSE OF IT TO YOU OR YOUR PROPERTY INCLUDING BUT NOT LIMITED TO YOUR COMPUTER, HARD DRIVE, USB, INSTALLATION DISC'S OR SOFTWARE. BELOW I SHOW A METHOD THAT WORKED FOR ME I AM NOT SAYING THAT IT WILL WORK FOR YOU. TRY THIS AT YOUR OWN RISK.

1. open disk utility and make 3 partitions on your usb the first a 25 mb mac os extended journaled partition which you will install refit on, the second a 100 mb fat 32 partition which will be used as the linux root partition & the third just takes up the remaining space as a fat 32 partition
2. remove your internal hard drive and boot off the linux cd install it to your usb make sure to specify partition 2 as the root partition and partition 3 as the one you want to install the os on. wait for the install to finish.
3.Put your internal hard drive back in boot up your computer with the usb in the slot then restart it hold down option it will ask you whether you want to start up using os x or refit select refit. the refit menu will load and it will ask you whether you want to boot os x or linux from hd select linux and it will boot linux off your usb.
WARNINGS: it is important to remove your hard drive because if you don't all the information on it will somehow get deleted the turning on then restarting is only necessary the first time because refit does not complete installing itself to the usb until the computer has been restarted.
If you don't listen to me and leave your hard drive in during the installation you will find that it will be unbootable and you will have problems reinstalling os x on it heres what you do : boot up off the os x installation disc WITH NO USB DEVICES PLUGGED IN except a keyboard and a mouse select disk utility from the top menu and zero out your hard drive then try doing a custom install of os x installing only the os it should work if not keep trying heck even try a 35 pass. After the installation install the remaining things from the os x installation disc.

DISCLAIMER: I AM IN NO WAY RESPONSIBLE FOR ANY OF THE INFORMATION ABOVE ANY THING THAT MAY HAPPEN BECAUSE OF IT TO YOU OR YOUR PROPERTY INCLUDING BUT NOT LIMITED TO YOUR COMPUTER, HARD DRIVE, USB, INSTALLATION DISC'S OR SOFTWARE. BELOW I SHOW A METHOD THAT WORKED FOR ME I AM NOT SAYING THAT IT WILL WORK FOR YOU. TRY THIS AT YOUR OWN RISK.
Oct 4, 2008. 7:11 AMDerin says:
because they probably have CIOS BIOS:Basic Input Output System CIOS:Confusing Input Output System (no experience with mac,just insulting macs)
May 7, 2008. 2:24 AMluke says:
i have a macbook (white) and at the moment i use osx 10.5.2 (leaopard) and the latest ubuntu. if its a intell mac you need a app called " refit " i think that if its a PPC mac you dont have that much of a chance luke
Jan 16, 2009. 1:39 AMmage says:
the reason why it wont work is because macs have no souls. rofl
Jun 29, 2010. 2:01 PMLeeRus01 says:
thanks for this tutorial... i just have a few questions. i've read that u3 in pendrives nowadays are only compatible with windows os. can i run ubuntu with this same tutorial on a pendrive which is already pre-installed with u3? or should i uninstall the u3 feature before i commence with the installation?
Jan 18, 2011. 2:28 PMmetrogdor22 says:
Yes
Oct 31, 2010. 6:39 AMmushroom glue says:
would this work to boot a computer with no opererating system, or a corrupted one?
Apr 23, 2008. 2:33 PMDeez23 says:
Hello...great tutorial, but I am stuck on Step 7. I'm running Ubuntu 7.10 now and do not have a CD drive. Do I still execute "cd /cdrom"? When I execute the command in step 7, the cursor moves down to the next line and then...nada. I completed the rest of the steps with no problem. Can you help me? Cheers and great work!
Apr 27, 2010. 5:25 PMkevinsa5 says:
I'm having the same problem. I got everything to work up until that point, but when I do step 7, the cursor goes to the next line and nothing happens. I tried it a few times, and right now I can hear the disc drive going nuts, which didn't happen before. Any ideas?
Apr 27, 2010. 6:07 PMkevinsa5 says:
okay, I think I fixed that. turns out I needed to do "cd /media/cdrom" for step 6.

So I did it and now there are a bunch of files on my drive. I edited isolinux.cfg (by the way, the original was like five lines long and looked nothing like the new version) and booted into OSX to change the boot order. However, my flash drive doesn't show up in the available disks for startup.

If it helps, I'm doing this in system preferences --> startup disk and am dual booting ubuntu and OSX. I followed all the steps in ubuntu, of course.
Apr 23, 2008. 2:37 PMDeez23 says:
I tried it again, both in 'cdrom' and in root: This is what I get. cp: cannot stat `casper': No such file or directory cp: cannot stat `disctree': No such file or directory cp: cannot stat `dists': No such file or directory cp: cannot stat `install': No such file or directory cp: cannot stat `pics': No such file or directory cp: cannot stat `pool': No such file or directory cp: cannot stat `preseed': No such file or directory cp: cannot stat `.disk': No such file or directory cp: cannot stat `isolinux/*': No such file or directory cp: cannot stat `md5sum.txt': No such file or directory cp: cannot stat `README.diskdefines': No such file or directory cp: cannot stat `ubuntu.ico': No such file or directory cp: cannot stat `casper/vmlinuz': No such file or directory cp: cannot stat `casper/initrd.gz': No such file or directory
Apr 24, 2008. 5:18 PMDeez23 says:
yeah, eventually, I figured that out. A few hours later, I got it sorted out. Cheers.
Oct 2, 2008. 1:47 PMcormac3050 says:
Couldn't you just use slax instead? You don't have to install it on your computer or even format your usb drive!! 9Great to use on school computers! :P)
Apr 23, 2010. 12:10 PMWindWardDunes says:
Plzz help how do i add Slax on my USB and run at school (they block scripts,cmb,run and command propt.)
Oct 13, 2009. 1:34 AMpoulina says:
This is great

Greetings Rocky
Jul 5, 2009. 2:58 PMKLEPTOBISMAL says:
this is amazing! thank you so much!
Aug 20, 2008. 12:00 PMTheShawMaestro says:
HI, I tried the instructions on Pendrivelinux.com, which are very similar to these, and when writing to the "Ubuntu" partition, it says "No free Space" or something similar. Should I try a bigger partition size? And also, can I use Disk Utility in OS X?
Jun 29, 2009. 6:41 PMjgeekw says:
I tried that same tutorial on a 2 Gig PNY Attache USB stick. After completing everything, and setting my BIOS to boot from USB, i got the error No bootable partition in table. Also, did you format your flash drive before completing the tut? Make sure you tell windows to format it as FAT32. Anybody else get the error that I did? How do you fix this?
Jan 14, 2009. 6:41 PMtater killer says:
do i still have to format the flashdrive
Apr 21, 2009. 9:39 AMN1CK4ND0 says:
yes, but that doesn't do anything but erase all the files.
Apr 21, 2009. 9:39 AMN1CK4ND0 says:
yeah, make sure if you are installing Ubuntu, and leaving another OS on their, that you make a seperate partition, if you leave them both on the same partition, a lot of times the drivers get messed up on your other OS.
1-40 of 119next »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
22
Followers
10
Author:TechnoGeek95
I enjoy tinkering with technology, (cell phones, iPods, computers, etc.) but mostly computers. I got my first computer at the age of five. I have been playing with them ever since. I have experienc...
more »