This question already has an answer here:
I ran Ubuntu from a LiveUSB. I would like to actually install Ubuntu on my usb drive while I am running Ubuntu from the USB live. When I ran the installer (by clicking the "install" icon on the live desktop), it wouldn't let me select my usb drive.
How do I actually install Ubuntu onto my usb drive?