Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => A20 => Topic started by: XFer on July 29, 2013, 03:55:07 PM

Title: Debian image: how to pre-assign a static IP (headless board)?
Post by: XFer on July 29, 2013, 03:55:07 PM
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
Title: Re: Debian image: how to pre-assign a static IP (headless board)?
Post by: Lurch on July 29, 2013, 04:49:36 PM
You just have to add it to the /etc/network/interfaces file for ethx or wlanx:
  http://documents.made-it.com/Debian_Internet_Server/Debian_Internet_Server-5.html
Title: Re: Debian image: how to pre-assign a static IP (headless board)?
Post by: XFer on July 29, 2013, 05:11:02 PM
Thank you!
Looks like it doesn't boot (never replies to ping), but now I know it's not a DHCP issue. :-)
Title: Re: Debian image: how to pre-assign a static IP (headless board)?
Post by: XFer on July 29, 2013, 05:29:39 PM
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
Title: Re: Debian image: how to pre-assign a static IP (headless board)?
Post by: rzr on January 03, 2014, 12:22:05 AM
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 ?
Title: Re: Debian image: how to pre-assign a static IP (headless board)?
Post by: hnb2907 on January 03, 2014, 01:27:49 AM
for me, eth1 is active when a USB-ethernet adapter is connected, and the correct settings are made in the interfaces config file...