While searching for a problem I have with mkdosfs, I came across this thread (and rather indirectly at that..). I noticed a number of problems with the article and I happen to be in a contribute mood (whatever that means) so here is where I know for a fact things work and don't work.
I have two working scratch systems that run entirely off usb, on any pc-compatible system with a either usb 2.0 (which as far as I have seen generally support usb-boot..no comment for award bioses
) or a usb 1.1 system with a cdrom drive.
I only have usb 1.1 systems that don't boot usb.
1) As noted by the article, many graphical partitioners donot like USB. With Partition Expert 2003 (maybe it was Partiion magick, I confused the two..sorry), this is certainly true. But with QT-Parted, this graphical partition has no trouble whatsoever in any way and supports vfat and ntfs filesystem installs. System Rescue CD is a safe approach to using QT-Parted, no worries about RPM's, dependencies, or scratch installs. Just burn System Rescue CD and you can almost go straight into qtparted.
2) That aside, the way I have the systems setup is as follows:
root partition ( / ): ext3 - ext3 takes a little more space, but USB Devices unplug easily. if you unplug your OS you will most certainly screw up something. Ext2 will give hell on every one of those problems, while ext3 makes "live unplug recovery" quick and clean.
Shared Directory( /home/share ): A common practice of mine, in which all files here are considered permissionless. This will be vfat (fat 16, which fits better on smaller usb-sticks, if you have say...2-gigs or more for this partition, you can safely make it fat32 instead)
3) In these partitions, I give unique Labels, for the USB-device:
root partition ( / ): 635SAC_/
This label is simply a serial number for the usb-device and the the _/ to designate the root partition.
This is good for when there are more usb-devices plugged in, how does the system know which device, or even system you want? Well of course a unique label would work. This will prevent having two usb-sticks of the same system and mounting the wrong one (or even worse, different parts of each)
Shared Directory ( /home/share ): mkdosfs has a nice little command called -n
Follow this with an at most 11-character system name (like: 635SAC_/hom) for the same purposes as above. WARNING:
This is one of the problems I need to look up, the linux system doesn't seem to always see this label and occasionally does not mount. In addition I had to format the vfat system about 20 times to make the label stick.
* This Shared Directory can be accessible from Windows as well as linux, giving you freedom to move files if you don't want to boot to your USB-system and have, say a readily available Windows system around.
4) Moving on, preparing to boot! Not so easy with the stock linux-kernel. (needs 1-improvement in my opinion and thats root=LABEL=635SAC_/)
First, you need the /etc/fstab
file, as already noted, LABELS are best choice here.
Where you might have /dev/sda2
Here is one of mine:
LABEL=635SAC_/ / ext3 defaults 1 1
LABEL=635SAC_/home /home ext3 defaults 1 2
LABEL=635SAC_vfat /home/share vfat users,gid=users,umask=0 0 0
tmpfs /tmp tmpfs size=128m,mode=1777 0 0
Notes on above:
Windows XP has a problem with USB-Memory Sticks and probably with USB-HardDrives. The problem is this: The first partition it finds, it assumes its vfat or ntfs, otherwise it says your drive needs to be formatted. The system will ignore every single other partition present, including any windows partitions. For this reason, make the first partition vfat if you intend to have a windows partition. (ie: make /dev/sda1 vfat).
Also notice the /tmp mount. That is useful if you have a small usb-memory stick that cannot hold much. This gives you 128 megabytes of room in the /tmp directory (at the potential cost of using 128 mb of your memory
A final problem is the biggest one. SWAP??? Well if you have got the space for a swap, make it so. Otherwise it can be left alone with hopes you have enough system memory. With Linux that is rarely a problem with 512mb or above..unless you watch lotsa movies or work with art. Anything less, there may be trouble.
5) Now we can really boot? Or can we?
well if you've got usb-boot your almost done.
with usb-boot, you can just put grub on the usb-system.
After that, you have to pass root=/dev/sda2 AND
rootdelay=6. I find 6 to be the fastest safe wait time. The system has to wait on the usb to say hello, before it attempts to mount it. if you forget rootdelay or set it too short, your system will not boot.
Secondly, you may have to get an initrd or constantly change the root=/dev/sda2 option depending on how may usb-devices are plugged in and which gets assigned in what order. An initrd my allow you to pass an option such as root=LABEL=635SAC_/ and thus have no more problems. I am still working on learning how to mkinitrd
or Make an Initrd. Documentation this far seems to suck and those that don't seem to depend on a certain dist with certain dependencies...so much for my SCRATCH system!!
If you in my boot, you have to boot to a cdrom device. This gets fun. I already had a discussion about this in LinuxQuestions so go here for the help on this: http://www.linuxquestions.org/questi...hreadid=375493
Same problems with root=/dev/sd?? still exist with the cdrom.
I prefer grub over lilo and by all means syslinux (as syslinux requires the nasty windows partitions, which in my opinion makes it a little anti-linux), as grub allows you to change settings on the fly, getting around many of the boot-time problems and tweaks one might need to get a USB system ti boot, solely from the usb and/or cdrom. Nothing wrong with lilo other than the fact that last time I tried it, I had to not only re-edit the config from a running system, but also recompile parts of the thing just to get it to boot! That will be hell if you can't get to your USB system, because you have to first get on it so you can fix your problem about not getting on it!! And thus, I conclude, the strangely maintained grub is the choice for USB systems.
6) Thats all, unless I missed something is this book of a post.