ayufan-pine64 / linux-build

Pine64 Linux build scripts, tools and instructions (based on Longsleep work)
MIT License
154 stars 36 forks source link

pine64 LTS not reachable on network #57

Open asterion9 opened 6 years ago

asterion9 commented 6 years ago

Hello,

I have a few pine64LTS boards on which I tried to boot using xenial-minimal-sopine-bspkernel-0.6.2-77.img.

I loaded the image on an SD card using the same procedure that had already worked for other images on this board. On booting the green power led light up, then shortly after the ethernet port green led light up, then the orange one flash a few time. After a few minutes the board is warm as usual, indicating that all is running normally.

but 4/5 times the board is not reachable on the network, my box (which is my DHCP server) shows me nothing.

I've tried to rewrite again the anew without success. The few times the board managed to register on my DHCP server and get an IP, I was able to log onto it with ssh, the ifconfig show me nothing abnormal, but when I rebooted, it didn't show again on the network. I have also tried to set up a static ip via /etc/network/interfaces.d/eth0, but if I reboot, it fails to show again.

Ultimately I set up my own DHCP on a VM, it worked once, and then failed to connect again on reboot. (another image I used as a control was able to register with no problem)

I'm willing to spend some time onto the problem, but I don't know how to access the machine other than by SSH (hmdi shows nothing). Thank you.

PanderMusubi commented 6 years ago

Do you have multiple PINE64s on the same network?

asterion9 commented 6 years ago

I had at some time, and I'm aware that having same ether address, static ip or hostname is an issue. I tested it with only one pine switched on, tried to reboot the router, even the switch. That's why I ended up testing it on my own DHCP to eliminate some unknown factors, but with no luck.

The only pattern I have seen (but I'm not totally sure) is that it works when booting for the first time on a board, then it doesn't anymore.

btw, I switched on armbian image which works fine for my need, but I can run tests if you want to investigate the issue for the sake of it. Thanks for your help.

PanderMusubi commented 6 years ago

I read somewhere that MAC address gets cycled each reboot. Not sure if that is correct and the case. But you might look into that. It is possible to force it to the MAC address which it printed on the PCB.

asterion9 commented 6 years ago

When I typed the command to show me the hardware Mac (ethtool I believe) address it prints me full 00:00:00... Each image that booted gave me the same Mac address each time, even on different hardware. For my current setup I had to boot each board separately and change ip and Mac one by one, which worked.

pfeerick commented 6 years ago

AFAIK the ayufan images generate and lock in a mac address on first boot, so yes that is sort of the case @PanderMusubi but it is corrected at the software level (or was last time I checked... my older pine64s stick to their initial MAC address after first boot of a new image...)

@fesssstif If you've to have issues with the networking, you can always access the pine64 via a serial console connection. Something like this https://www.adafruit.com/product/954 will do the trick - you can also get them on eBay and Amazon if Adafruit isn't local. You connect only the RX, TX and GND and tx pins to the RX, TX and GND pins on the 10 pin expansion header or raspberry pi compatible header. You don't connect the fourth wire in this instance, as the pine64 has its own power ;) And because it's a serial connection, you typically reverse the connections - RX on device 1 is TX on device 2, and the same with the second connection - TX to RX.

Pinout diagram for the headers is here : http://files.pine64.org/doc/Pine%20A64%20Schematic/Pine%20A64%20Pin%20Assignment%20160215.pdf

asterion9 commented 6 years ago

Thank you for the serial connexion tip, I suspected it should be possible but didn't have the know-how. I believe the MAC address is fixed at generation for a given image, so I had to change it manually for each board.