So here goes...
You need :
- A linux box, with sources, gcc & binutils.
- ExtLinux bootloader.
- A USB pen drive (also called USB stick, USB key, USB etc etc).
Also, this means that we need to specially customize the kernel for the target hardware on which the USB installation will be used. So we have all the necessary support without increasing the kernel image size.
The USB drive needs to be partitioned and formatted as an ext3 partition. I created a single bootable ext3 partition.
Next is to install extlinux on the USB device. Extlinux is a bootloader that can boot linux of an ext2/3 partition. The steps to do this are in the syslinux site.
Once this is done, copy the bzImage and the initrd file to the boot directory on the USB drive and also create the extlinux.conf file. The initrd file gets created in /boot directory of the linux box when 'make install' is run. Once can choose to create their own initrd too.
I extracted the initrd and then copied the directories created onto the USB drive. This had the directories bin, lib, proc, root, sbin, sys, tmp and a init shell script. Linux needs an init (or a linuxrc) which it executes as the first process.
Now that the files are copied, reboot the box and get it to boot from the USB disk. :-).
Busybox can be used instead of the various individual binaries. Busybox is a lightweight console app that provides for the various binaries needed on Linux.
Next experiment: get X server & Window Maker on the USB drive.