Let me help you out with this. I would like to know how you are cloning your Edison. Also, could you post the IP addresses you have on both of them? Are they different?
The output you have on /etc/hosts is normal, this content is the default one and contains only the information for the localhost or home address; you can edit it with vi by using the format:
<IP> <HOSTNAME>.<DOMAIN> <ALIAS>
I have the same output you have on /etc/hosts on images versions 146 and 159.devkit and you shouldn’t be worried about this file and the current content it has, if you want to edit it, go ahead but it shouldn't give you problems
Thanks for getting back with me so quickly. I apologize for not getting back with you sooner. I've been battling a malfunctioning hard drive on my personal computer the past couple weeks, and just got things back up and running.
First of all, I cloned my edison using the dd command and a micro usb flash drive (I scored at walmart for $8). I followed a thread here on the intel communities taking bits and pieces from what others were commenting. I will have to dig up the exact thread as I have lost all my emails with the computer trouble. I'll comment on that later tonight if I can dig it up.
Going into more detail on my setup/clone:
Initially I had set up my first Edison with the latest Yocto image using the mini breakout board. The goal was a to make a small prototype that mimics what I had built using a RasPi a+. I needed LED/Vibration to occur on command so I have two mraa/gpio pins blinking (so to speak) for a specified amount of time/iterations and a MP3 file playing simultaneously throughout the duration of the LED/vibrations.
The edison did everything and more than I needed, and the Mini breakout board worked great for a starting block. I got my first prototype a plastic shell online and added a switch/battery/charger to the prototype and was satisfied. Looking to make the prototype even smaller I invested in another edison and a couple of the Sparkfun stackable blocks (the battery and Gpio blocks).
Using the mini breakout board and a 9v battery I was able to provide enough power to the board to also power the micro usb drive. And I luckily didn't need a converter cable as I found the 16GB dual micro usb flash drive/regular flash drive at walmart.
Using the dd command it took about 15 minutes to save a copy of the edison image on the flash drive. Then another 25 minutes for it to clone the new edison. I then rebooted and with only the new edison on the network I ran through the setup_edison --config and changed my hostname. I then popped the new edison onto the sparkfun block and got it soldered and set up. Now I am no longer able to SSH into either edison using their hostnames, but everything else seems to be working fine. If you would like me to go into more detail about anything please let me know. I will post more info on how I specifically did the clone tonight.
My IP for ClayEdison is 192.168.2.15 and my IP for ClayEdison2 is 192.168.1.103. That is very interesting.. They are on the same network. Shouldn't they have they same octet all the way through 192.168.2? I think I need to take my edison (ClayEdison2) off of the Sparkfun block and back into the mini breakout for a serial connection to set it up again.. I can more easily resetup my first edison (ClayEdison) as it always resides in a mini breakout board.
Ok so since my hostname is ClayEdison and my IP is 192.168.2.15 you're saying I should add that to my /etc/hosts file like this below??
127.0.0.1 localhost.localdomain localhost 192.168.2.15 ClayEdison.local ClayEdison
I am familiar editing using vi. I will try this and report if It fixes my problem and I am able to SSH into my edison using ClayEdison.local instead of the IP address..
Thank you very much for the detailed explanation about how you are cloning the Edison.
I would like to know if you have been able to work on this and mount the Edison module on the breakout board again to debug this.
Are you sure that both devices are on the same network? Are you making changes in the mask where the device is set it?
The behavior you are having with the boards could be due to the cloning process, this could be generating the same IP address in both boards, but then the board changes the IP to another mask due to a conflict with the IP address of the other board.
Could you also post the output of running ifconfig on both boards? Are the HWaddr different?
I have edited my /etc/hosts file with this format as you suggested : <IP> <HOSTNAME>.<DOMAIN> <ALIAS>
now it is something like:
127.0.0.1 mydomain.localdomain mydomain
Now if I enter "ping mydomain" on my edison console, it gives response.
PING mydomain (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: seq=0 ttl=64 time=0.413 ms
64 bytes from 127.0.0.1: seq=1 ttl=64 time=0.291 ms
--- mydomain ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
And when I enter "ping mydomain" on ubuntu machine console (in the same network ), it gives response.
ping: unknown host mydomain
I want "ping mydomain" to work on other machines in the same network.
Am I doing something wrong here ? I'm not sure ..
On the Edison; you have mydomain with the IP 127.0.0.1, this the IP address of the device itself. On Ubuntu; did you check the /etc/hosts file?
Are you able to see the mydomain host? If you can’t see the mydomain host on the /etc/hosts file on Ubuntu you need to add it using the IP of the board.
Then you should be able to ping the board from Ubuntu.
Another alternative is always using the IP address of the devices and not the hostnames