Home
BYTE Newsletter
Keep up with all the BYTE News and Reviews

Subscribe

How To Run Linux From A USB Flash Drive

Comments | Serdar Yegulalp, InformationWeek | May 20, 2008 11:10 AM


Which Flash Drive?

Flash drives may all seem alike from the outside, but believe me, they're not -- the differences in speeds between any two drives can be startling. What's even more frustrating is that up until very recently there wasn't much word from the manufacturers about the relative speeds of different flash drives.

Thankfully, this has changed, and drive manufacturers are getting savvier about including speed statistics with their drives. A drive that's rated for "100x" speed or higher should work nicely, and most any drive that claims support for Vista's ReadyBoost feature should also work.

One thing that most manufactures have not made terribly clear is the drive's performance with regard to sequential vs. random access. You might think there shouldn't be a difference -- after all, the whole idea with a flash drive is that every byte on the drive has the same access time, right? Not true. Sometimes the manufacturer will mix memory speeds as a cost-saving measure, using a small block of fast flash memory in conjunction with a large block of slower memory. This means heavy variations in performance depending on what's actually being done on the drive. To that end, you might see major differences in performance between two drives that have identical or near-identical manufacturer's ratings.




DamnSmallLinux's "pen drive" installer.
(click for image gallery)

Another interesting thing to note is that flash drives aren't the only removable media that may work -- compact flash cards or digital cameras and music players that can mount as mass storage devices will also work. Again, whether or not Linux or your PC will support booting and running from such a device will depend on how the device advertises itself to the computer, and whether or not the Linux distribution you're using has drivers set up to handle it. Puppy, for instance, can boot from compact flash cards and even has an installer option to specifically allow it.

Enable USB Boot Support

Most computers shipped within the last couple of years will support booting from a USB device. That said, this isn't always enabled by default, and it isn't always enabled for all USB ports on the system.

One of the first places to look for information about USB boot support, apart from the manufacturer's own specifications, is the system BIOS. In my own Dell XPS, for instance, the default USB handling option is to enable booting from attached USB devices -- but I need to press F12 at boot time to select something other than the default boot device, normally the hard drive.

Another important thing is that some of the USB ports in the XPS can be manually disabled from being polled for boot devices. This is done so that you can attach an external USB drive (whether flash or an actual hard drive), and leave it attached between reboots without worrying about it hijacking the computer's boot sequence.

The folks at the PenDriveLinux Web site -- a fantastic resource for all things related to running Linux on USB -- have a quick way to test USB boot support on a given USB drive and computer. They use the SysLinux utility to make the drive bootable and add a copy of Memtest86+ a quick way to see if boot support works. Note that if you're doing this on Vista, open an admin command prompt to run the makeboot.bat file or it won't work.

SysLinux is used widely to make flash drives bootable for Linux distributions, so it's a tool that we'll be coming back to. Note that if you get a "boot error" or other error message when you try to boot a drive processed with SysLinux, you may need to run the DISKPART CLEAN command on the disk (again, from an admin command line) to remove any previous master boot record information, reformat the drive, and then try again.



Related Reading


More Insights




Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

BYTE encourages readers to engage in spirited, healthy debate, including taking us to task. However, BYTE moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing/SPAM. BYTE further reserves the right to disable the profile of any commenter participating in said activities.

COMMENTS

Tune In to BYTE
Facebook Twitter LinkedIn Newsletter RSS
Whitepapers
whitepaper
In this paper you will learn the five trends shaping the future of enterprise mobility. Learn how the rise of social media as a business application, the lurring between work and home, the emergence of new mobile devices, the demand for tech savvy employees and changing expectations of corporate IT will fundamentally change the workplace.
whitepaper
In a survey of more than 1,700 information workers (iWorkers) in North America, notebooks, desktops, and smartphones were found to be “must-have” devices, while tablets, slates, and netbooks were relegated to “nice-to-have” status, according to a commissioned study conducted by Forrester Consulting on behalf of Dell and Intel.
Sponsored by: Dell
Upcoming Events