Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
OpenRC and net.eth0 does not work?!
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
DingbatCA
Guru
Guru


Joined: 07 Jul 2004
Posts: 354
Location: Portland Or

PostPosted: Thu May 19, 2011 5:34 am    Post subject: OpenRC and net.eth0 does not work?! Reply with quote

I am feeling a bit dumb on this one. I can not seem to get net.eth0 to start on one of my systems, it never loads.
Code:

INIT: Entering runlevel: 3
 * Starting syslog-ng ... [ ok ]
 * Setting clock via the NTP client 'ntpdate' ...
Exiting, name server cannot be used: Temporary failure in name resolution (-3) * Failed to set clock [ !! ]
 * ERROR: ntp-client failed to start
 * Starting rpcbind ... [ ok ]
 * Starting NFS statd ... [ ok ]
 * Starting NFS sm-notify ... [ ok ]
 * Mounting NFS filesystems ...
mount.nfs: Failed to resolve server 192.168.0.2: Name or service not known [ !! ]
 * ERROR: nfsmount failed to start
 * Mounting network filesystems ...
mount.nfs: Failed to resolve server 192.168.0.2: Name or service not known [ ok ]
 * Starting snmpd ... [ ok ]
 * Starting sshd ... [ ok ]
 * Starting local


So lets go thought the basics:
Code:

xenspark init.d # pwd
/etc/init.d
xenspark init.d # ls -la net.eth0
lrwxrwxrwx 1 root root 6 May 18 14:28 net.eth0 -> net.lo
xenspark init.d # rc-update -s | grep net.eth0
             net.eth0 |           default
xenspark init.d # /etc/init.d/net.eth0 start
 * Bringing up interface eth0
 *   192.168.0.98 ...
 [ ok ]
 *   Adding routes
 *     default via 192.168.0.1 ...
 [ ok ]
xenspark init.d # cat /etc/conf.d/net
config_eth0="192.168.0.98 netmask 255.255.255.0 broadcast 192.168.0.255"
routes_eth0="default via 192.168.0.1"
xenspark init.d # ls /etc/runlevels/default/
local     netmount  ntp-client  sshd       udev-postmount
net.eth0  nfsmount  snmpd       syslog-ng
xenspark init.d # ls -la /etc/runlevels/default/net.eth0
lrwxrwxrwx 1 root root 20 May 18 14:04 /etc/runlevels/default/net.eth0 -> /etc/init.d/net.eth0
xenspark init.d # emerge -s openrc
Searching...
[ Results for search key : openrc ]
[ Applications found : 1 ]

*  sys-apps/openrc
      Latest version available: 0.8.2-r1
      Latest version installed: 0.8.2-r1
      Size of files: 157 kB
      Homepage:      http://www.gentoo.org/proj/en/base/openrc/
      Description:   OpenRC manages the services, startup and shutdown of a host
      License:       BSD-2

xenspark init.d # echo WTF!
WTF!

What am I missing?!
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 2289
Location: Canada

PostPosted: Thu May 19, 2011 6:52 am    Post subject: Reply with quote

Sticking to basics, what does ifconfig show after startup ? From you original output it is not clear that net.eth0 did not start, perhaps interface did not get an IP ?
Back to top
View user's profile Send private message
rigor
n00b
n00b


Joined: 16 Jan 2006
Posts: 7

PostPosted: Thu May 19, 2011 1:15 pm    Post subject: Reply with quote

When I did my openRC updates last week, I saw that net.lo was in the boot runlevel. I did the same for net.eth0.

You could try that.

Code:
rc-update del net.eth0 default
rc-update add net.eth0 boot



hth,

Rigor
Back to top
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 2372
Location: Dallas area

PostPosted: Thu May 19, 2011 1:49 pm    Post subject: Reply with quote

rigor wrote:
When I did my openRC updates last week, I saw that net.lo was in the boot runlevel. I did the same for net.eth0.

You could try that.

Code:
rc-update del net.eth0 default
rc-update add net.eth0 boot



hth,

Rigor


net.lo should be in boot
net.<anything else> should be in default
_________________
Asus m5a99fx, FX 8320 - amd64-multilib, 3.15.9-zen, glibc-2.17, gcc-4.7.3-r1, eudev
xorg-server-1.16, openbox w/lxpanel, nouveau, oss4
Back to top
View user's profile Send private message
shur
Tux's lil' helper
Tux's lil' helper


Joined: 08 Aug 2004
Posts: 95

PostPosted: Thu May 19, 2011 2:05 pm    Post subject: Reply with quote

This is a similar but different problem. After an update, I find that my /etc/init.d/net.eth0 has simply disappeared.
Can someone please let me know how I can get it back? Thank you, I will be very grateful.
Back to top
View user's profile Send private message
Apheus
Apprentice
Apprentice


Joined: 12 Jul 2008
Posts: 235

PostPosted: Thu May 19, 2011 2:21 pm    Post subject: Reply with quote

shur wrote:
This is a similar but different problem. After an update, I find that my /etc/init.d/net.eth0 has simply disappeared.
Can someone please let me know how I can get it back? Thank you, I will be very grateful.


