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

Step 5Install Ubuntu to the Flash Drive

Install Ubuntu to the Flash Drive
«
  • Syslinux.png
  • Syslinux Install.png
Now that you have finished formatting the drive, you can now install Ubuntu onto the flash drive partitions.

1. Insert flash drive.

2. Open Terminal.

3. Type "apt-get update".

4. Go to Ubuntu Packages and download Mtools and install. Afterward, download Syslinux and install.

5. In terminal, type "syslinux -sf /dev/sdb1".

6. Type "cd /cdrom"

7. Type "cp -rf casper disctree dists install pics pool preseed .disk isolinux/* md5sum.txt README.diskdefines ubuntu.ico casper/vmlinuz casper/initrd.gz /media/Ubuntu/".
  • Ignore any "cannot create symbolic link" errors.

8. Go to first partition of the first flash drive and rename "isolinux.cfg" to "syslinux.cfg".

9. Edit "syslinux.cfg" so that it looks like the attached text file.

Finally... You are done!
« Previous StepDownload PDFView All StepsNext Step »
14 comments
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
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.
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.
Aug 17, 2008. 12:47 AMplyalex1994 says:
Help!!! At step seven it says this: cp: target `/media/Ubuntu/' is not a directory: No such file or directory ubuntu@ubuntu:/cdrom$
Aug 17, 2008. 1:12 AMplyalex1994 says:
oops I worked out what i did wrong i had called my usb the wrong name. duh
Mar 27, 2008. 10:21 AMbilly_bob666 says:
please help with step 7 i get the error (cp: target `/media/ubuntu710/' is not a directory: No such file or directory) every thing went good till now.. thanks for the great instructable
Mar 27, 2008. 7:19 PMbilly_bob666 says:
thanks the new command works .. now im just having trouble booting from it ..the comp trys to read the thunbdrive. i think its the mbr but when i try the command (lilo -M /dev/sda) i get the error (Fatal: creat /boot/boot.0800: Permission denied) thanks for the input
Mar 28, 2008. 8:49 AMbilly_bob666 says:
thanks again.. :) typing sudo su first got (lilo -M /dev/sda) to work.. but that didn't fix my prob ..when i select my pc to boot from my flash it reads the thumb drive and says (no active partition) but in windows and ubuntu it shows up properly as a MBR with all the files ..... i am using a scandisk cruzer thumb drive and live cd ...also the thumb drive comes up as a scandisk cruzer in the bios so that shouldnt be the cause.. thanks id be lost without your help
Mar 28, 2008. 10:11 AMbilly_bob666 says:
i got it working ...it was my bios being stupid ... thanks for all your help ...i found that i have to plug in my thumbdrive as i reboot or it wont load ... i like this os im very impressed thanks alot :)

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 »