Debootsrap ubuntu and locale problems

I’m trying to install a ubuntu gutsy xen guest. I’ve had some problem to get the locale to work.

Thereby installing it on lvm volume group with xfs as file system. Using debootstrap to get gutsy on it.
Since xfs is not installed with debootstrap you have to install the xfsprogs package to get it to work.

After installation i mounted it and chrooted the system to continue the configuration.

Executed “apt-get upgraded” to get the newest version of every thing.

Doing that I got this error message:
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory

So, I googled about it and found some statements telling you to execute the following command:
$ sudo dpkg-reconfigure locale

When you have installed Ubuntu by using debootstrap it will not work, since it to will fail with the same message. So to run the command you need to have at least one locale language generated.

The solution is to first generate one language by executing the following:

$ sudo locale-gen en_US.UTF-8

This will generate the necessary files for the first command.

It is also possible to generate all locale languages by just executing it without the en_US.UTF-8 parameter. That will take some time since all language combinations are generated.

No I’ll continue and pray I will start and that I do not get any tls warning message.