locahost cannot be resolved

Bug #674090 reported by Ken Werner on 2010-11-11
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Linaro
Triaged
Low
Tom Gall

Bug Description

The installation of the headless image creates an empty /etc/hosts file. Therefore the localhost cannot be resolved which may lead to further problems (ssh X forwading won't work, etc...).

As a quick fix I did:
echo "127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6" > /etc/hosts

Jamie Bennett (jamiebennett) wrote :

Is this bug still present on the natty images we are now producing?

Please take a look at:

http://snapshots.linaro.org/11.05-daily

Changed in linaro:
importance: Undecided → Low
status: New → Triaged
Ken Werner (kwerner) wrote :

Thanks for looking into this. Will the contents of /etc/hosts be created during the first boot? Since I don't want to delete my system I only created an image using the latest packages and mounted it loop-back. It looks like the resultant image contains an empty /etc/hosts file.

Here is what I did:
<snip>
$ wget -q http://snapshots.linaro.org/11.05-daily/linaro-hwpacks/vexpress/20101201/1/images/hwpack/hwpack_linaro-vexpress_20101201-1_armel_supported.tar.gz
$ wget -q http://snapshots.linaro.org/11.05-daily/linaro-headless/20101201/1/images/tar/linaro-natty-headless-tar-20101201-1.tar.gz

$ bzr branch lp:linaro-image-tools
Branched 177 revision(s).
$ cd linaro-image-tools

$ sudo ./linaro-media-create --image_file vexpress.img --rootfs ext3 --dev vexpress --binary ../linaro-natty-headless-tar-20101201-1.tar.gz --hwpack ../hwpack_linaro-vexpress_20101201-1_armel_supported.tar.gz

$ sudo kpartx -a vexpress.img
$ sudo mount /dev/mapper/loop0p2 /mnt/tmp2 -o loop,ro

$ cat /mnt/tmp2/etc/hosts
$ file /mnt/tmp2/etc/hosts
/mnt/tmp2/etc/hosts: empty
<snip>

Please let me know if there is a better way to verify this.

I've just tried todays daily (well todays headless and yesterdays hwoack) and it's still there - /etc/hosts is empty.

Dave

Changed in linaro:
assignee: nobody → Tom Gall (tom-gall)
Jamie Bennett (jamiebennett) wrote :

Marked as a dup even though this was reported first, the other bug has some good commentary, please continue there.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers