How-To: Install Ubuntu Linux With No Optical Drive

Sick of burning CDs of Linux distributions every time you want to try out a new one? Don’t worry, you can reuse your USB stick as many times as you like and burn bootable ISOs to it. Is there an easy way to do this? Yes.

It’s actually pretty easy. But before I tell you how there’s a small list of things you need to do first:

  1. You need a USB stick that you don’t mind erasing all the data off of so you can put a distro of *nix on it.
  2. The computer you do this on must be physically connected to the router, i.e. no wireless here. Must be wired. Granted, some *nix distros come with decent wireless support, but better safe than sorry here. Configure the wireless later.
  3. The computer you do this on must be able to boot from USB. Being that the vast majority of computers can do this it shouldn’t be a problem. Just head into the BIOS, look at the boot device order and make sure USB is before HDD and you’re good to go.

A utility that you can use to create a bootable Ubuntu NetInstall image on a USB stick is UNetbootin. This is available as a Windows app or a Linux app.

In my particular situation I only had a 512MB USB stick at my disposal but wanted to install Ubuntu 8.10. Not a problem because Ubuntu has a "NetInstall" version so you don’t need a USB stick with large space (you could even get away with a 128MB).

I downloaded UNetbootin and ran it. This is what I did:

image

Above: I select the distribution as Ubuntu and the second drop-down menu as the 8.10_NetInstall because that’s the one I know will fit on the little 512MB USB stick. At the bottom the USB Drive is selected so that’s where the image will be written to.

image

Above: UNetbootin is retrieving the image from the internet to push to the USB stick.

image

Above: UNetbootin has completed the image install to the USB stick. Now I have a USB-loaded version of Ubuntu 8.10 NetInstall ready to rock. I clicked Exit to close the problem.

Notes before continuing: UNetbootin supports a ton of different *nix distros, including a few BSDs! You don’t have to use Ubuntu if you don’t want to. You could use Linux Mint or Fedora for example. But it should be noted that Ubuntu (aside from the "biz-card" ones like Puppy Linux and Damn Small Linux) is the only one that has a NetInstall feature. This is the reason I chose it to begin with. I wanted a full distro without the size because the stick couldn’t hold it. Ubuntu was the one.

At this point you do the following:

  1. On the destination computer, make sure it’s wired into the router for internet connectivity.
  2. Insert the USB stick into the destination computer.
  3. Boot it.

If all goes well, the PC will boot from the stick, automatically acquire network connectivity and then ask you a series of simple questions (i.e. what keyboard layout do you want, etc.).

From there the base Ubuntu will be installed with no GUI.

After that you will be asked what you want for your Ubuntu. You can do the regular Ubuntu Desktop, Xubuntu, Kubuntu, "Media" version, "Basic Server" or whatever you like. Most likely you’ll just opt for Ubuntu Desktop which is what I did.

Depending on how fast (or moreover slow) your internet connection is, it may take time for the installation to complete. Possibly a really long time. Be patient. It will eventually complete.

If you didn’t use a NetInstall but rather a regular "full" distro, everything will load off the USB stick without issue and you’re good to go.

Comments

  1. This is the most useful bit of information I’ve gotten all day, thank you. I wish I knew about this before.
    I have a question thought, can I just plug this into any computer and it will work (not counting that I would be missing driver for the new hardware)? because then I would have a portable OS for those times people crap out their Windows with viruses.

    • Mateo,

      Although you can use this like a live CD and boot off it if you go the Ubuntu route, it won’t be persistent (it will not save any changes, like a fresh install each reboot). If that’s what you want, great. Otherwise, you can still use UNetbootin just choose a different distro like puppy linux, Slax, and maybe a couple others. You can read more about this in my Linux on a Stick series, where I detail my adventure of getting a portable OS on my flash drive.

      If you really want Ubuntu though, and you want it to be persistent, I think you will need at least a 4GB flash drive to hold the OS itself, and then either an actual CD or a second flash drive to hold the installer from UNetbootin. Connect them both, boot from the install CD/USB, load the installer, when it asks which drive to install to tell it the 4GB flash drive.

      The problem with Ubuntu, besides the large amount of space it takes up compared to puppy, slax, damn small linux and others, is that it has not been optimized for portable use. It is built as a desktop OS and is expecting to be installed on an internal hard drive. For this reason you are more likely to drastically reduce the life of your flash drive with all the read/write operations, and also see it run slower since it doesn’t have the transfer speed that an internal hard drive would have.

      Good luck!

    • I couldnt agree more, this has made my day thank you!! seriously.
      I got my missus a little acer aspire one, and linpus was a dog, no optical drive and this was a life saver
      Again Thank you
      Stavros

  2. I misunderstood the article. how dumb. i thought i could run linux off a usb stick. this is only referring to using a usb stick to install linux but you would have to install it to a hard drive. i might try installing it to a 4GB usb stick and see what happens though…

    Bare Minimum requirements for Ubuntu.

    It should be possible to get Ubuntu running on a system with the following minimum hardware specification, although it is unlikely that the system would run well. You should use the Alternate install CD to attempt such an installation.

    * 300 MHz x86 processor
    * 64 MB of system memory (RAM)
    * At least 4 GB of disk space (for full installation and swap space)
    * VGA graphics card capable of 640×480 resolution
    * CD-ROM drive or network card

    • You can run *nix off a USB stick easily. I’ve done it both with Puppy Linux and Damn Small Linux. In fact you can use UNetbootin to install either and it’s ready to rock in a matter of minutes (literally).

  3. I’ve actually been using this method for a while. The only problem I had, is sometimes, when I put the USB drive again on the computer, the computer would try and mount it as a CD. It would fail and I would have to mount it from the command line.

    What I had to do was edit fstab. There was an entry there for the usb drive. I only had to remove it (actually, I commented it out… haven’t removed it yet…)

    If anyone runs into this, all you need to do is go to
    Applications > Accesories > Terminal
    there type
    gksudo gedit /etc/fstab
    and look for the line that points to your usb drive. And comment it and test it (comment it adding a # sign on the beginning of the line)If it works, you can remove it.

    I hope this helps if anyone encounters this problem…

  4. mateo, the only problem with installing it to a pendrive that I can see, would be with drivers on different computers. The installation would install the drivers it needs for that computer. In another computer, it might need other drivers that might not loaded or installed…

  5. “But it should be noted that Ubuntu (aside from the “biz-card” ones like Puppy Linux and Damn Small Linux) is the only one that has a NetInstall feature”.

    Unless I’m missing something, this is inaccurate. At least Debian and Fedora DO have netinst images that fit under 200M, possibly other distros do as well.

    • My fault for not being more specific. Ubuntu is the only one with a NetInstall selectable distro *within* UNetbootin (although you can specify you’re own downloaded ISO, but it’s not pre-built into UNetbootin currently). So you could use a biz-card distro unlisted in the software but you have to download the ISO yourself first.

  6. This article *****! Who cares about MS Windows… err if you are going to write such a post I’d be more interested in how to do this from within GNU/Linux. But hey- no huge loss. Network booting would have been more interesting- that is actually what I thought this was going to be about.

    • From within Linux?, Just get UNetbootin for Linux. It’s right there on the website. Just download it and execute it. Same GUI, same steps.

  7. You know that instead of going to all this trouble you could download Wubi. It installs Ubuntu to your computer like it were a program in windows. It does everything for you from partition your hard drive to doing the whole instillation. It makes a duel booter out of any computer and if you dont like it Wubi will uninstall it like it never happened.

  8. very nice article. just started using unetbootin to flash some appliance type devices and wish i had seen this first. just one minor point… ubuntu is not the only distro with a net-boot type image, at a minimum debian and red hat do it too, and i’d be surprised if any enterprise grade linux (suse, et al) did not as well.

    to the previous comment regarding running *nix live off a usb… one of the options is to run a live CD from usb. personally, i would only do this in a pinch for a couple of reasons… it would run slowly (but functionally) and recurring read / writes to your thumb drive will drastically shorten its life and reliability.

    my two cents and worth every penny.

  9. “UNetbootin supports a ton of different *nix distros, including a few BSDs! You don’t have to use Ubuntu if you don’t want to. You could use Linux Mint or Fedora for example. But it should be noted that Ubuntu (aside from the “biz-card” ones like Puppy Linux and Damn Small Linux) is the only one that has a NetInstall feature.”

    What? Just Ubuntu has NetInstall? Are you really sure about this one? I’ve installed SuSE, Red Hat/Fedora, Debian etc many many times for the net.

  10. “Don ’t worry, you can reuse your USB stick as many times as you like”

    False, flash memory has a fixed rewrite count usually around 1 million or so.

  11. Just for info, on the Mandriva Linux mirrors you can find an all.img file, which is a bootable image intended to be written to a USB stick (or other bootable media – SD card, whatever). It’s only around 10MB. You can boot from that and then do a hard disk or network install. See http://wiki.mandriva.com/en/Docs/Installing_Mandriva_Linux .

  12. Retep Nertsam says:

    Wait a minute. You want me to grant administrator rights to a binary that I’ve downloaded!?!?

    I don’t care how great a tool this is. It ain’t gonna happen!

    • Jim Robinson says:

      Agreed. The apparent requirement to run as root is disquieting. However there is a ‘-u’ option that seems to let the program not run as root. Do
      “./unetbootin-linux-275 –help”
      to see all the options.

  13. A side question, when installing ubuntu with Unetbootin, in the ubuntu install process, will it recognize and install to a partition of an external HD? I’ve got a new 400 gb iomega portable and I want to partition out 5 gigs or so out as a ubuntu partition and perhaps another 5 out as a debian. Then as I boot other computers, I’ll choose which one I want to go into or just plug it in and use the rest for windows / backup / storage. Thanks

  14. I am A silver surfer so please bear with me Ihave fitted a second hard drive only 4 Gig formatted Ntsc nothing on it I have done what you say about downloading Ubuntu 8.10_netinstall to a pen drive.How do I put on the second HD. I have XP onthe first one. Any help would be appreciated. Richard

    • simply set your BIOS to boot from pendrive. Then just restart your computer.

      You might also have a Boot Selection menu option when booting your computer. Usually you can access it by pressing F8. Here you select your pendrive and then it’ll boot.

  15. i want to install os with pen drive but there is no option like install with pen drive .there are only 3 options
    1. cd drive
    2.hdd
    3. pci lan
    plz somebody suggest……..

  16. Thanks for you article. I will now definitely have to test that!

  17. Shrinath K says:

    Hey everyone… i ran into a small problem. Apparently, UNETBOOTIN dosent seem to work if windows is NOT in the C:\ drive. I have it in E:\ and due to some reason, i am unable to boot !

    Thanks !

    • Shrinath K,
      What Operating System isn’t booting?
      The one on the USB stick (USB drive, pendrive, etc.) or the one on your Hard Drive (Windows)?

      • Hey rovr138,

        First, i wasnt “tryin” to install it to a pendrive. i was just tryin to install fedora onto my Harddisk, without burining a CD. So i tried UNETBOOTIN.

        I installed UNETBOOTIN and aftr that, it shows a entry while starting up windows….below “Microsoft Windows” is “Unetbootin” and it is “supposed” to boot into Unetbootin. But it dosent. Some problem with the NTLDR and BOOT.INI files.

        It dosent boot into UNETBOOTIN if windows is NOT in C:\.

        Windows boots normally though.

        Thanks.

  18. Why did you need to write a whole article on downloading a well known utility and following it's ridiculously easy interface? This whole page is just for the purpose of spilling your cerebral diarrhoea onto the internet. Allow me to sum it up in one simple sentence; Download UNetbootin and your chosen distro's LiveCD image then load up Unetbootin and use your god-given intuition and common sense to figure out what to do next.

  19. does this work with linux mint?

  20. Allan_cris says:

    fuck u?

Leave a Reply