home | about | newsletters | contact | advertising | shop | radio | courses | widget | site map

Helping Normal People Get Their Geek On And Live The Digital Lifestyle

Is It Possible To Make $141,657.15 While Playing With Your PC?
» Learn More About PCMech Premium Program
Big Things Are About To Happen Here

Login: Password: Remember me

All Posts Tagged With: "stick"

How To Get A Full Install Of Linux On A USB Stick

In previous articles and videos I’ve discussed how to get a "Live" mode (i.e. as if your computer were booting from CD) of Linux on a USB stick. Some people think this is cool but would rather have a full CD-sized distribution installation instead. And when I said "CD-sized" I’m referring to distributions that take up the entire contents of a CD (such as Ubuntu) and not "biz card" distros like Puppy Linux and Damn Small Linux.

To do this it isn’t dependent on the distribution you’re using (you can use any you like) but more so on your USB stick itself.

Consider it this way: You want to use your USB stick as a "hard drive", so to speak. Being that’s the case, you need a stick that exceeds the minimum requirements for the OS to work.

Using Ubuntu as an example, the minimum requirement according to its native installer is a drive that has at least 2048MB free. A 2GB USB stick isn’t enough because it doesn’t have enough minimum space - so you need a 4GB USB stick.

Side note: Think a 4GB USB stick is expensive? It’s isn’t. It’s 8 bucks. And I remember not more than 3 to 4 months ago they were $22. These things are getting so unbelievably cheap it’s ridiculous - and they all work.

My recommended method for installing a full Linux distro on a 4GB USB stick

Before continuing, yes the way I do it is complete overkill - but I like to have absolute 100% confirmation that the Linux install absolutely positively will not touch the internal hard drive of my system. You’ll understand what I mean by that in a moment.

1. Head into the BIOS of your computer and from the boot device order set the first to be CDROM and the second to be USB-FDD, USB-HDD or USB-CDROM.

If USB-FDD doesn’t work for a boot device, try USB-HDD. If USB-HDD doesn’t work, try USB-CDROM. One of them will eventually work. And if not, try plugging the USB stick directly into the back of the computer (as in use the USB ports that are directly off the motherboard and not the ones wired to the front of the case).

2. Power off your computer, open the case and physically disconnect the hard drive from the motherboard.

This is the overkill part. Not entirely necessary, but I don’t want GRUB to even know the internal hard drive exists - because even if you set the hard drive "not to exist" in your BIOS, the Linux installation will still "see" your internal hard drive on most motherboards. I go the extra mile by cracking open the case and unplugging the SATA connector from the motherboard physically.

Before rebooting the computer:

Pop in your Linux distro CD-ROM into the tray because you’ll need to boot from it to install the OS to the USB stick.

Insert the USB stick you want to install the OS to into one of your open USB ports.

3. Reboot and proceed with a normal Linux distro installation.

If all goes well, your computer will boot up, spin up the CD-ROM and launch Linux in a Live mode. From there you proceed with a normal installation. Being your hard drive is physically disconnected the OS will be forced to pick the USB stick as its only means of media to install the OS to.

When done, the OS will prompt you to eject the disc (which you do), then restart the computer.

4. Reboot and test the Linux OS off the USB stick to make sure everything works okay.

On reboot you should have a full Linux OS ready-to-rock. If so, you’re all done with that.

5. Shut down, power off the computer and reconnect the internal hard drive to the motherboard.

Once the USB stick has a full Linux OS on it you’re safe to reconnect your hard drive back to the motherboard.

6. Do a test boot with the USB stick inserted to see if it loads first before the internal hard drive does.

Your boot order should be CDROM, USB-FDD (or HDD or CDROM) then HDD. So what your computer should do is try to boot from the optical drive first, then the USB stick and then the internal hard drive.

If all goes well, whenever the USB stick is plugged into the computer and booted from a "cold start", it will always boot from the USB stick first whenever you want to go into Linux. When done you log out of Linux, shut down, power off, unplug the stick and reboot again to go back to the internal hard drive’s OS.

Final notes

You should bear in mind that by installing a Linux OS on a USB fashion it will not be portable. What this means is that the OS will set itself to use the computer it is first booted from and configure itself as such.

If you take the USB stick after a full install and boot, then bring it to another computer with different hardware and boot from that, chances are high that the internal settings of the OS on that stick will get all messed up because it’s "expecting" a different the computer it was first booted from. Sure, you can simply reconfigure everything and get it working again relatively quickly for anything messed up, but that’s a bit of a hassle.

For each computer you want to boot a full-install-on-USB-stick distro from, it’s recommended you get a separate USB stick dedicated to each computer. The sticks are cheap enough anyway so it’s not a big deal.

Install A Bootable Linux To USB Stick

This is a follow-up article to this one showing how simple it is to use Unetbootin to install a Linux distribution to your USB stick. Bear in mind that Unetbootin has the choice of many different distros to choose from. Even if you have only have an older 128MB stick, you still could use Damn Small Linux on it! See video below for details.

Running Linux With No Optical Drive (Part 2)

Over the weekend I was at the Wal-Mart picking up a few things and noticed over in the electronics dept. they had 2GB Sandisk USB sticks on sale. $12.88 a piece. Cheap enough as far as I’m concerned so I bought one.

I had 2 purposes for buying the stick.

  1. It’s better than the 512MB I have (one can never have too much space).
  2. I wanted to try out a "full" Linux distribution booted off USB installed via UNetbootin.

Last week I tried this out with smaller distros, but now that I had a full 2GB at my disposal I could try the CD-sized distributions. So of course I installed Linux Mint "live" mode on the stick and gave it a go.

Here’s what I have to report:

Now that I’ve experienced what it’s like to run a CD-sized distro off a USB stick, I can honestly say that this beats the ever-lovin’ crap out of using an optical disc. It is faster and smoother all around in operation, and quiet. No annoying spin-up/spin-down noises whatsoever.

If given the option I will always use this method of booting a live Linux distro over using the disc. No question. I highly recommend that if your computer has the ability to boot off USB, are curious about Linux and hate running anything off the optical drive, use this method.

Side note about UNetbootin: If you’re asking "can I make my USB an emergency bootable repair tool?" Absolutely. It supports NTPasswd, FreeDOS, Smart Boot Manager and several others. Like I said, if you can boot off USB, use the stick instead. See the UNetbootin web site for details on that.

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.

Got The Newsletter?

Exclusive PCMech Content. Sign up and receive our free report: 20 Tips For Becoming a Technology Power User.

NAME:
EMAIL:

PCMech Highly Recommends...

The Hacker's Nightmare is a full 500+ pages of valuable content. It has plenty of diagrams and illustrations and is broken down into small sections with easy step-by-step procedures. This is what I like about this book. It is powerful information that everybody needs, but it doesn't read like a boring computer manual. LEARN MORE

Best of PCMech