desktop GUI doesn't start without internet

Started by RFranta, March 28, 2014, 09:06:23 AM

Previous topic - Next topic

RFranta

Hello,

I have Olinuxino A20 with Debian image, when I turn it on and internet cable is not pluged, graphic interface doesn't start and I have just cross on the black screen instead of mouse. Where can be the problem?
Maybe it has something to do with /etc/network/interfaces? Here is it:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 192.168.0.7
netmask 255.255.255.0
gateway  192.168.0.1

iface wlan1 inet dhcp
wpa-ssid YourSSID
wpa-psk YourPASS


Javier

Hi RFranta,

Assuming you're running a display manager (gdm3?) I would guess that's what's relying on network access and exiting when none is available.

It might record in its log why it needed network access, so maybe you could find the answer there. Alternatively you could tcpdump during a normal startup with the cable connected and see what it's talking to.

Perhaps it's trying to look up the hostname over DNS?  If so, you might be able to suppress this by ensuring you have the hostname in your /etc/hosts file, e.g.:

192.168.0.7 yourhostname

Best wishes,
Javier.

RFranta

Hello,

thank you for answer, but I am trying to find the way in which will olinuxino work the same without internet.
Any idea what to do?

Javier

Hello RFranta,

Yes, I understood that.  My suggestions were intended to help you find the dependency on network access and to eliminate it.  You would then be able to boot into the desktop without network access.

Best wishes,
Javier.

laskov

Hi all,

RFranta, there is no need of Internet access. Setting IP address in /etc/network/interfaces breaks the loading. Set it in /etc/rc.local

Read the topic I pointed above.

RFranta

Hello Laskov,

I was trying to configure /etc/rc.local
I deleted this part from interfaces:
auto eth0
iface eth0 inet static
address 192.168.0.7
netmask 255.255.255.0
gateway 192.168.0.1
And I put it to rc.local before the exit 0, but that's doesn't work. Where can be the problem?



laskov

Hi RFranta,

in /etc/rc.local put this:
ifconfig eth0 192.168.0.7
route add default gw 192.168.0.1


and if you need an Internet access (and if your nameserver and gateway are the same IP) put
nameserver 192.168.0.1
in /etc/resolv.conf

RFranta

Thank you verz much for answer, but that doesn't work too...

laskov

#9
I hope you have a serial console cable.
This is config (texts after # are comments) :
root@a20-OLinuXino:~# cat /etc/network/interfaces
auto lo
iface lo inet loopback


#auto eth0
#iface eth0 inet dhcp
#iface eth0 inet static
#address 192.168.0.7
#netmask 255.255.255.0
#gateway 192.168.0.1

#auto wlan1
iface wlan1 inet dhcp
wpa-ssid YourSSID
wpa-psk YourPASS


You must stop Network Manager:
root@a20-OLinuXino:~# /etc/init.d/network-manager stop
[....] Stopping network connection manager: NetworkManager[ ok .


Setting IP manually:
ifconfig eth0 192.168.0.7

Setting gateway:
route add default gw 192.168.0.1

If you wish they to be executed automatically at startup put them in /etc/rc.local.

Quoteroot@a20-OLinuXino:~# cat /etc/rc.local
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
chmod 777 /dev/disp  /dev/cedar_dev /dev/ump  /dev/mali
echo 1008000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq

echo 408000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq

./opt/led_blink.sh&

#startx&
#/etc/init.d/lightdm start

ifconfig eth0 192.168.10.200
route add default gw 192.168.10.1

exit 0
... and make Network Manager not to start:
mv /etc/rc2.d/S03network-manager /etc/rc2.d/K03network-manager
update-rc.d

You will see warnings about changing default starting of NM.
If you need an Internet access you may need to edit/add nameserver in /etc/resolv.conf