Installing/Running Ubuntu on USB/Flash drive

I have tried to install Ubuntu in several ways as told in a number of sources (google: installing ubuntu on usb). However most of them are focused on mirroring the live USB CD which I indeed do not prefer.

I was looking for simulating a real (persistant) installation on the usb drive. And I came up with minimal installation.

1. Boot with either the Live CD, Minimal Installation CD or the DVD

I have rebooted with the minimal installation CD of Ubuntu Natty Narwhal 11.04 (If it’d be possible, better with its DVD).

I plug in the usb drive and re-detect the drives in the text based installation menu and do the configuration for the usb drive in the menu then install it.

2. Reinstall? :)

The trick is, when it is time to install GRUB it yields an error. So I restart and boot with the Ubuntu DVD open “rescue system” in the boot menu and go on with partition table (without any modification, but only configuring as in original, I have). It installs the system again.

3. GRUB install

I have booted from the DVD and used the line below for 11.04 (source: https://help.ubuntu.com/community/RecoveringUbuntuAfterInstallingWindows)

sudo grub-install –boot-directory=/media/0d104aff-ec8c-44c8-b811-92b993823444/boot /dev/sda

After that,

# cd /media/???????

get into your usb drive and chroot to it:

# chroot .

then add a user within root group:

# useradd ?myname?

Just like that. Reboot and use the usb ubuntu. One more thing to remember: VMWare may not comply with a successful bootable USB Driver. I have wasted so much time before I understand that. I thought it was not complete just because VMWare did not boot from the USB which I have prepared. But no, though it works with real machine start up.
P.S.: If you need further help on VMWare have a look at this one: http://www.plop.at/en/bootmanagerdl.html