Booting Linux off USB pendrives
When booting of USB media, I would be careful of the following:
- Swap, unless you need it, save the writes of the flash
- Keep the filesystem slim, turn off SELinux/AppArmour unless you need it
- Tune the journaling and cache settings to get better performance
I have a USB key that I use to boot all my systems, it contains the kernel and bootloader with configurations for machine. I also keep the encryption keys for my hard-disks on it.
I've heard some people have concerns about write-cycles with USB pendrives and most of the Linux filesystems, like ext3 which is setup to update the disk whenever a file is accessed. This can cause a lot of writing specifically in the same area of the drive. Usually it is recommended to use the noatime
option in order to fix this.
I created a USB drive linux for a team of robots - I used Debian which was selected because it was very easy to put it in a small space and I am familiar with it already. We've been running them for a while now and there has been no corruption so far. Even if there is corruption, as long as you have backups (we mirror to another drive of the same size periodically) you should be okay and it's not exactly expensive to replace.
I generally don't partition my USB drives because I find it creates hassles. If I want a reasonable filesystem (with permissions, caps sensitivity, etc) on a windows-accessible drive I create a loop file to use.
I only have answers for the last 3 questions (I don't have professional experience with booting from flash drives).
Someone else mentioned that there are concerns about write cycles on flash drives. I've heard it be somewhere in the area of 100,000 writes and 500,000 writes. It's probably the latter. The problem with using ext4 or ext3 is that they're journaling filesystems. This means that the data is transferred to the storage device, stored there and then written to the proper place on the storage device. This way, if the full write is incomplete and the computer crashes, the storage device has a copy and can continue writing. This will reduce the lifespan of your flash drive, specifically, whatever part is being used as the journal. I would recommend using a non-journaling filesystem for this purpose, such as ext2.
I haven't had a USB drive get corrupted. The write limit I mentioned above was per memory unit. With that being said, they build in backup memory units to be used when one dies. On top of that, even the low end estimate I heard, 100,000 writes, will take a while to reach. If you wrote to 1 memory unit 8 times per day every day, it would take over 30 years to kill a memory unit. With that being said, sometimes Live-USB installs will use a portion of the USB stick as memory if the system doesn't have enough RAM or if it is unsure of how much RAM it will have access to later, although this is almost always just done with Live-CDs to simulate saving data such as web browser history. Since this is a Live-USB, it can just save that data permanently. With all that being said, keep in mind that a memory unit isn't a single byte, but some number of bytes which is determined when the flash drive was designed.
I myself have had problems partitioning a USB drive, but it is possible.
CORRECTION: In the second portion I refer to a process by which a flash drive uses itself for RAM and then refer to something similar for Live-CDs. For Live-CDs, they use what's called a RAMdrive where they use the system's RAM as a virtual hard disk to "save" files such as browser history. What I described for flash drives may not actually exist. It may have been a small bit of confusion on my part (I'm in college and am not fully awake yet) where I was thinking of Vista's readyboost. Sorry for the bad information.
I like Puppy Linux , though I haven't played around with it for a while. It's fast, even on underpowered machines. It also has (or had) built in easy network wizards etc.. to get online fast. Not sure how easy it is to hack if you run into difficulties - I never delved that deeply into it.