I like to modify my stance in Post #8 because I am booting a Ubuntu 7.10 by a USB flash drive and it works OK. The response isn't too bad at all and much better than I have anticipated.
What I did was to take the fastest flash drive I had which is a 4Gb Peak pen drive list in Post #8, with a write speed 31.32 MB/s.
I have an internal hard disk sda and the flash drive is read as sdb after I booted up a Ubuntu installable Live CD.
Like in all installations I prefer to have the partitions ready and here is my partition scheme
saikee@saikee-desktop:~$ fdisk -l
Disk /dev/sdb: 4160 MB, 4160225280 bytes
128 heads, 62 sectors/track, 1023 cylinders
Units = cylinders of 7936 * 512 = 4063232 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 246 976097 6 FAT16
/dev/sdb2 247 861 2440320 83 Linux
/dev/sdb3 862 1023 642816 82 Linux swap / Solaris
I therefore have 1Gb fat partition in sdb1. sdb2 is 2.5Gb large and the remainder as a swap. The partitions were created with Ubuntu CD using terminal command "cfdisk /dev/sdb". Partitions created in Linux is automatically Type 83. The cfdisk program has a facility to alter partition ID for swap (Type 82) and I needed a Fat16 partition (Type 6) for other purpose. Because a fat partition has been created I needed a reboot to finalise the partition table.
At the next reboot I booted back to the CD and just clicked the installer in the desktop to start the installation process.
When it came to partitioning I chose the last choice which is "manually".
Inside I just highlighted the sdb2, click edit, use it as Ext2 (avoiding the files journalling) and type / for the mount point. The installer will then install Ubuntu into sdb2. This steps tells the installer I want a single partition to store the Ubuntu in sdb2, format it in Ext2 filing system and use it to mount the root "/" of Ubuntu.
When it came to the the location of the boot loader it was either sda or sdb. I select sdb. This mean the MBR of the flash drive.
I didn't record the time it took but it was pretty quick, possibly 15 to 20 minutes because the wife was dragging me out to the movies. I was just able to finish the installation before going out.
When I came back I powered up the PC, removed the CD and told the Bios that I wanted the flash drive to be the first boot disk, which I did not expect it to work. This is because sdb was the 2nd disk when I installed Ubuntu inside so I must correct the Grub configuration file menu.lst. Grub is easy to work because a user can edit the configuration during the booting stage.
When the Grub in the MBR of the flash drive booted up I select the first choice of Ubuntu but instead pressing the return key I pressed "e" so that I could edit the Grub command.
Like I expected the root statement of Grub was
indicating the Ubuntu was installed in the 2nd partition of the 2nd disk, as Grub counts everything from 0. To boot Ubuntu correctly now in the 1st boot disk I must correct the root statement to (hd0,1). I therefore highlighted the root statement and press "e" for edit and carried out the change.
Ubuntu now uses a by-uuid method to call the partition sdb2 and there no need for me to intervene because the by-uuid name is unique.
Now the booting instructions are correct I therefore pressed "b" for booting and the Ubuntu fired up like a clockwork for the first time.
Once operational I edit the /boot/grub/menu.lst to make the change permanent, as changes in the boot screen is not kept. My /boot/grub/menu.lst now looks like this
title Ubuntu, kernel 2.6.22-9-generic
kernel /boot/vmlinuz-2.6.22-9-generic root=UUID=f8d117b0-6979-41a0-b29d-c418cd7a644e ro quiet splash
I removed other lines that are of no interest to me. In the above the red
bit is the only editing I did. The blue
bit is the by-uuid method of addressing a partition. If a user experiences a booting problem after installing Ubuntu Linux into a flash drive it is normally down to not correcting the red
In conclusion one can install Ubuntu into a flash drive in exactly the manner as installing into a partition of an internal hard disk. The distro does take longer to boot but everything is no different to that in an internal hard disk.