http://www.gentoo.org/doc/en/openrc-migration.xml#doc_chap2_pre9
Back to top
View user's profile Send private message
DingbatCA
Guru
Guru


Joined: 07 Jul 2004
Posts: 354
Location: Portland Or

PostPosted: Thu May 19, 2011 3:03 pm    Post subject: Reply with quote

Code:

xenspark ~ # uptime
 00:01:23 up 1 min,  1 user,  load average: 0.00, 0.00, 0.00
xenspark ~ # ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:16:3e:49:4d:d2
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

tunl0     Link encap:IPIP Tunnel  HWaddr
          NOARP  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

xenspark ~ # ifconfig
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

xenspark ~ # rc-update del net.eth0
 * service net.eth0 removed from runlevel default
xenspark ~ # rc-update del net.lo boot
 * service net.lo removed from runlevel boot
xenspark ~ # rc-update add net.lo boot
 * service net.lo added to runlevel boot
xenspark ~ # rc-update add net.eth0 default
 * service net.eth0 added to runlevel default
xenspark ~ # rc-update -s
                 udev |                               sysinit
       udev-postmount |           default
                 sshd |           default
             bootmisc |                          boot
            syslog-ng |           default
                snmpd |           default
             nfsmount |           default
                  lvm |                          boot
        device-mapper |                          boot
           ntp-client |           default
                 fsck |                          boot
             hostname |                          boot
                local | nonetwork default
           localmount |                          boot
             netmount |           default
                 root |                          boot
            savecache |                                       shutdown
                 swap |                          boot
               sysctl |                          boot
              urandom |                          boot
                devfs |                               sysinit
                dmesg |                               sysinit
              hwclock |                          boot
          consolefont |                          boot
              keymaps |                          boot
            killprocs |                                       shutdown
              modules |                          boot
             mount-ro |                                       shutdown
                 mtab |                          boot
               procfs |                          boot
         termencoding |                          boot
               net.lo |                          boot
             net.eth0 |           default



net.lo loads as part of boot. If I add net.eth0 to boot, it does not load. Still no luck. Ideas?
Back to top
View user's profile Send private message
shur
Tux's lil' helper
Tux's lil' helper


Joined: 08 Aug 2004
Posts: 95

PostPosted: Thu May 19, 2011 3:15 pm    Post subject: Reply with quote

many thanks. Of course I should keep up on changes.
Back to top
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 2372
Location: Dallas area

PostPosted: Thu May 19, 2011 3:15 pm    Post subject: Reply with quote

what does "lspci -k" return
_________________
Asus m5a99fx, FX 8320 - amd64-multilib, 3.15.9-zen, glibc-2.17, gcc-4.7.3-r1, eudev
xorg-server-1.16, openbox w/lxpanel, nouveau, oss4
Back to top
View user's profile Send private message
DingbatCA
Guru
Guru


Joined: 07 Jul 2004
Posts: 354
Location: Portland Or

PostPosted: Thu May 19, 2011 3:33 pm    Post subject: Reply with quote

Code:

xenspark ~ # lspci -k
xenspark ~ #
xenspark ~ # cat /etc/rc.conf | grep rc_sys
rc_sys="xenU"


lspci returns nothing. Xenspark is a VM domU under xen.
Back to top
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 2372
Location: Dallas area

PostPosted: Thu May 19, 2011 4:08 pm    Post subject: Reply with quote

DingbatCA wrote:
Code:

xenspark ~ # lspci -k
xenspark ~ #
xenspark ~ # cat /etc/rc.conf | grep rc_sys
rc_sys="xenU"


lspci returns nothing. Xenspark is a VM domU under xen.


That would have been a helpful thing to know in the 1st place.

Are your network drivers compiled into the kernel or loaded as modules?
_________________
Asus m5a99fx, FX 8320 - amd64-multilib, 3.15.9-zen, glibc-2.17, gcc-4.7.3-r1, eudev
xorg-server-1.16, openbox w/lxpanel, nouveau, oss4
Back to top
View user's profile Send private message
DingbatCA
Guru
Guru


Joined: 07 Jul 2004
Posts: 354
Location: Portland Or

PostPosted: Thu May 19, 2011 4:37 pm    Post subject: Reply with quote

All net drivers are compiled into the kernel.

I don't see how being a VM changes this problem. The network card is there, and working. The VM was working fine until the OpenRC upgrade. Manual start of net.eth0 works just fine. I am not sure how to debug openrc.
Back to top
View user's profile Send private message
DNAspark99
Guru
Guru


Joined: 03 Sep 2004
Posts: 321

PostPosted: Thu May 19, 2011 5:02 pm    Post subject: Reply with quote

I too, had net.eth0 failing to start on boot after the openRC/baselayout upgrade.

Could start it _manually_ and it would come up without issue, but I could not get it to come up 'on it's own', despite all indications that it should be working.

May not be the ideal solution, but setting the following in /etc/rc.conf got it to start at boot:

Code:

