You are not logged in.
Hello,
Sometimes when I boot up my computer, there's no network. The solution then is to type "/etc/rc.d/network restart" as superuser.
When I shut down my computer, I also shut down all the power, including the modem.
When starting it up, I turn on the power, and then the computer. While the computer boots up, the modem is also starting up (it's an ADSL modem).
Since sometimes I have network, sometimes not, I think it depends on how fast the modem started up that I have it or not. That's just my theory though. I think if ArchLinux would just init the network a little bit later, the problem would be gone.
Is there any way to make it do the network only after initializing everything else?
Or do you know any other (better) solution for this annoyance?
Thanks!
Offline
Are you backgrounding your network daemon? https://wiki.archlinux.org/index.php/Da … Background
You can try putting
(sleep 300 && rc.d restart network) &
in your /etc/rc.local or disable 'network' daemon in your rc.conf
!network
and run
(sleep 300 && rc.d start network) &
from your /etc/rc.local.
Offline
You're talking about two completely independent unconnected power-ons - one for your computer, one for your modem. No matter how late Arch initialises the network, there is always the chance that it will be too early for your modem.
Solution: write a custom network init script that tests for connectivity, and loops over the required command(s) until the connection is established.
Offline
You're talking about two completely independent unconnected power-ons - one for your computer, one for your modem. No matter how late Arch initialises the network, there is always the chance that it will be too early for your modem.
Solution: write a custom network init script that tests for connectivity, and loops over the required command(s) until the connection is established.
The thing is, I never had this problem with my previous computer. My previous computer was 5 year old, and the Archlinux on it too (with 5 years of pacman -Syu history). So at least the two independent unconnected power-ons seem to be no problem for some Arch boxes. I've never created background daemons there either, or done any delay, it just never was a problem there.
This new computer (well, half a year old in the meantime) has this problem.
So maybe there was something better about how the old one was configured, but what could that be?
Last edited by aardwolf (2012-09-19 19:54:44)
Offline
Ehmm.... no, the old one was just slower.
Try the sleep 300 thing if you want, you might be happy with the result. It's just not the smartest way to do this.
Offline
Or do you know any other (better) solution for this annoyance?
Other, but maybe not better: don't turn the modem off.
Other and better, test for connectivity as tomk suggests. This should not be that difficult.
Offline
At boot, one of my arch installations sometimes created the network correctly, other times it failed - required manual start. This was a race condition between eth0 being created and the network using eth0. I am using systemd and needed to update /etc/systemd/system/network.service, as shown
old:
Wants=network.target
Before=network.target
new:
Requires=sys-devices-pci0000:00-0000:00:04.0-0000:01:06.0-net-eth0.device
After=sys-devices-pci0000:00-0000:00:04.0-0000:01:06.0-net-eth0.device
Obviously, you will need to use your own device name.
Offline