Not Registered Login | Register

Installing Ubuntu from a USB-Stick

last updated: 03. January 2008 There are several annoyances with installing Ubuntu from a liveCD:

  • first of all you need some empty disks handy, which get less and less common today
  • if you just set up one PC in 6 months you wont ever need that CD again
  • the startup takes like forever due to the bad access times and transfer rates
  • you need a CD drive - think of Subnotebooks or old and Broken PCs

...but you most likely have an USB-Stick around and even the oldest PCs have already an USB connector. So if the Stick measures at least 1GB you could install Ubuntu from it.

Preparation


You will need the syslinux (>= 3.50) package and the CD Image. Furthermore your BIOS must be able to boot from USB.

Next the Stick has to be formatted with FAT32 and the partition has to have the boot flag set. You can do both using gparted.

Now you have to install the bootmanager syslinux on it, you can do this with

syslinux -s /dev/sda1

assuming you USB-Stick is /dev/sda1.

Copying the Files


Now copy the contents of the image to the root directory of the Stick.
You can leave out the following files since they are just needed for booting under windows:

  • /bin, /programs
  • start.bmp, start.exe, ubuntu.ico, autorun.inf

To extract the contents from the image open it with file-roller(or some other packer) and select the files you want and then extract them to the root directory of the Stick.

Finish


Since the bootmanager on the CD was isolinux, you have still to change some bits in order to make it work with syslinux:

  • rename /isolinux/isolinux.bin to /isolinux/syslinux.bin
  • rename /isolinux/isolinux.cfg to /isolinux/syslinux.cfg
  • rename /isolinux to /syslinux

now the stick is ready to be booted from.