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

You may also like...

109 Responses

  1. Peter says:

    Ops, more info of what I am doing: I’m using VMware Player with Jaunty as guest and Win XP is the host.

    I am trying to create a bootable pendrive to dual boot a desktop running Windows Server 2008, and to be able to install Jaunty in other machines.

    Any help is very much appreciated!!


  2. Peter says:

    Ops – sorry – its FAT32 – ok.
    But after creating the bootable stick – I dont know why – it is not working when I put it in the desktop to boot from the USB device.
    that Un
    I will try the Unetbootin.

  3. Peter says:

    Just for the record – That Unetbootin – is fast & really easy to use – works perfectly.

  4. Gedasass says:

    i have a problem with step4, because my notebook has no cdrom drive i’m trying to install ubuntu throught the usb, but now in my notebook is win xp, and i have no idea what to do with step4

  5. Frank says:

    If you already have a linux distro installed there is an easier way provided that your bios can boot from a USB drive.

    One step.

    Open a terminal/command line and type in the following:

    dd if=/path/to/iso of=/dev/DISK

    Where disk is the name of your disk, sdb, sdc, ect…

  6. ML says:

    To: Frank,

    I tried dd in Linux as you described.
    But it couldn’t boot.
    There should be one or more steps you missed.
    Did you do anything to your USB before?
    Please try to make one on new USB drive and remember the missed steps.
    Then, let us know about it.

    I made Clonezille bootable in USB, but it didn’t have a fdisk.

    I just want a Linux in USB for me to change partition.

  7. Dolpoteg says:

    Any idea how to do this if u have a mac?

  8. newtoUbuntu says:

    This is a good pose and is working for me. By the way, is there a way to clear the bootable USB?

    After syslinux -ma usb:, my usb is bootable. Even after i deleted all the contain in the USB, the USB still able to boot with “SYSLINUX 3.83 …..”. How do i celar this? Can i use the syslinux to clear? I do not keep formating my USB stick.

  9. noob says:

    I got the disk to boot but when I select any option on the installation menu I get a pop up that reads “/casper/vmlinuz”. What does this mean and how do I correct it so I can run the installer?

  10. hitesh_m87 says:

    I made my usb stick bootable from my friends pc from ubuntu- create USB startup disk. but i hav windows xp & i want to install ubuntu from usb i created before but i does not work after booting it says “could not find kernel image:linux” plz help me……..

  11. samanen says:

    [email protected]: ~$ sudo syslinux /dev/sdbX
    /dev/sdbX No such file or directory

    What to do HELP PLEASE! 🙁

  12. Fullmetal says:

    Samanen bcus /dev/sdbx is where ur usb driver? For check ur usb root drver ‘sudo fdisk -l’ my is /dev/sdc1 and ur is difen

  13. mrxa says:

    As far as I can see this is useless concerning installing Ubuntu 9.10 server.
    I’ve tried everything I can think of (including unetbootin mentioned above) and every attempt is a big no go. Booting from USB goes fine but then you’re done.
    Installing Ubuntu 9.10 server is only possible from a CD or with an Internet connection no matter what you’re doing.
    When confronted with a USB stick, the install program asks for drivers (which I don’t have) or it offers to look in /dev where the USB stick is mounted, but that doesn’t work either because it gives such a load of devices that it scrolls of the screen so I don’t know which of it is the USB stick.

  14. Vidir Valberg Gudmundsson says:

    Yeah I totally agree @mrxa!

    It should be possible to install Ubuntu Server with a USB!

    I for instance want to install Ubuntu 8.04 Server on my own machine to test something out before putting it on a dedicated server I rent.

    Going to look for a launchpad entry or create one!


  15. Linuxball says:

    I used the above tutorial to copy the .iso image of an Ubuntu 8.04 Server (i386) installation CD to a bootable USB stick. Only one thing was missing to get it working: At the end of step 4 I had to install boot code to the Master Boot Record (MBR) of the USB stick by issuing the following command:

    sudo dd if=/usr/lib/syslinux/mbr.bin of=/dev/sdb

    where /dev/sdb is the device name for my USB stick.

    BTW, using a FAT32 as boot partition syslinux won’t correctly update the copy of the partition boot sector. So after step

    sudo syslinux /dev/sdb1

    one can check this by executing

    sudo fsck.vfat -n -v /dev/sdb1

    Fortunately, we can fix this bug by running

    sudo fsck.vfat -r -v /dev/sdb1

    choosing “1” (Copy original to backup) and saying “y” when being asked whether to perform changes.

  16. Rasto says:

    I tryed procedure – it is not working properly, but i found similar solution put all content of selected .iso to root and make steps 3 – 5 and youll get it …same as bootable Instal CD but from USB

  17. Russell says:

    What is the proper command to determine what my USB’s disk name is? I think that is the only thing holding up my installation.

  18. Nan says:

    I created a bootable usb in my Mac but can’t install in my Toshiba NB305. I know the usb is working fine because when i put it in my Mac is mounts just as it should. But it doesn’t work with my Toshiba even thought i set it to boot from usb. It goes straight to windows 7.


  19. petur says:

    I get as far as booting the USB, but whatever I select on the ubuntu install screen, I get a popup window saying ‘/casper/vmlinuz’

    I’m stuck at this, any suggestions? I can’t stand this windows7 on my new netbook 😉

  20. axllaruse says:

    I created my live USB with Ubuntu 9.10.

    I want to change the installation options to show every kernel version I have on the USB.

    It have Grub2 installed and update-grub don’t do a thing.

    Is there a way to modify the installation menu?

    Thanks for your help

  21. CpuNoob says:

    Hey i dual booted my toshiba and installed Ubuntu 9.0 via install disk, but i ended up editing the program accidentally and now it says “cannot find Kernel” I have it installed and it did work but how do i get it to launch now? The initial install disk wont even work anymore!! i have lots of files on my new Ubuntu OS and Windows is ok but theres got to be a quick fix to get my files back and OS running agin right? anybody have any ideas please let me know

  22. axllaruse says:


    Search information about Grub or Grub2 related to not finding the kernel and how to fix it.

  23. Danno says:

    A very lackluster walk through!

  24. SteveNewguy says:

    @ LinuxBall —

    thanks for the tip to restore the mbr on the usb flash media. That was the breakthrough for me.

  25. SteveNewguy says:

    These procedures also worked with Lucid (10.04 LTS) distro. Hats off to a very repeatable install procedure, removing the mystery of Ubuntu USB boot solutions that failed me due to “unrecognized cdrom” errors or when Unetbootin kept me from continuing the installation because the network device wasn’t recognized.

    GNU/Linux will succeed only when there’s sufficient transparency. If we wanted closed solutions, then we’d turn to Apple or Microsoft.

  26. newtoUbuntu says:

    After you make the USB bootable for Linux using syslinux, how to make the USB the device it self not bootable without formatting it?

  27. Steven P says:

    Great. The whole thing yields a “grub” prompt. Lackluster is right. Thanks anyway.

  28. toshscreen says:

    I burned fedora on a cd, when i booted the computer from the cd, i saw the 10 s countdown screen and i after a black screens with codes appears. In the first line for example we can read
    [] do_page_fault+0*194/0*2f3
    and that is it. I need help

  29. Anggi says:

    Thanks for installing ubuntu guide.

  30. tamba says:

    How can I overcome anerror message that reads
    E:sub-process/usr/bin/dpkg retun error (1)
    occured when installing Ubuntu from USB drive.

Leave a Reply

Your email address will not be published.