Installing Ubuntu from Memory Stick

25 February 2008

If you - like me - have an ultra-portable notebook (marketing slang for 'comes with no CD-ROM') and no external CD-ROM (why should you?), you might know that it can sometimes be a bit tricky to install an OS from scratch.

I was thus all the more positively surprised by how easy it was to install Ubuntu from a USB memory stick onto my machine. Here's basically what I did*:

*(this assumes: virtual CD-ROM => F:, USB stick => G:, syslinux => c:\syslinux)

  • Download Ubuntu ISO image.

  • Download and install Syslinux and Daemon Tools.

  • Plug in USB stick and make sure you have no more U3 stuff installed on your stick.

  • Format the stick:
    format g: /FS:FAT /Q /X

  • Make stick bootable:
    c:\syslinux\win32\syslinux -s G:

  • Mount Ubuntu ISO image to drive F: (e.g. using Daemon Tools)

  • Copy some files from virtual CD-ROM to stick:
    xcopy /e /h /k f:\*.* g:
    xcopy /e /h /k g:\install\*.* g:
    xcopy /e /h /k g:\isolinux\*.* g:
    copy g:\casper\vmlinuz g:
    copy g:\casper\initrd.gz g:

  • Rename a config file:
    move g:\isolinux.cfg g:\syslinux.cfg

  • Edit syslinux.cfg by removing all /casper and /install references. (Not necessary for Ubuntu 9.x)

That's it. Adjust your BIOS boot settings and boot from the stick.