I have a 8 GB flash drive. I need it to install Ubuntu with encrypted LVM. When I use automatic partitioning everything is be okay and works. But the machine sets 2 gigabytes SWAP, an unreasonably high value. I could use manual partitioning with standard sections of course, but god I cannot figure out how to set up LVM. Is there a section VLM with encryption, but failed to implement it into my / swap as it does automaton. Could someone please advise?
The alternate installer has the ability to set up and install to LVM, and is the supported way of doing so. You can install the lvm2 package on an existing system, or the desktop livecd and manually set it up, and then install to it. This is what I will cover. (Ubuntu 12.10 has since introduced LVM support from the installation live CD.)
First, you need a Physical Volume. Typically you start with a hard disk, and create an LVM type partition on it. You can create one with gparted or fdisk, and usually only want one partition to use the whole disk, since LVM will handle subdividing it into Logical Volumes. In gparted, you need to check the lvm flag when creating the partition, and with fdisk, tag the type with code 8e.
Once you have your LVM partition, you need to initialize it as a Physical Volume. Assuming this partition is /dev/sda1:
sudo pvcreate /dev/sda1
This writes the LVM header to the partition, which identifies it as a Physical Volume, and sets up a small area to hold the metadata describing everything about the Volume Group, and the the rest of the partition as unused Physical Extents. After that, you need to create a Volume Group named foo:
sudo vgcreate foo /dev/sda1
Now you have a Volume Group named foo. I suggest you change foo to a name meaningful to you. foo contains only one Physical Volume. Now you want to create a Logical Volume from some of the free space in foo:
sudo lvcreate -n bar -L 5g foo
This creates a Logical Volume named bar in Volume Group foo using 5 GB of space. If you are installing, you probably want to create a Logical Volume like this to use as a root filesystem, and one for swap, and maybe one for /home. I currently have a Logical Volume for a Lucid install, and one for a Maverick install, so that is what I named those volumes. You can find the block device for this Logical Volume in '/dev/foo/bar' or 'dev/mapper/foo-bar'.
You might also want to try the lvs and pvs commands, which list the Logical Volumes and Physical Volumes respectively, and their more detailed variants; lvdisplay and pvdisplay.
If you are doing this from the desktop livecd, once you have created your Logical Volumes from the terminal, you can run the installer, and use manual partitioning to select how to use each Logical Volume, and then install.