rc_depend_strict="YES"
Back to top
View user's profile Send private message
DingbatCA
Guru
Guru


Joined: 07 Jul 2004
Posts: 354
Location: Portland Or

PostPosted: Thu May 19, 2011 5:19 pm    Post subject: Reply with quote

Code:

 * Bringing up interface eth0
 *   192.168.0.98 ...  [ ok ]
 *   Adding routes
 *     default via 192.168.0.1 ... [ ok ]


Thanks DNAspark99! Setting rc_depend_strict="YES" in my rc.conf worked!
Back to top
View user's profile Send private message
sr66
n00b
n00b


Joined: 30 May 2005
Posts: 55

PostPosted: Sat May 21, 2011 11:32 pm    Post subject: Reply with quote

DNAspark99 wrote:
I too, had net.eth0 failing to start on boot after the openRC/baselayout upgrade.

Could start it _manually_ and it would come up without issue, but I could not get it to come up 'on it's own', despite all indications that it should be working.

May not be the ideal solution, but setting the following in /etc/rc.conf got it to start at boot:

Code:

rc_depend_strict="YES"


Thanks DNAspark99. That worked for me too.

I also had to do the following (which has been discussed elsewhere in the http://www.gentoo.org/doc/en/openrc-migration.xml and above)
Code:


cd /etc/init.d
ln -s net.lo net.eth0
rc-update add net.eth0 default
Back to top
View user's profile Send private message
Psi15
Tux's lil' helper
Tux's lil' helper


Joined: 07 Jan 2003
Posts: 84
Location: Vienna

PostPosted: Mon Jun 13, 2011 10:47 am    Post subject: Reply with quote

worked for me as well - but I'm wondering why the system even has the option of not starting something that is in the default runlevel...
Back to top
View user's profile Send private message
SStreet
n00b
n00b


Joined: 06 Aug 2004
Posts: 11

PostPosted: Fri Jul 15, 2011 12:04 pm    Post subject: Reply with quote

I just stumbled upon a solution. I just built a new system from the minimal install ISO dated 20110708. After getting the basic system installed and booting off its own HDD, I found that nothing I had added to that default startup group would start.

Seems that warning for datetime being correct should be heeded more closely. After 15 minutes of head troubleshooting, I realized that the clock on the system during the time of the chroot build process was hours ahead of real time, I set the time with the date command and didn't give it another thought. That was until I realized after wondering why in the world none of my services where starting. In trying to debug the startup, I found the datetime stamps on some of files in the future - that's when it hit me.

To fix my issue and get everthing to startup.

rc-update --update

This forcing a dependency tree update and finally resolved my startup issues.
Back to top
View user's profile Send private message
jlpoole
Apprentice
Apprentice


Joined: 01 Nov 2005
Posts: 232
Location: Napa, CA

PostPosted: Thu Jul 21, 2011 9:08 pm    Post subject: Reply with quote

My SheevaPlug (headless) suffers this problem: on reboot, the dhcpcd fails to secure its IP, and then, of course, other services such as sshd and apache fail because there is no network connection. I'm effectively blocked from accessing the computer until I establish a hard-wire link. Yet, when I am able to log in via my serial port (using minicom from another computer), I can then start dhcpcd and then sshd. This suggests that there is a priority issue afoot at startup time and that dhcpcd is being called too early.

I have not brought my system up current as of today, but will do so just to see if the dhcpcd updates. I did activate
Code:
rc_depend_strict="YES"

in /etc/rc.conf and I also performed "rc-update --update", these two solutions did not solve my problem.

I'll update when I fix the problem and learn why.
Back to top
View user's profile Send private message
FizzyWidget
Veteran
Veteran


Joined: 21 Nov 2008
Posts: 1113
Location: 127.0.0.1

PostPosted: Thu Jul 21, 2011 9:55 pm    Post subject: Reply with quote

http://www.gentoo.org/doc/en/openrc-migration.xml

look under network, about halfway down
_________________
I know 43 ways to kill with a SKITTLE, so taste my rainbow bitch.
Back to top
View user's profile Send private message
jlpoole
Apprentice
Apprentice


Joined: 01 Nov 2005
Posts: 232
Location: Napa, CA

PostPosted: Thu Jul 21, 2011 10:51 pm    Post subject: Reply with quote

Dark Foo wrote:
http://www.gentoo.org/doc/en/openrc-migration.xml

look under network, about halfway down


Thank you -- I found the problem: I had the old style and somehow had missed the distinction of not having parenthesis when I reviewed the openrc-migration.xml weeks, if not months, earlier. Here's the revised file that works:
Code:
plug init.d # cat /etc/conf.d/net
# This blank configuration will automatically use DHCP for any net.*
# scripts in /etc/init.d.  To create a more complete configuration,
# please review /etc/conf.d/net.example and save your configuration
# in /etc/conf.d/net (this file :]!).

#
# Below is old style
# per http://www.gentoo.org/doc/en/openrc-migration.xml
#
#config_eth0=( "dhcp" )
config_eth0="dhcp"
plug init.d #
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum