# Linux on a USB Flash Drive

## cohesion

I just bought the last of the 256mb USB flash drives for $79 from Microcenter.

I had an interesting idea and I need your help filling in the holes:

The drive is fast. Fast enough to use as a root partition. So, I frequently go on computer-help visits to different people I know and there are some really great utilities at the standard Linux console that would be indespensible to have when troubleshooting a Windows problem like cfdisk, lspci, df, dd -- just access to /proc is useful.  USB flash disks are bootable. They appear as a SCSI hard drive to Linux. They can be partitioned and formated to any file system. Here is what I want to do:

Divide the drive in half. Make one half a bootable Linux partition with lots of useful command line utilities. Install grub as the bootloader. Put a FAT32 partition on the second half with things like Mozilla 1.3, JRE 1.4.1_02, and OpenOffice on it with some space left over for whatever I want to take back and forth.

I have figured out how to partition it; format it in FAT32 and reiserfs for the respective partitions; install the bootloader. I've confirmed that most modern computers can boot from it. Here's what I don't know:

What is the best way to get 128mb of the best of the Linux console in to that space? Should I start with a boot floppy distro and build up? What about building my own from a Slackware or Gentoo distro (compiling for i386 generic)? (If so, how can I build on my system and install to the flash drive?) Are there any bootable distros that you have a recommendation for?

Is there anything I've overlooked in my brainstorming?

How can I give grub access to the kernel when grub doesn't know how to access USB Storage? Once the kernel is loaded with usb-storage support, I should be okay.

Will any version of Windows have any trouble skipping over the reiserfs partition and hot mounting the FAT32 partition?

Here are the benefits of USB Storage over a bootable CD-RW:

It is fast and can opperate in systems that don't have a lot of memory to populate a root RAM disk with.

I can make changes to the configuration and reboot in the field.

I can quickly make modifications, enhancements and additions to the distro by simply mounting the Linux partition.

It's durable enough I can just have it with me wherever I go.

It's uber-geeky to whip Linux out of your pocket at a party.

the only disadvantage is that I only have 128mb as opposed to 700mb.

----------

## femtotech

Are you sure that you can boot from a USB flash drive?  I didn't see a "Boot from USB" option in my BIOS (Asus A7N8X Deluxe) so I assumed it couldn't.  It would be great if I could boot Linux from my 512MB Pen Drive.    :Very Happy: 

----------

## Ian

If this is indeed possible, I would love if someone could make something similar to Knoppix (although obviously much smaller) for various card sizes.  Then I'd be able to impress people all over the school!  :Razz: 

One thing that may help, if your BIOS doesn't support USB Boot...

A few weeks ago, I got a floppy disk from a friend.  It loads a boot manager, which allows you to go into the BIOS, shutdown, reboot, boot from floppy (yeah, kind of useless), boot from hard drive, or boot from cd-rom.  I believe it's from somewhere on sourceforge.net, but I can't say, as I got it from my friend.

Basically, if something like that exists, I would think to take that, and add in some sort of USB support shouldn't be too hard.  Then again, I don't know how it works, so it could be next to impossible.

This is definitly an interesting idea, but as femtotech said, I've yet to see a BIOS that supports "Boot from USB."  The other problem you may have is locked BIOSes, as it seems to have become the latest rage at my school, making the previously mentioned bootdisk so invaluble.  Plus, if I could get Linux to run on my compact flash card, it'd almost be worth it just to carry a floppy disk around, because it's not that much bigger.   :Smile: 

----------

## cohesion

I have an ASUS A7V133-C motherboard and it has a "boot from removable device" menu in which you can choose either:

LS-120

USB FDD

USB ZIP

