Debian image: how to pre-assign a static IP (headless board)?

Started by XFer, July 29, 2013, 03:55:07 PM

Previous topic - Next topic

XFer

Hello,

since I have to use my A20 board in headless mode (no monitor, no keyboard etc.), I have to connect to it via SSH.
Problem is, the supplied Debian image (Release 2) seems to look for a DHCP server which I don't have (and can't set up at the moment).
Is there a way to pre-assign a static IP address to the ETH? Editing some kind of script/ini/etc. in the SD?

Thanks,

Fernando

Lurch


XFer

Thank you!
Looks like it doesn't boot (never replies to ping), but now I know it's not a DHCP issue. :-)

XFer

Thank you!
Looks like it doesn't boot (never replies to ping), but now I know it's not a DHCP issue.

Resolved, now I can login with ssh. :-)
Only one issue: there's no /etc/inittab, which is strange since Debian has it by default (and no /etc/event.d either).
So how can I configure the runlevel to 3, thus avoiding to start X (which I don't need)?
scratch that, everything resolved.

Thanks a lot people!

Fernando

rzr

Note if you want it to be permanent and uses DHCP just uncomment :


# git diff
diff --git a/network/interfaces b/network/interfaces
index fcddad6..979baa8 100644
--- a/network/interfaces
+++ b/network/interfaces
@@ -2,7 +2,7 @@
auto lo
iface lo inet loopback

-#auto eth0
+auto eth0
iface eth0 inet dhcp

#auto eth1





Btw, I am curious where does this eth1 is coming from ?

hnb2907

for me, eth1 is active when a USB-ethernet adapter is connected, and the correct settings are made in the interfaces config file...