View previous topic :: View next topic |
Author |
Message |
kdvgent Guru
Joined: 29 Sep 2004 Posts: 352 Location: Belgium
|
Posted: Wed Nov 25, 2009 8:21 pm Post subject: Problem with new installation and openrc |
|
|
I made a new installation on a laptop, used ~x86 and hence had to upgrade to openrc (done various times on other computers already).
But this time, I must do something wrong because when I boot the PC, my (wired) network is not reachable - although the computer has an IP address and is reachable via ssh from other computers in my network.
During the boot process, I get a message "SIOCADDRT: Network is unreachable". Once logged in, via ifconfig (and via logging in via ssh from other computers), I got confirmation that I have an IP address.
However, pinging other machines does not work (message: "connect: Network is unreachable")
Issuing "/etc/init.d/net.eth0 restart" solves the issue (network becomes reachable).
/etc/rc.conf (pretty standard although I tried, without success, various variants of the rc_hotplug line):
Code: | cat /etc/rc.conf
# Global OpenRC configuration settings
# Set to "YES" if you want the rc system to try and start services
# in parallel for a slight speed improvement. When running in parallel we
# prefix the service output with it's name as the output will get
# jumbled up.
# WARNING: whilst we have improved parallel, it can still potentially lock
# the boot process. Don't file bugs about this unless you can supply
# patches that fix it without breaking other things!
#rc_parallel="NO"
# Set rc_interactive to "YES" and you'll be able to press the I key during
# boot so you can choose to start specific services. Set to "NO" to disable
# this feature.
#rc_interactive="YES"
# If we need to drop to a shell, you can specify it here.
# If not specified we use $SHELL, otherwise the one specified in /etc/passwd,
# otherwise /bin/sh
# Linux users could specify /sbin/sulogin
rc_shell=/sbin/sulogin
# Do we allow any started service in the runlevel to satisfy the depedency
# or do we want all of them regardless of state? For example, if net.eth0
# and net.eth1 are in the default runlevel then with rc_depend_strict="NO"
# both will be started, but services that depend on 'net' will work if either
# one comes up. With rc_depend_strict="YES" we would require them both to
# come up.
#rc_depend_strict="YES"
# rc_hotplug is a list of services that we allow to be hotplugged.
# By default we do not allow hotplugging.
# A hotplugged service is one started by a dynamic dev manager when a matching
# hardware device is found.
# This service is intrinsically included in the boot runlevel.
# To disable services, prefix with a !
# Example - rc_hotplug="net.wlan !net.*"
# This allows net.wlan and any service not matching net.* to be plugged.
# Example - rc_hotplug="*"
# This allows all services to be hotplugged
#rc_hotplug="*"
rc_hotplug="!net.eth*"
# rc_logger launches a logging daemon to log the entire rc process to
# /var/log/rc.log
# NOTE: Linux systems require the devfs service to be started before
# logging can take place and as such cannot log the sysinit runlevel.
rc_logger="YES"
# By default we filter the environment for our running scripts. To allow other
# variables through, add them here. Use a * to allow all variables through.
#rc_env_allow="VAR1 VAR2"
# By default we assume that all daemons will start correctly.
# However, some do not - a classic example is that they fork and return 0 AND
# then child barfs on a configuration error. Or the daemon has a bug and the
# child crashes. You can set the number of milliseconds start-stop-daemon
# waits to check that the daemon is still running after starting here.
# The default is 0 - no checking.
#rc_start_wait=100
# rc_nostop is a list of services which will not stop when changing runlevels.
# This still allows the service itself to be stopped when called directly.
#rc_nostop=""
# rc will attempt to start crashed services by default.
# However, it will not stop them by default as that could bring down other
# critical services.
#rc_crashed_stop=NO
#rc_crashed_start=YES
##############################################################################
# MISC CONFIGURATION VARIABLES
# There variables are shared between many init scripts
# Set unicode to YES to turn on unicode support for keyboards and screens.
unicode="YES"
# Network fstypes. Below is the default.
net_fs_list="afs cifs coda davfs fuse fuse.sshfs gfs glusterfs lustre ncpfs nfs nfs4 ocfs2 shfs smbfs"
##############################################################################
# SERVICE CONFIGURATION VARIABLES
# These variables are documented here, but should be configured in
# /etc/conf.d/foo for service foo and NOT enabled here unless you
# really want them to work on a global basis.
# Some daemons are started and stopped via start-stop-daemon.
# We can set some things on a per service basis, like the nicelevel.
#export SSD_NICELEVEL="-19"
# Pass ulimit parameters
#rc_ulimit="-u 30"
# It's possible to define extra dependencies for services like so
#rc_config="/etc/foo"
#rc_need="openvpn"
#rc_use="net.eth0"
#rc_after="clock"
#rc_before="local"
#rc_provide="!net"
# You can also enable the above commands here for each service. Below is an
# example for service foo.
#rc_foo_config="/etc/foo"
#rc_foo_need="openvpn"
#rc_foo_after="clock"
# You can also remove dependencies.
# This is mainly used for saying which servies do NOT provide net.
#rc_net_tap0_provide="!net"
##############################################################################
# LINUX SPECIFIC OPTIONS
# This is the number of tty's used in most of the rc-scripts (like
# consolefont, numlock, etc ...)
rc_tty_number=12 |
/etc/init.d/net.eth0 is linked to /etc/init.d/net/lo and I have an empty /etc/conf.d/net file (hence dhcp).
Any suggestions are welcome. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54300 Location: 56N 3W
|
Posted: Wed Nov 25, 2009 8:24 pm Post subject: |
|
|
kdvgent,
What is the output of route ?
What is in /etc/resolv.conf ? _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
kdvgent Guru
Joined: 29 Sep 2004 Posts: 352 Location: Belgium
|
Posted: Wed Nov 25, 2009 9:28 pm Post subject: additional information |
|
|
After booting the PC:
Quote: | route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 * 255.255.255.0 U 2 0 0 eth0
loopback - 255.0.0.0 ! 0 - 0 -
loopback antec.kdvhome 255.0.0.0 UG 0 0 0 lo |
and
Quote: | cat /etc/resolv.conf
# Generated by dhcpcd from eth0
# /etc/resolv.conf.head can replace this line
nameserver 192.168.0.1
# /etc/resolv.conf.tail can replace this line |
Once /etc/init.d/net.eth0 is restarted:
Quote: | route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 * 255.255.255.0 U 2 0 0 eth0
loopback - 255.0.0.0 ! 0 - 0 -
loopback antec.kdvhome 255.0.0.0 UG 0 0 0 lo
default 192.168.0.1 0.0.0.0 UG 2 0 0 eth0 |
While /etc/resolv.conf is left unchanged. I do not see why the first time the correct routes are not defined.
Maybe additional useful information: the error message during the boot process comes after a line "Static routes defined" and when I shut down I get a corresponding message ("no static routes defined". I am not sufficiently aware of network configuration details to understand - worked always before "out of the box" for wired networks. |
|
Back to top |
|
|
Cacklesmatter n00b
Joined: 26 Nov 2009 Posts: 15 Location: Guntersville, AL
|
Posted: Thu Nov 26, 2009 1:32 am Post subject: |
|
|
Maybe this will help, maybe not. Never know until I throw it out there:
in conf.d/net, have you tried setting fallback settings?
fallback_eth0="192.168.0.2/24"
fallback_route_eth0="default via 192.168.0.1"
If it blows it on the first try, it can set static routes or retry the dynamic ones. _________________
krinn wrote: | well, without showing errors, your last hope might be posting that to the vatican's forum
Pen & paper, you'll see, your hand will know what do to with them... |
Now that is funny. LOL |
|
Back to top |
|
|
kdvgent Guru
Joined: 29 Sep 2004 Posts: 352 Location: Belgium
|
Posted: Thu Nov 26, 2009 6:49 pm Post subject: falback configuration |
|
|
No luck |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54300 Location: 56N 3W
|
Posted: Thu Nov 26, 2009 7:43 pm Post subject: |
|
|
kdvgent,
Post your /etc/conf.d/net and tell what runlevel net.eth0 is in please _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Mike Hunt Watchman
Joined: 19 Jul 2009 Posts: 5287
|
Posted: Thu Nov 26, 2009 9:12 pm Post subject: |
|
|
... and post emerge --info please |
|
Back to top |
|
|
sera Retired Dev
Joined: 29 Feb 2008 Posts: 1017 Location: CET
|
|
Back to top |
|
|
d2_racing Bodhisattva
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Fri Nov 27, 2009 1:08 pm Post subject: |
|
|
We can help you on that for sure. |
|
Back to top |
|
|
Saphetiger n00b
Joined: 05 Dec 2009 Posts: 1
|
Posted: Sat Dec 05, 2009 6:48 am Post subject: Nice document |
|
|
Nice documentation. I'm hoping this will work on sabayon as well. Openrc seems so obscurly documented. _________________ --
There's no place like localhost |
|
Back to top |
|
|
kdvgent Guru
Joined: 29 Sep 2004 Posts: 352 Location: Belgium
|
Posted: Sat Dec 05, 2009 10:00 am Post subject: Sorry - have been out of the air for a while |
|
|
Sorry, I have been away from my computer for some time.
In the meantime, I have moved my laptop to Ubuntu. Does not mean that I have given up on Gentoo. I still have my main desktop on Gentoo (actually re-installed this week, using Funtoo) and my webserver is running Gentoo too.
Thanks anyhow for all your help. Really appreciated. |
|
Back to top |
|
|
d2_racing Bodhisattva
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Sat Dec 05, 2009 5:18 pm Post subject: Re: Nice document |
|
|
Saphetiger wrote: | Nice documentation. I'm hoping this will work on sabayon as well. Openrc seems so obscurly documented. |
Thanks |
|
Back to top |
|
|
c00l.wave Apprentice
Joined: 24 Aug 2003 Posts: 264
|
Posted: Sun Dec 20, 2009 8:26 pm Post subject: |
|
|
Stumbled into this as well. After the switch to baselayout-2 and OpenRC a service "staticroute" has been added to runlevel boot; that seems to be the one printing "SIOCADDRT: Network is unreachable". I was unable to get my default route being set the old way. Restarting net.eth0 always helped, as well as route add default gw 192.168.0.1. I also tried to remove staticroute from my boot runlevel, because I thought it may reset previously working routes (net.eth0 was brought up before, no clue why): still no default gateway. I added defaultroute="192.168.0.1" to /etc/conf.d/net, no luck, not even commenting out my usual and now failing routes_eth0="default via 192.168.0.1".
I re-added staticroute to boot runlevel and set my /etc/conf.d/staticroute to:
staticroute="net default gw 192.168.0.1"
Now it works. I don't know why I have to put "net" in front of it; the command I run and that works is route add default gw 192.168.0.1 - no net in there... (omitting "net" in staticroute config will print the route help on reboot)
I also don't get why I have to do all this. The box having these issues has a 32-bit AMD CPU, maybe that's a problem? I didn't have any issues on 64-bit machines yet, but maybe that's just coincidence (they don't use a 192.168.0 network; maybe that's it, I don't know). _________________ nohup nice -n -20 cp /dev/urandom /dev/null & |
|
Back to top |
|
|
|