Supposedly USB FDD and USB ZIP both work, but have to be configured on the Flash device differently. (This would be something I would have to research a little; see which of those opions is more commonly implemented. I haven't actually tried booting from this thing, yet. Though, I just did finish successfully repartitioning it and installing the grub bootloader to it. I'm not sure if this is all I have to do.

It's really hard to find info on this on Google because of all the online USB Flash device retailers pages that keep coming up in the search results.

----------

## reaz82

very very interesting project..

building gentoo on that usb will be hard.. 

not sure if you should use gentoo or slackware..

try building linux from scratch..

that's a distro.. it's very light (doesnt need 

the ebuilds that gentoo downloads > 200mb)

you are working in a tight environment.. so i assume

you will build on a pc and then copy to the key drive?

let us know how you progress..

good luck

----------

## OdinsDream

This is a great idea, and seeing as how I just came to be the owner of a 512mb flash disk, I'm very interested. A little digging on google turned up:

http://www.ncsu.edu/resnet/runt/

...which seems to be the most useful of the links. The distribution is based on ZipSlack, which is, not surprisingly, SlackWare designed to run from a Zip-100 drive. RUNT is designed to make use of an extra 28MB available on their target media, however, I'm sure it would be a simple matter to add more capabilities...

Booting is done via a floppy. Perhaps this can be modified.

----------

## searcher

I'm also working on this as i just bought a small usb keychain (64mb). After reading this i've been trying to get the gentoo boot cd on it. With a little tweaking you could install your own kernel, rip the hardware detection program from knoppix (it's open source and hopefully not too large) and i'd might even be able to run TinyX, a small X server. OpenOffice won't fit with me, but i should be able to put a few small editors on the stick, just for fun. 

I'd like to see more people bring in ideas about this, as having gentoo on a usb-stick would be very cool to flip out at lan parties  :Smile: 

----------

## Carlo

Be aware that flash ram is only capable of ~1.000.000 write accesses per sector, so it seems better to put /proc etc. in a ramdisk. 

Carlo

----------

## zuigzoen

cohesion have you made any progress?

This really is interesting and I'm curious about your progress, 'cause this could be very handy for a lot of us geeks.

----------

## sschlueter

 *cohesion wrote:*   

> The drive is fast. Fast enough to use as a root partition. So, I frequently go on computer-help visits to different people I know and there are some really great utilities at the standard Linux console that would be indespensible to have when troubleshooting a Windows problem like cfdisk, lspci, df, dd -- just access to /proc is useful.  USB flash disks are bootable. They appear as a SCSI hard drive to Linux. They can be partitioned and formated to any file system. Here is what I want to do:

 

Maybe this mini distribution is what you want... haven't used it though.

----------

## sschlueter

 *Carlo wrote:*   

> Be aware that flash ram is only capable of ~1.000.000 write accesses per sector, so it seems better to put /proc etc. in a ramdisk.Carlo

 

/proc is just a virtual file system... but otherwise you are right... something like /var/log/* (depending on the user's config) could kill the flash media soon.

----------

## klarnox

 *cohesion wrote:*   

> I have an ASUS A7V133-C motherboard and it has a "boot from removable device" menu in which you can choose either:
> 
> LS-120
> 
> USB FDD
> ...

 

My newest system supports booting from USB devices as well (Shuttle XPC SS51G).  Options include USB HDD, USB CDROM, USB Floppy.  I believe there are more, but I'm not at home to check at the moment.

----------

## jago25_98

I've also been trying to do this.

The problem I have is my bios doesn't support booting from USB.

So I need to make a bootdisk.

I thought getting a bootdisk to boot a USB root partition should be simple:-

- Install lilo/grub onto a floppy with support in the kernel for USB mass storage, as many varieties as possible, probably a 2.5 kernel. 

 Haven't got a computer of my own for a while but going to try just copying bzImage to a disk, hope it fits.

----------

## xlyz

 *cohesion wrote:*   

> What is the best way to get 128mb of the best of the Linux console in to that space? Should I start with a boot floppy distro and build up? What about building my own from a Slackware or Gentoo distro (compiling for i386 generic)? (If so, how can I build on my system and install to the flash drive?) Are there any bootable distros that you have a recommendation for?

 

u may want to check http://eaglelinux.w32.net/ to build a console liveCD (or liveUSB  :Wink: ) in 4 mb

latest release is based on debian, but can be easily adapted to be used with gentoo

they plan to release an X version in july

----------

## IntergalacticWalrus

Funny how this topic hits the GWN the exact same day I buy a Verbatim USB2.0 256MB Drive... The thing was expensive (maybe a bit too much for my budget) but it's so cool (in a geeky way) to have 256MB of storage on my keyring that I couldn't help myself...

----------

## onkelfusspilz

Great Idea!

I think about the way to arange the storage on the usb-drive. It seems that knoppix (http://www.knopper.net) which is actualy only available as a 700 MB boot image for cdroms, have a COMPRESSED file, containing the root-fs. This file is mounted, so it is direct accessable as "/" and deflating "on the fly".

My idea is to use a kind of image file, who is NOT read only! It would be great if it were possible to mount this compressed image as "/" and if something is written to the root-fs it is compressed into the image-file "on the fly"  :Wink: 

The main difference between a 256MB USB Stick and a cdrom to me, is that it is small, fast and that it is WRITABLE! So there must be way to use this witable capability to store user-related data (profiles...)

I'm dreaming of a knoppix-like image, with tinyX and kOffice, browser (phoenix?) and everything what I need on a 256 USB-Stick, with the ability to write my profile-data to the stick, too.

Does anyone know something about a filesystem, that is able to mount a compressed image for R/W? Is it possible?

Let me hear your ideas ...

----------

## sagipolley

There is another way to approach this. (Disclaimer--I am a big Gentoo fan, and run it myself. I'm just offering this information 'cause it might help someone.)

Knoppix-MiB Privacy Edition lets you boot from CD (like regular Knoppix), but also lets you use the USB stick as your home directory.

You can find it here:

http://www.bouissou.net/knoppix-mib/doc-html/Knoppix-Mib.html

----------

## led42

 *sschlueter wrote:*   

>  *Carlo wrote:*   Be aware that flash ram is only capable of ~1.000.000 write accesses per sector, so it seems better to put /proc etc. in a ramdisk.Carlo 
> 
> /proc is just a virtual file system... but otherwise you are right... something like /var/log/* (depending on the user's config) could kill the flash media soon.

 

worst if the filesystem is mounted with atime (default) every time a file is read it's access time is updated... so potencialy  some parts of the flash will fail pretty fast.

better to mount with noatime

----------

## ben_h

If your mainboard can boot from USB, and can handle USB to IDE, then Grub can see the USB drive.

For the record, I have a Gigabyte 8IEXP, and it boots from a USB device beautifully.

I got a USB2 Caddy to pop a laptop HDD into -- grabbed a 6 gig disk out of an old, bereaved laptop in my cupboard. Works really well, and writes at 7 to 8 MB/sec with echi-hcd modprobed.

Now, to get gentoo on it, I partitioned it up nice and simply --

-- /dev/sda1 = /boot (24MB)

-- /dev/sda2 = swap (192MB)

-- /dev/sda3 = / (1 gig)

That leaves me 5 gigs.

Now, mkfoofs and mount the appropriate partitions at /foo/bar (and then /foo/bar/boot, etcetera for whatever else you desire). But, you most probably don't want to compile on the USB device, for space reasons, and you definitely don't want to redownload all those tarballs. So,

```
cd /foo/bar

mkdir mnt/tarpit

mkdir mnt/compile

mount -o bind [your host system's DISTDIR path] mnt/tarpit

mount -o bind [your host system's PORTAGE_TMPDIR path] mnt/compile
```

Then, chroot into the new tree with

```
chroot /foo/bar /bin/bash
```

After that, just follow the install instructions from the appropriate point (that is, directly after the chroot command), but make sure you set

```
DISTDIR=/mnt/tarpit

PORTAGE_TMPDIR=/mnt/compile
```

in /etc/make.conf, once you've emerge sync'ed.

Make sure you compile scsi disk support and usb-storage support into the kernel proper, as well as uhci and ehci.

All this worked fantastically for me. However I ran into problems when I was booting the device -- the kernel gets to a stage where it should be mounting the root device and loading /sbin/init. However, because the usb-storage drivers take a good couple of seconds to initialise, they're too late for the kernel's root mounting attempt, and it panics.

A delay can be introduced, but this only worked for me if devfs was turned off. Obviously this isn't a solution, since gentoo dies at about the third init script if devfs isn't enabled.

However, it does narrow the problem to devfs -- and I haven't tried it with 2.4.21, so that might be something to do. (I only tried 2.4.20).

But, the moral of the story is that if this delay problem can be fixed, then there's no need to bollocks around with knoppix, ramdisks, and the like -- if the device is big enough and the computer supports USB booting, then a completely standard Gentoo install will work perfectly, provided the kernel has the necessary drivers compiled in.

----------

## TecHunter

 *cohesion wrote:*   

> I have an ASUS A7V133-C motherboard and it has a "boot from removable device" menu in which you can choose either:
> 
> LS-120
> 
> USB FDD
> ...

 my mb is AUSU a7v266-ex,but i cant find USB boot options  :Sad:   :Sad:   :Sad:   :Sad: 

----------

## macval

I suggest see http://openfacts.berlios.de/index-en.phtml?title=Linux_bootable_USB_key_HOWTO

One can indicate the USB key where it works ( I wants to buy one  :Wink: 

Regards.

----------

## bakey

There are a few distros that are setup for usb key.

flonix http://linuxdocs.tuxfamily.org/flonix/index.php and stixx http://www.stixx.org/

Flonix has a 64meg version and it is based off of Knoppix.

I would like to make a few versions of gentoo on usb key.

Flonix is using a fat filesystem and syslinux to make the usb key bootable.

They have an init ramdisk that has etc and stuff (2meg).

It boots with a good sized ram disk and the knoppix system is cut down from the cd one but it has enough to bring up x and has some basic utils and office apps. The knoppix file system is using cloop instead of cramfs which allows you to break the 16meg file and 256meg filesystem limits. It looks like you get a three to one compression ratio with cloop. So you can fit a lot of apps in a small space. It should be easy to convert the gentoo install cd's and maybe cut down the livecd to fit a 256meg usb key. As soon as I free up a machine I'm going to start work on the basic install cd.

----------

## gringo

Yes, a great job was done with flonix. Have tried it and it´s very impressive !

But i will try to do something like this but based on gentoo. Have already tried to optimize / cut down a knoppix live-cd to fit in the 128 megs pen, without success. Which size should have the tree before compressing ??  More or less 300 / 400 megs i suppose...

I think we should try with "light" apps like tinyx with *box, dietlibc and so on. Will give it a try this weekend... will also try with a 2.6.x kernel without the cloop utility. Let´s see....

Have you tried building with catalyst ??

http://www.gentoo.org/proj/en/releng/catalyst/

regards

----------

## barnabe

 *ben_h wrote:*   

> All this worked fantastically for me. However I ran into problems when I was booting the device -- the kernel gets to a stage where it should be mounting the root device and loading /sbin/init. However, because the usb-storage drivers take a good couple of seconds to initialise, they're too late for the kernel's root mounting attempt, and it panics.
> 
> A delay can be introduced, but this only worked for me if devfs was turned off. Obviously this isn't a solution, since gentoo dies at about the third init script if devfs isn't enabled.
> 
> However, it does narrow the problem to devfs -- and I haven't tried it with 2.4.21, so that might be something to do. (I only tried 2.4.20).
> ...

 

I'm having the exact same problem, with 2.4.22-gentoo-r5. I'm even able to boot from USB as my motherboard permits it, although very slowly, but as soon as the kernel tries to mount the root partition it panics. When booting on another, non-USB disk everything is fine and I can work with the USB disk. Do you know if there's any progress? Thx.

----------

## brncmp

This is great idea.  I have been using damn small linux since my hard drive craped out in my nootbook and i would love to use my cdrom again.

How hard would it be  to port opie or Open Zarurs to a pc.  I think sysLinux could be used as the boot loader.

----------

## trapperjohn

It is already possible, to use Qt/Embedded on x86 platforms - see http://www.trolltech.com/products/embedded/platforms.html?cid=5

----------

## gzY^

on a usb-flash-disk of 512 mb i think you would get xfree and maybe kde but on a 256 you would only get shell but that's not a problem  :Very Happy:  i love to work in shell.

----------

## TaLi

so how is this going? anyone get anywhere... Im curious because I have a 256 flash drive also and am lookin for something todo in between irc whoring

----------

## lighty14

This would be nice, as I hate using knoppix at school (so slow). I might look into flonix but I'd like to have more apps on it, but i <3 fluxbox  :Very Happy: .... once I get a 256MB flash drive, I might do some experimentation with this.

----------

## guard0

 *ben_h wrote:*   

> Now, mkfoofs and mount the appropriate partitions at /foo/bar (and then /foo/bar/boot, etcetera for whatever else you desire). But, you most probably don't want to compile on the USB device, for space reasons, and you definitely don't want to redownload all those tarballs. So,
> 
> ```
> cd /foo/bar
> 
> ...

 

when using a USB key, figure out the right cflags and USE flags(optimized for size, rather than speed..) and just mount /usr/portage and /usr/tmp/portage on a harddrive that would be used just to build that system..

move /var/log to that hard drive as well, possibly, or mount them in a small (4 meg?) ramdrive so that it gets wiped everytime the system boots..

i wonder if there is an extremely stipped down version of lilo or grub, which just has the basics, no need for framebuffer images or anything like that really..

and you could get an alternative xserver, one that is lite.. get icewm or some small window manager.. then build binary versions of software to throw on there (emerge --buildpkg, emerge -k package)

----------

## raylpc

Damn Small Linux and Puppy Linux are two super light distros < 50 MB. And they all come with X and wm. One plus is they load all the stuff from the flash drive to a 50MB ramdisk, so it's very very fast.

----------

## guard0

yeah, what's the fun in that tho?

i wanna see gentoo on a keychain.. possibly even a livecd or something booting from a keychain for restores and system builds..

----------

## timfreeman

Have you seen these threads?

https://forums.gentoo.org/viewtopic.php?t=57754

https://forums.gentoo.org/viewtopic.php?p=591401

I'm attempting a gentoo install at the moment...

----------

## lblblb

 *gringo wrote:*   

> Yes, a great job was done with flonix. Have tried it and it´s very impressive !
> 
> 

 

Do you still have the download for flonix, as they have removed the downloads and apparently are going commercial now. :-/ (btw, the old homepage is gone, flonix resides at 

www.flonix.com now.

If anyone does have it, please let me know -- lbryson\\AT//coldhardtruth\\DOT\\org

----------

## lblblb

the guy that did Stixx (the ZipSlack on usb device) distro wrote a bootdisk how-to at http://www.stixx.org/testi/bootdisk_howto.txt  Not sure that's useful to you.

Or did you already get your usb-flash bootable gentoo working?

Flonix used syslinux to handle its booting, according to this  rather incomplete how-to.

In case it's useful to other people trying to get a bootable flash distro working, the slightly fixed google translation of the stixx bootdisk_howto is this:

```

Scompatto zipslack in the device.

For the moment I make the boot with mine bootdisk (see download/bootdisk.img)

I create an initrd file of 300k (boot image file, I believe -- lb):

dd if=/dev/zero of=initrd bs=300k count=1

Then format it (the boot image -- lb) to ext2:  

mke2fs -F - m0 initrd

I mount in loop device (not sure if there should be a space before the 'o' --lb):  

mount -t ext2 - o loop initrd /mnt

cd to /mnt and I create the directory structure:  

cd /mnt; mkdir bin dev lib

I create in root (/) the file 'linuxrc' with the following content, making it eseguibile (writeable?? --lb):  

<---- CUT HERE ---->

#!/bin/lash

echo "Loading usbcore module"

insmod /lib/usbcore.o

echo "Loading usb-uhci module"

insmod /lib/usb-uhci.o

echo "Loading usb-ohci module"

insmod /lib/usb-ohci.o

echo "Loading usb-storage module"

insmod /lib/usb-storage.o

echo "Wait 5 to initializing a drive"

sleep 5

<---- CUT HERE ---->

I create the console device (from within / --lb):  

mknod dev/console c 5 1

I copy the modules in lib:

usbcore.o

usb-uhci.o

usb-ohci.o

usb-storage.o

I copy the binary of busybox (patched) and compiled with uClibc (see download/boot/busybox) in /bin and I create following link:

ln -s busybox echo

ln -s busybox insmod

ln -s busybox lash

ln -s busybox sleep

I take apart (translated from smonto?? --lb) the image and zip it:  

gzip -9 initrd

I create the boot diskette:

fdformat /dev/fd0

mkdosfs -n STIXX -c /dev/fd0

syslinux /dev/fd0

I copy to the diskette:

vmlinuz 

initrd.gz

syslinux.cfg

message.txt

F1.txt

These are mine:  

syslinux.cfg:

<---- CUT HERE ---->

default vmlinuz initrd=initrd.gz root=/dev/sda1 vga=normal rw SLACK_KERNEL=bare.i 

prompt 1

timeout 1200

display message.txt

F1 f1.txt

F2 message.txt

#

label ramdisk

  kernel vmlinuz

  append vmlinuz ramdisk_size=7000 root=/dev/fd0u1440 vga=normal rw SLACK_KERNEL=bare.i

#

label mount

  kernel vmlinuz

  append ramdisk_size=7000 ro SLACK_KERNEL=bare.i

#

label usb

  kernel vmlinuz

  append initrd=initrd.gz root=/dev/sda1 vga=normal rw SLACK_KERNEL=bare.i

<---- CUT HERE ---->

message.txt:

<---- CUT HERE ---->

.0C

                        88

                  ,d    ""

                  88

      ,adPPYba, MM88MMM 88 8b,     ,d8 8b,     ,d8

      I8[    ""   88    88  `Y8, ,8P'   `Y8, ,8P'   ,--()

 ()-- `"Y8ba,     88    88    )888(       )888( ---'-.-------|>

      aa    ]8I   88,   88  ,d8" "8b,   ,d8" "8b,     `--[]

      `"YbbdP"'   "Y888 88 8P'     `Y8 8P'     `Y8.07

  To boot into the default USB device (/dev/sda1) just hit ENTER 

                         Hit F1 for help

           Log in as root, and change your password.

        Take a look at swapfile.txt to extend the swap space.

                           Have fun :^)

<---- CUT HERE ---->

F1.txt:

<---- CUT HERE ---->

To boot the default device (/dev/sda1) just hit ENTER.  

This is another example, like an USB Zip drive:

  usb root=/dev/sda4 rw

If you want to boot from an IDE hard drive or IDE zip drive, try this:

  mount root=/dev/hda1 rw

  mount root=/dev/hdb4 rw

<---- CUT HERE ---->

After booting, I modify:  

/etc/rc.d/rc.local

<---- CUT HERE ---->

#!/bin/sh

#

# /etc/rc.d/rc.local:  Local system initialization script.

#

# Put any local setup commands in here:

if [ -r /tmp/nic ]; then

  cat /tmp/nic

elif [ -r /var/lib/pcmcia/stab ]; then

  cat /var/lib/pcmcia/stab

else

  echo "NO CARD FOUND!"

fi

echo "Log in as root and remember to change your password"

<---- CUT HERE ---->

/etc/rc.d/rc.netdevice

<---- CUT HERE ---->

#!/bin/sh

echo "Probing for Network Cards"

rm -f /tmp/nic

    for card in 3c59x acenic de4x5 dgrs eepro100 epic100 hp100 lance \

    ne2k-pci olympic pcnet32 rcpci rtl8139 8139too 8139cp sktr tulip via-rhine \

    yellowfin natsemi ; do

      /sbin/modprobe $card 2> /dev/null

      if [ $? = 0 ]; then

        echo "A networking card using the $card.o module has been detected." > /tmp/nic

        echo "$card" > /cardfound

        break;

      fi

     done

     if [ ! -r /cardfound ]; then

         for card in depca ibmtr 3c501 3c503 3c505 3c507 3c509 3c515 ac3200 \

         acenic at1700 cosa cs89x0 de4x5 de600 \

         de620 e2100 eepro eexpress es3210 eth16i ewrk3 fmv18x hostess_sv11 \

         hp-plus hp lne390 ne3210 ni5010 ni52 ni65 sb1000 sealevel smc-ultra \

         smc-ultra32 smc9194 wd ; do

         /sbin/modprobe $card 2> /dev/null

         if [ $? = 0 ]; then

           echo "A networking card using the $card.o module has been detected." > /tmp/nic

#          echo "$card" > /cardfound

           break

         fi

       done

     fi

#    if [ ! -r /cardfound ]; then

#      echo "NO CARD DETECTED" > /tmp/nic

#    fi

rm -f /cardfound

<---- CUT HERE ---->

/etc/lilo.conf

<---- CUT HERE ---->

# LILO configuration file

# generated by 'liloconfig'

#

# Start LILO global section

lba32 # Allow booting past 1024th cylinder with a recent BIOS

boot = /dev/sda

disk = /dev/sda

   bios = 0x80

message = /boot/boot_message.txt

prompt

timeout = 1200

# Override dangerous defaults that rewrite the partition table:

#change-rules

#reset

# Normal VGA console

vga = normal

# VESA framebuffer console @ 1024x768x64k

# vga=791

# VESA framebuffer console @ 1024x768x32k

# vga=790

# VESA framebuffer console @ 1024x768x256

# vga=773

# VESA framebuffer console @ 800x600x64k

# vga=788

# VESA framebuffer console @ 800x600x32k

# vga=787

# VESA framebuffer console @ 800x600x256

# vga=771

# VESA framebuffer console @ 640x480x64k

# vga=785

# VESA framebuffer console @ 640x480x32k

# vga=784

# VESA framebuffer console @ 640x480x256

# vga=769

# End LILO global section

# Linux bootable partition config begins

image = /boot/vmlinuz

initrd = /boot/initrd.gz

root = /dev/sda1

label = stixx

read-write

# Linux bootable partition config ends

<---- CUT HERE ---->

/boot/boot_message.txt

<---- CUT HERE ---->

Welcome to the LILO Boot Loader!

Please enter the name of the partition you would like to boot

at the prompt below.  The choices are:

stixx - stick linux!

<---- CUT HERE ---->

I copy vmlinuz to /boot and I can give 'lilo -v'.

Finally to the riavvio, if the bios supports the booting from Usb-hdd Usb-zip, it posts and and there you have it!

(best translation I could do in a short while, with google. see original doc at http://www.stixx.org/testi/bootdisk_howto.txt . I'd love to see a detailed natively English how-to for booting to linux from a usb-flash device. Any pointers?)
```

----------

## mundri

Hello every body .....i was searching about my solution on net .........so i get here

  well ....... isnt it believeable ....ihave done it ........but   :Sad: 

   actually ....... i got my usb partitioned ..put my os on it ........but it wont let me boot 

   but when i do the same without partitions ... it works ..........

 :Idea:  now i have a solution .............. if any one thinks that it would help us in any case 

    ........

  How do i be able to put any bootloader...as lilo on MBR of flash and direct it to get the   

  kernel from first patitions ...........

          Only help me about this bootloader and i will be able to do this ........

----------

## boglin

Just a bump to let you know that I've put a lite-gentoo on my USB 512MB stick, and I recorded what I did. There's a quasi-HOWTO at http://gentoo-wiki.com/HOWTO_Small_Footprint_Gentoo_on_USB

I didn't do anything cool like /proc on a RAM-disk or creating the root filesystem in a cloop - but it works. If anyone knows how to do these things, please update the wiki page, or email me if you are allergic to wiki-markup  :Smile: 

----------

## greap

Have you looked at the "Damn Small Linux" distribution?

http://www.damnsmalllinux.org/ - 50Mb Distro

----------

## panphage

This is probably the coolest idea I have ever heard. I'm working on a "remaster" of Jollix  (english page, main page auf Deutsch) to fit onto my 512MB Cruzer Titanium. Kind of a pain in the rear, maybe I did something wrong but I've had to re-emerge all the programs as the livecd doesn't seem to have a portage tree or any of the records portage makes of installed programs. Ugh.

Jollix is a gentoo-based remaster of knoppix using knoppix hardware detection and cloop (but I think it uses gcloop.) It's multi-media oriented so I'll be cutting a lot out (KDE). I'm thinking more of a portable rescue toolkit with dev tools, and perhaps a smidgen of the intrusion detection/prevention of Whoppix.

----------

## kaziya

 *cohesion wrote:*   

> I have an ASUS A7V133-C motherboard and it has a "boot from removable device" menu in which you can choose either:
> 
> LS-120
> 
> USB FDD
> ...

 

well im still a bit of a newbie with linux and gentoo but with boot options

it depends on your system one of my systems the boot option for booting from a usbkey doesnt showup unless u boot with the key pluged in

and from what ive seen usb fdd(or floppy disk drive) doesnt work on booting to a usb key, usb zip is for old 100 meg zipdrives(probly why it works, a lot more storage then the 1.44meg floppy)

i my self cause of the space issue and im planing the idea of pocket desktop i got a usb 2.0 enclosure and 20gig laptop hdd (75 canadian on ebay) compaired to nearly a 100 or more for 256-512mb usb keys,

and way more space and planning on installing gentoo on that as ben_h

did.

i also found out from a friend of mine who know a lot more about linux then ill ever know he was saying that 2.4 kernals lack support for usb so building and useing a 2.6 kernal would be ideal for a project like this for usb support. 

tho i only recived my laptop drive and enclosure the other day i will be working on this project soon and ill post my findings.

kaziya

----------

## panphage

 *kaziya wrote:*   

> 
> 
> i also found out from a friend of mine who know a lot more about linux then ill ever know he was saying that 2.4 kernals lack support for usb so building and useing a 2.6 kernal would be ideal for a project like this for usb support. 
> 
> 

 

Well it sounds like you won't have that much work to do to surpass your friend then since linux has had usb support since kernel 2.2. USB 2.0 support is new, but guess what? USB 2.0 itself is pretty new.

----------

## kaziya

i didnt meen it didnt have support just not as much,  the 2.6 kernel gives greater support and more functionality to usb and more usb devices work with a 2.6 kernel

----------

## panphage

Ah, I thought your friend was taking you for a ride. I guess I don't do anything hardcore over usb, just a zip drive and printer, keyboard, mouse, usbstick, but I didn't have any trouble using those with 2.4.

----------

## nerdsunitedfilms

hey, this sounds real good. i have a creative micro, that has a 5 gig hardrive, and it has a removeable drive mode, so if i could get dsl or something on it, it would boot real well. im a windows guy though, just starting to learn about linux. would puting the iso on the drive work? cause if i could get dsl or anything small linux running like knoppix would , that would be so cool. thanks for any advice.

----------

## nerdsunitedfilms

please anyone

----------

## nerdsunitedfilms

 :Question:   :Question:   :Question:   :Question: 

----------

## Swoosh

No, you can't just copy the iso over.

Burn the latest dsl iso onto a CD.

After booting from it you can install it onto the usb drive.

Also make sure that your BIOS supports booting from USB devices.

----------

## nerdsunitedfilms

thanks man, ill try that and report back.

----------

## oddjobz

Hi,

Have you tried Flash Linux ?

(Gentoo distro designed to run on 256Mb memory keys?)

http://encryptec.net/

GPL/Free etc etc ..

Comes as a Live CD with a CD -> Key transfer script ...

----------

## silverpig

 *oddjobz wrote:*   

> Hi,
> 
> Have you tried Flash Linux ?
> 
> (Gentoo distro designed to run on 256Mb memory keys?)
> ...

 

Wow. This looks amazing. I'm going to try it  :Smile: 

----------

## Cintra

Tried it today from CD.. its amazing what you can squeeze into 115MB! 

The snag for me is there is (as yet?) no adsl-setup, so I couldn't do a lot with it other than click on everything & familiarize myself with Gnome (no comment...)

mvh

Btw, the iso is 334MB..

----------

## oddjobz

Well ..

If you have an ADSL router - it should all work .. (!)

If you have an internal ADSL card .. if you can supply details then it might be possible to incorporate, however testing is difficult as there are many card types and configurations ...

----------

## Cintra

Hei oddjobz

No adsl router I'm afraid  :Sad: 

I simply have the usual Broadcom Gigabit on-board netcard with an rj-45 cable to the Telenor provided Speedtouch 510i 'modem'  & splitter to my previous isdn wall contact. No sweat at all setting up on Gentoo using pppoe & adsl-setup..

regards

----------

## oddjobz

Ok ..

So the kernel modules required are ?

(standard or additional , in either case - which ?)

And the user tools required are ?

(I'm guessing the included Gnome-PPP will do the job once the correct kernel modules are included) 

??

I can't see any modules or options for ADSL in the stock kernel .. ??

----------

## oddjobz

Ok, ignore me - found it.

There's now a speedtouch download in the SF files area. 

Let me know if you get it working ..  :Smile: 

Additional instructions for this package;

 *Quote:*   

> * Read and subscribe vendor's licence to download the microcode
> 
>  * You can get it from:
> 
>  *   1) vendor's site: http://www.speedtouchdsl.com/dvrreg_lx.htm
> ...

 

----------

## Cintra

All seems rather complicated oddjobz 

Is the microcode download to upgrade my 'modem' or what? If it is, then I'm not too interested in doing that, as things are working fine on Gentoo.

Thanks anyway for the Speedtouch site info tho', I learnt more there about my 510i device.

regards

----------

## oddjobz

Hey,

Don't look at me, this is a product specific issue.

(i.e. speedtouch .. which incidentally is made by "Thompson" afaik)

I use (and always recommend) a router !!!

----------

## A.S. Pushkin

I think "LinuxFormat" magazine included one as you describe.

I have not tried it, but it might be nice when traveling?

I did try MandrakeMove which was on the dvd version, but on my machine

X isd a problem due to my SGI 1600SW. IT was nice to pop a cdrom intoa machine a run linux with minmal config. One caveat, that version with the magaizne could not save any configuration.

Try the November, 2004 issue.

----------

## A.S. Pushkin

I've not tried it, but the November 2003 issue of "LinuxFormat" DVD included RUNT (  (ResNet USB Network Tester) along with Gentoo 1.4.

The versiom included  zipped file about 49Mb with a boot image (1.4).

It is not Gentoo, but is claimed to fit a 128Mb flash drive.(Slackware)

http://www.ncsu.edu/resnet/runt/

----------

## Cintra

 *oddjobz wrote:*   

> Ok ..
> 
> So the kernel modules required are ?
> 
> (standard or additional , in either case - which ?)
> ...

 

net-dialup/rp-pppoe

A user-mode PPPoE client and server suite for Linux

http://www.roaringpenguin.com/

This includes adsl-setup

mvh

----------

## Xyster

I was reading this last night and I thought it would be really cool to have an x86 part and a PPC part to boot either PC or Mac into Gentoo. Has anyone done this or would anyone have some advice to go about doing this? Thanks

----------

## opentaka

it will be great if the gentoo's live install cd mini can run from the usb stick cause its about 50megs right?

can it be?

----------

## opentaka

oh well i missed the spot on https://forums.gentoo.org/viewtopic.php?t=57754

sori

----------

## Drunkula

Such a great concept.  I have already booted from flash drives.  Too bad the older mobo's don't support that feature.  And to think I just saw a 2 Gig flashdrive at newegg for about $140.  Great deal!  Just wish I had a little extra cash at this time...  :Crying or Very sad: 

----------

## opentaka

128MB is enough for me  :Very Happy: 

 costs less then 30 bucks 

2yrs ago i bought 128MB MMC card which cost abt 99 SGD... which i shouldnt done T_T

----------

## knopper

Maybe this is an option: http://knopperdisk.knopper.tk

It's a little project of myself and I could use a whole lot of feedback from other people to improve it.

----------

## opentaka

wow that sounds intresting, 

i gonna try out that:D

----------

## maccam94

What about installing it on a 20gb+ iPod? Then boot it as a usb drive on a comp?

----------

## linuxboxking

Hey check out this site www.linuxonastik.com I just bought a 2GB Stick with what looks like a modified Knoppix preinstalled.

Boots on my PC no prob!

----------

## sven_sol

Ahh... old threads reborn   :Very Happy: 

Think everything you could want can be found here:

http://flashlinux.org.uk/

Gentoo Based, saw the guy who made this at last years Gentoo UK Conference in Salford.  very good distro, very useful!  include guides on how,what and why.

 *Quote:*   

> Splash based boot system
> 
> Hardware autodetection
> 
> GDM based login manager
> ...

 

----------

## Ast0r

There is a Gentoo-based Linux Rescue CD which comes with instructions on how to create a bootable USB drive. Download the ISO, mount it, read the docs, copy the files to the USB drive, and profit. It took me about 10 minutes to set it up.

http://www.sysresccd.org/Main_Page

----------

## linuxnoob2005

I found a site selling linux pre-installed to boot up. This one's using the small 50 MB linux distro called Insert that can bypass admin passwords, run virus scans, and just boot up and run snappy. I'm a big fan of Insert  and use it on a CD, but haven't tried it from USB.

I think I might order one cuz I couldn't get it installed on USB. This company claims to have figured it out, but the site looks a little ghetto. Wish they had a phone number or address. Oh well, maybe I'll see if they'll answer an email at least. Your thoughts on the credibility of the site?

Anyway, here it is http://linuxusb.nfshost.com/

----------

## linuxtuxhellsinki

You can also download UltimateBootCD (UBCD) where Insert is installed, but it might be older version and it's CD. And almost all computers boot from CD but only few from USB, so it'd be better to have creditcard-CD in my opinion  :Confused: 

----------

