Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] net.eth0 launching itself during boot
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
arcfxn
n00b
n00b


Joined: 31 Jan 2011
Posts: 74
Location: NY, USA

PostPosted: Sat Apr 09, 2011 2:30 am    Post subject: [SOLVED] net.eth0 launching itself during boot Reply with quote

The short description is as follows:

net.eth0 isn't specified in any runlevel, but it starts during boot anyway. I have my own script to connect via wlan0 after boot, as there is no wired connection. This is a major problem for me, because net.eth0 hangs for a while after starting dhcpcd, and I have to wait for it to give up.

I can't make sense of why this is happening, but I did notice that there is a message during boot that refers to net.eth0 as a "device initiated service." I'm not sure what that means. Hope you guys can shed some light here, thanks in advance.

Code:
rc-update -s
           alsasound | boot                         
            bootmisc | boot                         
             checkfs | boot                         
           checkroot | boot                         
               clock | boot                         
         consolefont | boot                         
               cupsd |      default                 
                dbus |      default                 
               dcron |      default                 
                 gpm |      default                 
                hald |      default                 
            hostname | boot                         
             keymaps | boot                         
               local |      default nonetwork       
          localmount | boot                         
             modules | boot                         
              net.lo | boot                         
           rmnologin | boot                         
           syslog-ng |      default                 
      udev-postmount |      default                 
             urandom | boot                         
                 xdm |      default


Last edited by arcfxn on Sat Apr 16, 2011 2:30 am; edited 1 time in total
Back to top
View user's profile Send private message
Adwin
Tux's lil' helper
Tux's lil' helper


Joined: 13 Mar 2005
Posts: 128
Location: Poland

PostPosted: Sat Apr 09, 2011 2:59 pm    Post subject: Reply with quote

Try blacklisting it in udev rules.
Once udev kicks in, it basically pulls the interface up, and net.lo (net.eth* is only a symlink) takes care of the rest.
Back to top
View user's profile Send private message
cach0rr0
Bodhisattva
Bodhisattva


Joined: 13 Nov 2008
Posts: 4123
Location: Houston, Republic of Texas

PostPosted: Sat Apr 09, 2011 6:07 pm    Post subject: Reply with quote

delete the net.eth0 init script
not joking
_________________
Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash
Back to top
View user's profile Send private message
chithanh
Developer
Developer


Joined: 05 Aug 2006
Posts: 2152
Location: Berlin, Germany

PostPosted: Sat Apr 09, 2011 6:13 pm    Post subject: Reply with quote

If you use baselayout-1, blacklist net.eth0 in rc configuration
/etc/conf.d/rc:
RC_PLUG_SERVICES="!net.eth0"

Alternatively you can make net.eth0 fail immediately in preup() if no cable is connected. See net.example for instructions.
Back to top
View user's profile Send private message
arcfxn
n00b
n00b


Joined: 31 Jan 2011
Posts: 74
Location: NY, USA

PostPosted: Sun Apr 10, 2011 6:50 pm    Post subject: Reply with quote

Adwin wrote:
Try blacklisting it in udev rules.
Once udev kicks in, it basically pulls the interface up, and net.lo (net.eth* is only a symlink) takes care of the rest.


I think I'll try that, but I'm not really sure how udev works.

cach0rr0 wrote:
delete the net.eth0 init script
not joking


I'd be really scared to do that.

chithanh wrote:
If you use baselayout-1, blacklist net.eth0 in rc configuration
/etc/conf.d/rc:
RC_PLUG_SERVICES="!net.eth0"

Alternatively you can make net.eth0 fail immediately in preup() if no cable is connected. See net.example for instructions.


Making it fail immediately w/o a cable sounds like a nice way to do things, but idk how easy that would be. I'll check it out I guess.
Back to top
View user's profile Send private message
arcfxn
n00b
n00b


Joined: 31 Jan 2011
Posts: 74
Location: NY, USA

PostPosted: Sun Apr 10, 2011 6:57 pm    Post subject: Reply with quote

It almost seems like you guys are competing with these solutions. I'm not really sure which to employ.
Back to top
View user's profile Send private message
cach0rr0
Bodhisattva
Bodhisattva


Joined: 13 Nov 2008
Posts: 4123
Location: Houston, Republic of Texas

PostPosted: Sun Apr 10, 2011 11:26 pm    Post subject: Reply with quote

arcfxn wrote:

I'd be really scared to do that.


/etc/init.d/net.eth0 is just a symlink to /etc/init.d/net.lo
if later on you decide you want a net.eth0 init script:
Code:

cd /etc/init.d/
ln -s net.lo net.eth0


arcfxn wrote:

It almost seems like you guys are competing with these solutions. I'm not really sure which to employ.


any of these solutions should work, depending on your setup. None of the suggested solutions have any real risk.

You can also look in /etc/conf.d/rc (for baselayout-2 - his suggestion was for baselayout-1), and play with:

Code:

RC_NET_STRICT_CHECKING="lo"


See the comments in that file to see what each does, but I would change it from 'no' to 'lo' in your case.

If all of the "cleaner" methods do not help, you always have the option of deleting /etc/init.d/net.eth0
_________________
Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash
Back to top
View user's profile Send private message
arcfxn
n00b
n00b


Joined: 31 Jan 2011
Posts: 74
Location: NY, USA

PostPosted: Fri Apr 15, 2011 5:46 am    Post subject: Reply with quote

Thanks, I've tried removing the symlink. I'll let you know if it worked next time I reboot.
Back to top
View user's profile Send private message
arcfxn
n00b
n00b


Joined: 31 Jan 2011
Posts: 74
Location: NY, USA

PostPosted: Sat Apr 16, 2011 2:28 am    Post subject: Reply with quote

That did it, and boot time has decreased dramatically. Thanks a million cach0rr0 et al.

Changing topic to solved.

I'm wondering though, why was this necessary / why was it happening in the first place?


Last edited by arcfxn on Tue Apr 19, 2011 2:59 am; edited 1 time in total
Back to top
View user's profile Send private message
cach0rr0
Bodhisattva
Bodhisattva


Joined: 13 Nov 2008
Posts: 4123
Location: Houston, Republic of Texas

PostPosted: Sat Apr 16, 2011 7:56 pm    Post subject: Reply with quote

arcfxn wrote:

I'm wondering though, why was this necessary / why was it happening in the first place?


not completely awake so i have to give a short/abbreviated answer
from what i remember, it had something to do with services that had "need net" defined in their init scripts; for some reason the system seemed to think that net.lo was insufficient to provide net. Basically net.eth0 was seen as a dependency for providing the net service, so it got started up. I don't know if this is because everything in init.d that had "provide net" gets auto-started, or which, but it's the same sort of deal as when you have a service that has e.g. "need nfs", when you start that service, it'll start the nfsmount service (or, whatever does "provide nfs").

Someone else can probably explain it more correctly or accurately, but it's along those lines.
_________________
Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash
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