April 16, 2008 · General · Email This Post
Share

If you're new here, you may want to subscribe to my RSS feed and if you have questions related to your ubuntu system post question to our forums. Thanks for visiting!

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

Prerequisites

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.

  • Share/Bookmark

Related Articles

74 Comments to “How to install Ubuntu Linux from USB Stick”

  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!!

    Peter

  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:

    samanen@samanen-laptop: ~$ 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!

    /vidir

Leave a Reply