Install Linux to Flash drive

Posted on 2006-06-05
Last Modified: 2008-02-01
I have a 2.0 GB flash drive and I want to be able to intall Linux (any distro) to is. Here is the catch though, I DO NOT want it is be a bootable CD type install where it still loads into the RAMDisk. I want the flashdrive to be treated as an actual harddrive with a swap partition and everything. Is this possible? Will it work on any Linux distro? How do I do it?
Question by:strickdd
    LVL 16

    Expert Comment


    I would recommend using damn small linux:
    LVL 19

    Expert Comment

    You may wish to try Damn Small Linux -

    I have that installed on a 128Mb stick and USB stick installs are a specific supported feature. It's a small distro, but has X, Firefox, and plenty of apps you can bolt on as MyDSL packages (just tar.gz's really). Depends what level of features you require. I'm pretty sure Knoppix also supports this, and has a far, far larger set of applications including OpenOffice. Unfortunately my company don't seem to want to anything bigger than 512Mb so I can't say I've tried it yet.

    Whilst the 2 mentioned are both traditionally "live" distros, they will happily install and live on other mediums in the traditional sense.
    LVL 28

    Author Comment

    The thing is I have tried installing DSL to a flashdrive and it would not recognize it as a valid harddrive. This was the same for Auditor as well. If seems that Linux cannot have a flashdrive act like a harddrive and run directly from it without the RAMDisk. Am I missing something with DSL that allows it to actually INSTALL to a flashdrive as if it was a harddrive?

    If the solution uses a RAMDisk, that is NOT what I want.
    LVL 34

    Expert Comment

    by:Duncan Roe
    At work we installed Slackware to flash drive to run as you say. I first installed to a normal HDD and cut it down to 64MB or so (no compilers, man pages or other doco but keep gdb and network tools like tcpdump traceroute &c.). Then copy it over (Knoppix / NFS or temporarily connect 2 CD drives - system normally has none). No swap - we had 512M RAM and a 512M flash.
    Flash not being recognised as a disk could be a problem. Is it configured as an IDE disk on the mobo? Have you tried booting Knoppix and looking for it with fdisk? (try fdisk /dev/hda, fdisk /dev/hdb, ... until you find it)
    LVL 20

    Accepted Solution

       " If the solution uses a RAMDisk, that is NOT what I want."  Then there's no solution for you !
        Pople often wants impossible.
        Keep in mind both Linux and Windows users boot from devices and not from busses, and technically speaking USB devices ( flash drives included) are only bus storage media accessible through SCSI emulation
    ( meaning that USB flash drive only acts as hard-disk even if its not )
         "...It seems that Linux cannot have a flashdrive act like a harddrive ."
        Neither Windows can.  USB flash memory , jump drive ,pen drive , keychan memory , diskonkey ( call it whatever you want) are considerred STORAGE only device and are not enumerated as hard-disks.
        "BIOS support for USB hard drives and USB CD-ROM must comply with the "Compaq Phoenix Intel BIOS Boot Specification version 1.01" as hard drives and CD-ROM drives on other buses do today.
          New requirements come from the USB Mass Storage Working Group which is currently working on a specification to standardize booting from USB storage devices called the "USB Mass Storage Specification for Bootability". At the time of this writing, this specification is currently at revision 0.8. Additionally, when it is published it will have an appendix that illustrates INT 13h support and should be followed.
    Additionally the USB Mass Storage Working Group has constricted the Control/Bulk/Interrupt (CBI) Transport to only apply to floppy disk drives. BIOSes should simplify their designs by supporting only the Bulk-Only Transport (BOT) as CBI can not be used for hard drives and CDs.
       Overview of Linux USB  ---->
       See also Microsoft's  "Recommendations for Booting Windows from USB Storage Devices  "
             "BIOS must support INT 13h During the boot process, Windows assumes that support for communicating with the boot device, either hard disk drive or CD-ROM drive, is present in INT 13h when Windows loads because the NT Loader uses calls to INT 13h to access the disk. INT 13h support must comply with the "BIOS Enhanced Disk Drive Services - 2" specification and the "USB Mass Storage Specification for Bootability," The newer specification is considered the authority if the two specifications contradict each other.
             Accurate drive numbering by BIOS Windows also requires that the assignment of drive numbers follows "Compaq Phoenix Intel BIOS Boot Specification version 1.01." Hard disk drives should begin numbering at 80h and CD-ROM drives should begin numbering at 82h, as in the past."
               Flash memory can only be flashed so many times before it doesn't work  anymore so USB jumpdrive
    as a media or block/hardware device that is accessed with buffering within the operating system is not exactly suitable for hosting Linux swap .

    good luck

    LVL 28

    Author Comment

    Thank you for your detailed input on this topic. I really had hoped that it would be possible, but I guess not. Is it possible to install Linux to an external harddrive?
    LVL 20

    Expert Comment

    Please read punkrawkpat's post in this thread :
    Also an excellent IBM Linux support WEb site :       

    LVL 28

    Author Comment

    Thanks for all the input once again!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
    The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
    Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
    This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now