Gaming, Technology, and Gadget News, Reviews, and Previews.
  • members
  • register
  • subscribe via rss
  • Home
  • About TTB
  • Post Archive
  • Submissions / Contact
  • Gift Shop
  • Games That Time Forgot
  • Retro Computing Corner
  • Video Friday

HOWTO: Ubuntu Install From USB - Works For Other Linux Too!

Author: SmellyGeekBoy | Date: May 17, 2008

Easy Ubuntu Install From USB!

Because of the rise of small ‘netbook’ laptops like the Asus Eee, which don’t come with any kind of CD/DVD drive, it’s quite handy to have good, clear instructions on installing Linux from a USB stick. Even if you do have an optical drive, why bother burning a CD every time? It’s so wasteful.

So I worked out a really easy way to transfer the contents of ther Ubuntu LiveCD to my USB stick and set it bootable, and I thought I’d document the process here in case it can help anyone else.

This method also works with Edubuntu, Kubuntu and Xubuntu, as well as most other Ubuntu-based distros and even some other distributions too (basically, as long as the CD uses isolinux as the bootloader, which 99% of them do). It won’t hurt to give it a try, and I’m happy to help anyone out who wants to give it a go.

These instructions assume that you’re using a Windows machine to prepare the USB flash drive, as there are plenty of guides out there on how to do this from within Linux itself. Also, the latest version of Ubuntu comes with a USB stick creation tool right on the LiveCD, so if you have another machine with a CD drive you can boot into that and give it a go.

-

Preparing the files and USB flash drive

  • First up, we need to format the USB stick in Windows - go into My Computer, right-click on the USB drive, and then click Format. When prompted, select FAT32 as the file system. Don’t use NTFS - it won’t work!
  • Download and install 7-zip. It’s free and extremely useful, for this and anything else you might need to do with compressed files. It’s also open source, just like Linux, so that has to be a good thing. Get the latest stable version to be on the safe side - not the beta.
  • Download Syslinux, which is the bootloader we will be using to make the stick bootable. Just get the latest version in zip format, and extract it to the Desktop - right-click, select 7-zip, then extract to syslinux-7.1.1 (or whatever) and then rename that folder to “syslinux”.
  • Open a command prompt (on the Start Menu under Accessories, or run “cmd”) and cd to the syslinux folder:
  • cd Desktop/syslinux/win32
  • Run this command to install the syslinux bootlader to the thumbdrive:
  • syslinux -ma f: (where f: is the letter of your USB thumbstick)
  • Now we need to extract the Ubuntu ISO - Right click on the ISO file, and select 7-zip/extract to ubuntu-8.04…

The preparation is done! You should now have syslinux installed on your USB thumb drive, and a folder called Ubuntu-8.04-somethingorother on your Windows desktop. Now it’s time ot create our bootable Ubuntu LiveUSB Stick!

-

Putting it all together

  • Drag all of the files you just extracted from the ISO into the empty USB drive.
  • Move everything from the isolinux folder into the root of the drive. So, if your USB thumbdrive’s letter is F, as in our earlier example, move all the files from F:\isolinux\ into F:\
  • Rename the isolinux.cfg file to syslinux.cfg
  • Eject the drive, insert into the computer you wish to install Ubuntu onto, and boot! Shazam!

-

You may need to configure your BIOS to boot from USB, or at least go in there and change the boot order to try external drives first. It’s quite a simple process, but varies depending on your motherboard manufacturer, and so I can’t really go into it here.

Most modern computers will let you press F12 during the very first boot screen to select a temporary boot device - you should only need this once so that could be sufficient.

-

[Update]

This has now been tested with Zenwalk and gOS (see my gOS Gadgets introduction here) and works flawlessly. However, for an even easier method I can highly recommend UNetbootin, which fully automates the process under Linux or Windows. If you are using the method above and running into problems, why not give it a try!

Also, for some reason this doesn’t seem to work with Ubuntu Server. I am looking into it!

Other TTB Posts Like This One

  • Install Ubuntu 8.04 Hardy Heron From USB [Updated]
  • HOWTO: Linux From USB The Easy Way With UNetbootin
  • Mini USB Flash Drive FTW!
  • HOWTO: Change The Application Menu Icon In Linux
  • A New Eee Challenger Has Appeared: Medion E1210
Email To A Friend Email To A Friend Add to Google

63 Comments »

Comment by mcgee
2008-05-19 18:53:33

I didn’t try the instructions, but I wanted to point out that the BIOS boot menu might not be accessible by pressing F12. I have to press F8 on mine.

Reply to this comment
Comment by OwningXylophone
2008-05-19 19:58:11

It’s F8 on mine too…

Reply to this comment
Comment by SmellyGeekBoy
2008-05-19 20:58:41

Strange. F8 is generally for the Windows boot menu after the BIOS POST stuff, the one that lets you choose Safe Mode etc.

I checked on both my laptops and they’re both F12… They’re running variations on the PhoenixBIOS theme, though. Anyways, there’s a good guide to booting from USB here - section 6 covers BIOS settings according to BIOS manufacturer. If yours doesn’t have a Temporary Boot Device option or you can’t find it, just set it up as per the instructions there.

(Comments wont nest below this level)
Reply here
 
 
 
Comment by gareth
2008-05-25 14:53:48

i have just tried this with the server iso and it hasn’t booted. does it only work with the live cd? please email me at the above address if not i will check back here every now and then. thanks

Reply to this comment
Comment by SmellyGeekBoy
2008-05-25 15:00:51

I only tried it with the Live CD, but I don’t see any reason why it wouldn’t work with the server version - the boot process is exactly the same. Some things to try if it doesn’t work:

- Make sure the hidden file ldlinux.sys appears in the root of the flash drive after you install syslinux.

- Make sure your BIOS is set to boot from USB. Depending on BIOS, you might need to enable legacy USB support, and it may be recognised as a ZIP drive, floppy drive, or HDD.

- Make sure you’re using FAT32 as the file system - also, if your flash drive is over 4GB you might run into problems.

Without any real details on which point in the boot process it’s failing, I can’t really go into any more detail than that.

Reply to this comment
 
 
Comment by rickatnight11
2008-05-28 16:17:42

Great writeup; I have a few questions about setting it up a bit differently.

I would like to install Hardy TO the USB flash drive.I would like to be able to boot the OS with the drive from a couple machines and have it save all of the data. To make it more complicated I would still like the option to install Ubuntu to that computer if I wish. Does the LiveCD version allow you to treat it as a saveable mobile OS while allowing the same easy install wizard? Install wizard capabilities is not mandatory as long as I can just boot the OS from the drive.

Lastly, how could you have the Ubuntu files be loaded from a subfolder so that the root of the drive could still be used for file storage without clutter? I would love for the drive to have a folder called “Ubuntu” and then all my personal files and folders right on the root of the drive (plus the boot files if they MUST be there too.)

Reply to this comment
Comment by SmellyGeekBoy
2008-05-28 18:53:38

This is a pretty interesting question and something I’m interested in, although I’ve never actually tried it.

In theory, the easiest way to install to the drive would be to boot up from the CD as usual, insert the flash drive, and then just select it as the destination during the install process. Although I don’t think this method will let you use the drive as an installer afterwards.

You can even partition the drive during the install process to create a partition for all your data and keep it seperate from the system data. AFAIK it won’t install to a FAT partition however, so it won’t be accessible under Windows.

Here’s a great guide on a ‘persistent’ install, which I think is exactly what you need. Persistence keeps the basic format of the Live CD, but allows your files and settings to be saved for future boots.

Reply to this comment
Comment by rickatnight11
2008-05-29 01:55:17

You are the man. I have seen that term kicked around but didn’t know what it meant. I didn’t even think about partitioning the flash drive. I think that and the persistent install would be perfect for me. Then I can still store data on it without clutter and use it with ReadyBoost in Vista.

By the way, for viewing and using Linux partitions from Windows (XP or Vista) check out the Ext2 Installable File System for Windows at http://www.fs-driver.org . Works seamlessly just the way you would expect it to.

(Comments wont nest below this level)
Comment by rickatnight11
2008-05-29 02:17:29

Alas, it looks like the persistent install won’t let you do system updates. No matter, I still have a LiveCD for installs, I think I’ll just do a full install to the flash drive since I only really want it as an actual OS. The partitioning was a great idea though. Cheers!

 
Comment by SmellyGeekBoy
2008-05-29 09:03:39

No problem ;)

 
Reply here
 
 
Comment by Blake
2008-08-05 20:56:05

@rickatnight11: Installing a full-blown Ubuntu OS to your flash drive is heavy duty work. It could be done from an actual Live CD, or a different partition on your flash drive. You could try a persistent install, but I’ve had some difficulty with that. Either way though, booting a full Ubuntu OS is heavy wear and tear on your flash drive. I personally use Slax which is optimized for portable use, which I installed from the UNetbootin installer. You can read more about how I did it here.

A much easier way of doing this is to use UNetbootin and install the Ubuntu Live CD, which I wrote about here. Basically, it makes your flash drive behave like a live CD for Ubuntu, from which you can either install to the hard drive or just run Ubuntu. It won’t save your changes, but it will do the same thing as what was described in this article.

If you are looking for a portable Linux OS to put on your flash drive and have changes saved, check out my Linux on a Stick series.

Reply to this comment
 
 
Comment by mrgreen
2008-06-01 06:56:43

Great howto, would it be possible to do this from within a linux distro ? do not think it would be too much of a problem.

MrG

Reply to this comment
Comment by SmellyGeekBoy
2008-06-05 10:05:40

Yep, it’s easy enough to do. You can use the isostick.sh script - instructions here.

Reply to this comment
 
 
Comment by stafa
2008-06-05 01:07:14

I tried this but when I run the command syslinux -ma h: nothing appears on my thumbdrive, i already formated it to FAT32…Any ideas? :[

Reply to this comment
Comment by SmellyGeekBoy
2008-06-05 10:03:40

There should be a file on there called ldlinux.sys. It’s hidden so you might not see it without enabling Tools / Folder Options / View / Show Hidden Files And Folders in Windows Explorer.

Hope that helps!

Reply to this comment
 
 
Comment by sccrfreak342
2008-06-05 21:00:57

I can get everything on the usb drive, but when i try to boot from it, i hit F12 and choose USB Zip and it says it cannot find the boot kernel linux. What do i do?

Reply to this comment
Comment by SmellyGeekBoy
2008-06-06 00:07:31

You got the bootloader installed OK, it just can’t see the files. Did you rename the isolinux.cfg to syslinux.cfg? Are you definitely using FAT32 as opposed to FAT?

If all else fails, you could try my original guide.

Reply to this comment
 
Comment by Anonymous
2008-07-04 17:49:58

USB Zip is not right; a flash drive is USB-HDD.

Reply to this comment
 
 
Comment by sccrfreak342
2008-06-06 22:33:50

why can’t it see the files? i am definitely using FAT32 and i changed isolinux.cfg to syslinux.cfg…i really want to try out linux on my computer, and i don’t want to have to use a cd to do so.

Reply to this comment
 
Comment by Gotham
2008-06-08 21:27:22

This is what happens when I follow your instructions…

NOTE: syslinux is in C:\syslinux
USB drive is j:

C:\syslinux\win32>syslinux -ma j:
Accessing physical drive: Acceso denegado.
Did not successfully update the MBR; continuing…

Reply to this comment
Comment by SmellyGeekBoy
2008-06-09 08:19:18

MBR is the Master Boot Record, sounds like it could be a hardware issue, or maybe the USB drive is “locked” (some of the flash/pen drives have a switch on the side to make them read-only). Otherwise I am stuck for ideas but I will think about it!

Reply to this comment
 
 
Comment by GL
2008-06-08 23:01:10

Great guide, thanks a lot for the painless noiseless ultra fast installation :)

Reply to this comment
Comment by SmellyGeekBoy
2008-06-09 08:20:00

Glad it worked for someone. As is usually the case with these things, I only generally hear from people when it goes wrong ;)

Reply to this comment
 
 
Comment by rd
2008-06-15 00:11:51

hey, thanks for your guide, it worked fine and I booted off the USB stick.

however, when I try to uninstall packages it prompts me for the administrator password, which I never set-up (there was no installation..). I have no idea what this password could be.. I tried leaving it blank and putting in “root” but those didn’t work.

Any help?

Reply to this comment
Comment by Anonymous
2008-08-05 20:57:49

Ubuntu comes by default with no root password set. The live CD is a special case, that also has a user automatically log in so you never need to set the default user password. On a normal install you would just type your user password into the prompt that pops up (it’s just a graphical sudo) but since you haven’t touched the user password you don’t know what it is.

It’s actually a fairly interesting problem, and one that you’re not going to be able to fix easily. The easiest way to get a root password set up is to boot another system into linux, then access the USB drive (access it as a drive, not boot from it) From there you could replace the /etc/passwd and /etc/shadow files with files from a computer that has passwords already set up that you know.

Reply to this comment
 
 
Comment by Website Design
2008-06-18 15:45:38

everything worked for me following the instructions. Thanks, very cool.

Reply to this comment
 
Comment by Ehsun
2008-06-26 14:53:25

Hi, thanks for this guide, it seems simple enough, but I ran into a problem right away in the beginning.

Running the syslinux -ma H: command gives me the following:
“Reading boot sector: The parameter is incorrect.”

I admit, I’m being mischievious by trying this on my iPod. It just sounds handy to have Ubuntu running on my 80GB iPod as well as having all my music in it to play in my car.
And yes, it’s been formatted as FAT32, yet it still has all the music and files to run the iPod as an MP3 player.

I’d appreciate the help.

Thanks!
- Ehsun

Reply to this comment
Comment by SmellyGeekBoy
2008-06-26 16:57:49

The most likely cause would be because the partition on the iPod doesn’t have a boot sector. A quick Google doesn’t really turn up anything similar to what you’re trying to achieve, except a failed attempt on a Mac a few years back.

So good luck - I’ll be interested to hear how you get on!

Reply to this comment
 
 
Comment by Ehsun
2008-06-26 15:55:27

Also, is there a way to save files from the Live session onto the USB?

Reply to this comment
Comment by SmellyGeekBoy
2008-06-26 16:49:56

Look at my comments about ‘persistent mode’ above. Another way would be to save them to a seperate partition - not the virtual partition that is created as part of the LiveCD boot process.

Reply to this comment
 
 
Comment by bullet
2008-07-15 20:23:23

hello

this worked perfectly but i now have a problem. my 4gb usb thumb drive shows up as having only 705mb. when i try formatting it again in windows it shows the drive as having only 705mb.

thank you

Reply to this comment
 
Comment by thanks
2008-07-19 08:55:09

Thanks man it worked great. You should have ads so i can click for thank you.

Reply to this comment
 
Comment by Anonymous
2008-08-01 16:40:55

Didn’t work for me as the BIOS options in my old laptop don’t allow for booting from a thumb drive. In fact, the BIOS settings have no reference whatsoever to USB devices or support.

I’ll try the DVD and see if it still works and, if not, maybe I can update the BIOS or install from some kind of networked drive.

