http://linux.codehelp.co.uk/emdebian/man/re05.html#hostname http://manpages.debian.net/cgi-bin/man.cgi?query=emsetup
The section from the existing manpage is: HOST CONFIGURATION In some circumstances (e.g. inside a chroot), hostname -f fails and emsetup reports an error about being unable to determine the fully qualified hostname. This usually occurs because of an old /etc/hosts file. Example 1.1. Fixing hostname for mybox.mydomain The typical fix is to add an extra line to fix the hostname configuration. Substitute mybox with your short hostname (use hostname -s). If you have a local domain, specify it instead of mydomain. If you have no local domain, use localdomain: 127.0.1.1 mybox.mydomain mybox Your suggestion was to replace that with: -127.0.1.1 mybox.mydomain mybox +127.0.0.1 mybox.mydomain mybox That won't work - you need both lines, as the text describes - add the line to /etc/hosts, not replace it. The whole point is that 127.0.0.1 does not work reliably without 127.0.1.1 existing *as well* but the 127.0.0.1 line generally already exists. It is possible that this is a bug elsewhere in a package like debootstrap but take a look at the code for pbuilder and empdebuild - as long as the chroot is for use on the same system, then copying /etc/hosts into the chroot verbatim is a viable solution. Problems occur when the debootstrap is expected to be copied/installed onto a different system where the values in /etc/hosts need to be generated properly - for Debian that is done by D-I but for a manual debootstrap install, it has to be solved separately. The first line should already exist: 127.0.0.1 mybox.mydomain mybox but that works for 'hostname' but not for 'hostname -f', which requires the addition of the second line (and sometimes further changes - e.g. some setups require that the working /etc/hosts/ file is copied into the chroot verbatim. I've added emphasis that the example is what should be *added* to /etc/hosts but the generation of /etc/hosts itself or the other issues that may still prevent 'hostname -f' from working properly are outside the scope of emsetup or emdebian-tools. I've also added: "If the chroot will only ever be used on the same system that created the chroot, it is sometimes sufficient to copy the /etc/hosts file from the host system verbatim into the chroot. If you need to copy that debootstrapped environment onto another machine as an installation, you will need to fix hostname -f properly. If your /etc/hosts is missing or if the extra line does not complete the fix, you will need to find out how to fix hostname -f before emsetup can work. The actual changes necessary for this task are beyond the scope of emdebian-tools or emsetup. " I won't be adding the 127.0.0.1 line or doing anything in emdebian-tools other than documenting that 'hostname -f' must work and that getting it to work is principally the job of the user creating the chroot in the first place. -- Neil Williams ============= http://www.data-freedom.org/ http://www.nosoftwarepatents.com/ http://www.linux.codehelp.co.uk/
pgpSOx8ldoP0w.pgp
Description: PGP signature

