How to install Ubuntu Linux from USB Stick

Sponsored Link
This tutorial describes how to install Ubuntu by copying the contents of the installation CD to an USB memory stick (aka flash drive) and making the stick bootable. This is handy for machines like ultra portable notebooks that do not have a CD drive but can boot from USB media.

In short here's what you do:

Prepare the USB flash drive

Boot the computer from your USB flash drive.

Install Ubuntu as you would from a normal boot CD


A running Ubuntu 8.04 or any ubuntu version installation

A USB device (stick, pen-drive, USB hard disk) that has already been formatted with FAT32 and has enough free space to hold your Ubuntu installation image

A Ubuntu CD image downloaded from the Ubuntu servers or mirrors (*.iso file) or from here
Step 1

On the root directory of your USB device, create a folder “install”
Copy the installer kernel and the initramdisk into this folder (Download source below.You need the files “vmlinux” and “initrd.gz”).

Download source for the installer kernel and initramdisk

For AMD64 Download from here
For i386 Download from here

You need to download the files “vmlinux” and “initrd.gz”.

Step 2

Note: You need to have the installer that fits the architecture of your Ubuntu version you want to install. In other words, you need a amd64 installer if you want to install an amd64 Ubuntu .iso image and the i386 installer for an i386 iso.

Step 3

From the installation iso image you downloaded, copy the folder “isolinux” to the root directory of your USB device (right-click on the .iso file, choose “extract here”). Rename “isolinux” into “syslinux”. Go inside the directroy “syslinux”. There, rename the file “isolinux.cfg” into “syslinux.cfg”.

Step 4

Make the stick bootable: Use fdisk to set the boot flag,

Install syslinux using the following command

sudo aptitude install syslinux

Now use syslinux to install a boot sector on your USB device

sudo syslinux /dev/sdbX

where sdbX is the device name and number of your USB device, check with “sudo mount”. A file called “ldlinux.sys” will be created in the root direcotry of the USB device.

Step 5

Copy the Ubuntu CD image in the root directory of your USB device (Contents of USB you can see as follows).If you are using i386 you need to copy the complete .iso image in to the root directory of your USB device.

Related posts

109 thoughts on “How to install Ubuntu Linux from USB Stick

  1. I cannot follow steps 1 and 4.

    Or I couldn’t – but I figured out them eventually.

    Problem with step 1: there is no such file as vmlinux. There is vmlinuz. Is this what you meant?

    Solution: vmlinuz is the correct filename.

    Problem with step 4: I have Windows XP. It does not have FDISK. How do I make the USB stick bootable? How to install syslinux?


    I think that my USB stick was rendered bootable by a tool named UNetbootin. Download and run it, and install your .iso file onto your USB stick. Afterwards, delete all files from your USB stick.

    Now download the newest syslinux zip from (mine was

    Extract the contents of the syslinux zip, then go there with the command prompt and say

    > cd win32
    > syslinux g:

    (G: was my USB disk)

    Now follow with step 5.

  2. Finally, after three days and a million different combinations I have been able to install Ubuntu 8.04 Alternate to my friends Webbook.

    Many, many, many, many thanks to all of you.

  3. Tried this and everything seemed to work fine. When I booted from the USB stick, I got to the menu with “try ubuntu, Install, check disk, etc.” and I selected the Try Ubuntu option and nothing happened. It gave me an “Automatic boot in 30 sec.” countdown underneath the menu options but once it got to 0, it just started back at 30sec.

  4. has anybody tried using the usb bootable disk to install ubuntu onto a mac or does anyone know if its even possible following these steps.

  5. # Cakes Says:
    January 3rd, 2009 at 2:06 am

    Tried this and everything seemed to work fine. When I booted from the USB stick, I got to the menu with “try ubuntu, Install, check disk, etc.” and I selected the Try Ubuntu option and nothing happened. It gave me an “Automatic boot in 30 sec.” countdown underneath the menu options but once it got to 0, it just started back at 30sec.

    Cakes, just rename USB keydrive durectory ‘Install’ to ‘casper’ as Alexander Says above. Then it will drop you into the text install mode

    # Alexander Says:
    May 5th, 2008 at 7:41 am


    directory must be named casper, not install!

  6. You’re a freaking savior, man. 5 steps and 15 minutes to prep a Linux install for a USB drive. 50 steps and 5 hours to prep one for Windows. Go to hell Windows–you’re here-by replaced!

  7. The comp I a attempting to install Linux on has NO OS installed. I have reburned the ISO file 5 times and redownloaded it twice. Since I have no OS on the comp I can not change any settings or create a fake drive or set up my external HD as a perminent drive. Also, my bios dosent even seem to have a option to start up from USB it dosent even detect it. What can I do?

  8. hi

    i have a problem in step 4 .. i use the Acer Aspire One Linpus Linux and i cant get to make the last part of step 4 work..
    i use the command sudo syslinux /media/USB1 ( /media/USB1 is the directory of my device etc)
    and the response i get is /media/USB1: Is a directory

    could someone please help…

    PS.. i m a complete newbie on linux… please explain ! dont just state something..thanks!!!!!!

  9. this is the best thing i could’ve hoped for! i was running out of cd’s because of some error on disks.. phew, hope it’ll work.. ;D

  10. Can someone elaborate on step 4? How do you set the boot flag, and how to you specify the device you are doing this on, I don’t want to accidently change my Mac’s harddrive.

  11. Can I put two installations on one USB? Meaning, can I use this method and put both the server and desktop versions of Ubuntu onto the same drive?

    Also, can these files be the only things on the drive? Or can it have other (bootable or non-bootable) files?


  12. Ariel, use gparted

    apt-get install gparted

    Then select your drive from the menu in the upper right, unmount it if necessary, then modify flags and select the boot flag.

  13. Oh, and alx, gparted will tell you the device of your USB key. It will look something like /dev/sdX1

  14. everything went fine, but when i start up linux, it freezes, the mouse dnt respond neither the keyboard

  15. Hello,
    Was looking for info on restoring ubuntu.
    problems were caused by: have a maxtor touch 250gb external storage device. we wanted to transfer some files to our dell a90 netbook running ubuntu.
    now, the web browser will not start, and no connection to wifi appears. this is a little frustrating. any comments?

  16. Step 4 is just worded terrible. I’ve got everything else done but now I have no clue what to do. I’m on ubuntu wubi and when i type “sudo syslinux /dev/sdbX” in the terminal it says “/dev/sdbX: No such file or directory”

    help me please.

  17. John,

    You need to replace the sdbX with whatever device your memory stick is loaded as.

    use the command “sudo mount” to find out where it has mounted.

  18. This is just stupid.
    Why do you think I’m trying to install ubuntu?
    Because I don’t have it.

    So you actually think I can use all these stupid commands for step 4? Nope.

    I’m on a windows vista.

    I’ll figure it out though.
    By the way Unetbootin freezes so I can’t use that.

  19. I’m working on a Ubuntu machine. When I run syslinux it reports no errors, but ldlinux.sys doesn’t appear in the directory. Any advice?

  20. Sup all

    im on vista business on my HP Laptop and got a aspire one which i want to run ubuntu on..but i want to install it from USB, ive worked around a couple of the steps but still cannot realy get thru.

    the other thing i want to know is should i use Netinstall or live. HELP out please.

  21. Hi people,

    I’m stuck also in step 4.
    When I say:
    “sudo syslinux /dev/sdb1”
    it returns “syslinux: this doesn’t look like a valid FAT filesystem”

    What shoud I do? format the stick in what kind of file system?

    Thanks for everyone willing to help.


Leave a comment

Your email address will not be published. Required fields are marked *