:-(

Reply to this comment
 
Comment by Jon Ramvi
2008-08-05 12:53:22

Why not just use unetbootin? Sucky name, great app!
Works in both Windows and Linux.
Check out step two here:
http://ubuntu-eee.com/index.php5?title=Get_Ubuntu_Eee

Reply to this comment
Comment by SmellyGeekBoy
2008-08-05 13:17:30

Sounds good to me. I wrote this guide a long time ago and thanks to the advent of ‘Netbooks’, without optical drives, a lot of better solutions have popped up in the meantime. So I’m always open to recommendations!

Hopefully I’ll be in the market for a new netbook myself soon as my old Thinkpad struggles with a lot of the things I need it for. I’m liking the look of the Acer Aspire One or the MSI Wind at the minute, but that Dell E looks quite tempting too… The Eee 901 is a really nice little machine as well.

Completely off topic, sorry!

Reply to this comment
 
 
Comment by stelt
2008-08-05 21:05:42

For Ubuntu it’s much easier to use WUBI

Reply to this comment
 
Comment by Ross
2008-08-05 21:53:31

As a previous commenter mentioned, you’ll probably want to go the Ubuntu Eee method if you’re buying an Eee PC. unebootin works perfectly, and the Eee v. of Ubuntu (Xubuntu, Kubuntu etc) comes w/ all the drivers and a smaller footprint (fewer apps).

Reply to this comment
 
Comment by Tiago Faria
2008-08-05 22:19:52

Check UbuntuWeblogs.org, I would be happy to aggregated your Ubuntu category there.

- Tiago

Reply to this comment
 
Comment by GeneralMakaveli
2008-08-05 22:31:14

When I use the command “syslinux -ma e:” Nothing happens at all. Any one know why its not working for me? Thanks.

Reply to this comment
 
Comment by Anonymous
2008-08-06 01:05:30

Many, many thanks. I had this rolling in about 10 minutes and I ain’t that saavy.

Cheers

Reply to this comment
 
Comment by Need more instruction
2008-08-06 02:37:48

This is just my opinion but you should refine this article and give a bit more instruction. For a good hour or so I couldnt figure out why your directions did not work, and then I decided to try and install 7 zip, and it worked, a simple one liner such as ‘install the 7 zip program’ would have done wonders. I did not see anywhere where it said or hinted at installing that program. After that it was mostly smooth and useful to know all of this. However I recommend that someone else should proofread your instructions so that people who are new to linux or do not use it on a regular basis will understand a little easier. Also your 7-zip link is broken.

Reply to this comment
Comment by SmellyGeekBoy
2008-08-06 08:48:16

Thanks for the heads up. I have fixed the broken link. I think that getting someone else to proofread my instructions would be a good idea - I was following them myself as I wrote them down, but that doesn’t necessarily mean that someone else would understand them!

That said, judging by the comments on here, it has worked OK for a lot of people.

Reply to this comment
 
 
Comment by Neo
2008-08-06 03:47:11

I think there’s a script called isotostick.sh which does all the dirty work for you in just a minute.

Reply to this comment
 
Comment by Thiago
2008-08-06 04:16:53

Thanks, work perfectly.

But when I boot, the system stop in the shell and I don’t know how I start the installer :-(

Reply to this comment
Comment by SmellyGeekBoy
2008-08-06 08:48:46

If it’s stopping where I think it is, I think you just need to hit enter.

Reply to this comment
 
 
Comment by kleanchap
2008-08-06 11:26:30

What size of USB thumb drive do you need for this setup? I am currently using Vista, which does not offer disk formatting in anything but NTFS (I hate that part of Vista). Are there any tools out there that will allow me to format the thumb drive in FAT format? (i.e. if I need to redo the steps later).

Thanks for the article.

Reply to this comment
Comment by SmellyGeekBoy
2008-08-06 11:33:45

There is 700MB of data so I recommend at least 1GB, but not over 4GB as some BIOSes have problems getting them to boot properly.

To format USB drives I can highly recommend the HP USB Disk Storage Format Tool. I haven’t actually tried it in Vista but it *should* work.

Reply to this comment
 
 
Comment by up_late
2008-08-06 20:24:52

Since this says that it works for other linux installations (in the title) can anybody tell me how to use this for a suse install?

Reply to this comment
 
Comment by Dan
2008-08-06 21:14:33

I tried this with the server version. I gets into the installer, and tries to mount a real CD. There doesn’t seem to be a way around easily. I may try a shell to mount the USB filesystem to /cdrom if I can find it.

Reply to this comment
 
Comment by pm
2008-08-09 10:51:51

I tried, this workin perfectly but im unable to save changes on system. Any1 have idea 2 make this work as USB os rather live USB?

Reply to this comment
Comment by SmellyGeekBoy
2008-08-09 19:46:21

You need to look at my comments above about “persistent” mode!

Reply to this comment
 
 
Comment by Pacodelarosa
2008-08-30 14:53:35

Hallo everybody,
WARNING !!
mini laptops like ACER ASPIRE ONE, ASUS and so on, just don’t have the power to mount and maintain USB sticks over 1Gb.
These devices are low power devices which means low electricity, so if you have to install something from USB just be sure to use USB not bigger that 1Gb.
Hope this helps !

Have fun !

Ciao

Reply to this comment
 
Comment by Casey
2008-08-31 05:20:08

What about being able to have multiple arch’s and then have a boot menu to choose which version of installer to boot.

For example I deal with a mix of i386 systems and AMD64 systems. What if I want to put both installers on the jump drive and have the drive display a menu asking which arch that I wish to install. Then it would kick start the install from the arch’s subfolder.

I don’t think that categorizes as a persistent install but could be wrong. If anyone of you have setup an multi-arch usb install stick I would love to hear your suggestions. If it is documented that’s even better, post the link.

Reply to this comment
Comment by SmellyGeekBoy
2008-08-31 11:35:43

I have never heard of this being done before, however it would simply be a case of having two different kernels set up, pointing to the two different sets of packages. Technically it would be relatively easy, but I couldn’t tell you how to do it off the top of my head. I will have a look into it though.

Reply to this comment
 
 
Click here to cancel "reply".
Name (why not register?)
E-mail (not required)
Your Website (not required)
Your Comment
Comment moderation is enabled so there may be a delay until your comment appears. Basic HTML is allowed. Stupid comments will be deleted!

Trackback responses to this post

  • Scott’s Place » Blog Archive » Install Ubuntu From USB
  • Install Ubuntu Hardy Heron dalam 10 Menit « pegelinux
  • » Blog Archive » Ubuntu Netbook Remix on an Eee PC 701
  • C Curve : Installing Ubuntu Using a USB Flashdrive
  • Instalar Ubuntu desde un USB | 8chapas.com
  • Finance articles and news » Blog Archive » HOWTO: Ubuntu Install From USB - Works For Other Linux Too!
  • WrapUp: Hulu in HD, Better Gmail 2 Updated, and More
  • First Impressions: gOS ‘Gadgets’ | Team Teabag
  • Creating a Ubuntu (or any other distro) USB Thumb Drive Install - Overclock.net - Overclocking.net

Recent Posts

  • New MS Ad “Icebreaker” To “Reintroduce Microsoft To Viewers”
  • Square Enix: the Electronic Arts of the East?
  • Video Friday: A Journey Down Memory Lane
  • Video: Shopping For Shoes!?
  • Samsung: “Blu-ray has 5 years left”
  • Buy Your Own Raving Rabbids!
  • Sex Pistols, Motorhead & MC5 Re-Record Songs for Guitar Hero
  • Best. Quote. Ever!
  • Download An Album Made On Korg’s DS-10 Synth
  • No More DLC for Crackdown, The World Sheds a Tear
  • Halo 3 ‘Mythic’ Expansion Brings New Achievements, Maps
  • Miniscule Everun Note Gives Asus’s EeePC A Run For Its Money
  • Pirates Vs. Ninjas Dodgeball Out Today - Two Other Games Too!
  • Oh No You Didn’t!
  • Video: Handheld Multi-Console Hack

Recent Comments

  • Games that Time Forgot: Hi-Octane (PC/PSX/Saturn)
    • Axel Night: It seemed most things Bullfrog touched oozed gold. This and Streets of SimCity (by Maxis, of course) were probably…
  • Square Enix: the Electronic Arts of the East?
    • SmellyGeekBoy: Also, EA ruined Burnout.
    • SmellyGeekBoy: Bullfrog also made Hi-Octane. Whether you consider that to be a good thing or a bad thing is up to…
  • Best. Quote. Ever!
    • SmellyGeekBoy: I think his point was that he'd rather kids were playing music games than violent games.
    • Rafael: Pretentious Idiot Musician. It take dozens (sometimes over a hundred) artists and programmers months or years to create a single game.…
    • SmellyGeekBoy: I hate it when that happens.
  • Samsung: "Blu-ray has 5 years left"
    • Tigervamp: I also prefer having a physical item to sit on a shelf. I just feel that once downloadable content takes over…
    • J Watkins: I prefer having a physical package, not a download. I like packaging, but also the downloaded versions are often…
  • Halo 3 'Mythic' Expansion Brings New Achievements, Maps
    • SmellyGeekBoy: Yep, the "Mythic" skull nonetheless. I'm guessing that they ran out of dificulty levels to name their DLC after (after…
    • arkoner: From what I understand, mythic difficulty is already in the game. There's a skull that increases the difficulty of…

« Chair Made From Old PS2’s Goes On Sale September 10th Oh No You Didn’t! »