Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
net.eth0 starts at boot [SOLVED]
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
Efo
Guru
Guru


Joined: 23 Jun 2005
Posts: 498

PostPosted: Thu Aug 24, 2006 10:07 pm    Post subject: net.eth0 starts at boot [SOLVED] Reply with quote

Hi guys,

Since I updated my box, net.eth0 starts at boot.
I dont want it to start at boot because if I am not connectet through my ethernet card the system takes forever to boot looking for a connection on net.eth0.
I used to have it in m rc-update but now it doesnt show there and I dont know where to look for it.

Any idea?

Thanks

Efo


Last edited by Efo on Thu Oct 05, 2006 3:49 pm; edited 1 time in total
Back to top
View user's profile Send private message
babudro
n00b
n00b


Joined: 30 Sep 2005
Posts: 35
Location: Canada

PostPosted: Thu Aug 24, 2006 11:42 pm    Post subject: Reply with quote

I don't know why it auto-starts all the Ethernet ports, but I got past it quickly by just setting an unused bogus address (in /etc/conf.d/net) for the ports I don't want to start automatically.

Something like: config_eth0=("192.168.255.1/32")

It's not the best solution, but if you're short on time and need a quick fix it gets the job done.
Back to top
View user's profile Send private message
Suer7reus
Tux's lil' helper
Tux's lil' helper


Joined: 26 Nov 2003
Posts: 106

PostPosted: Thu Aug 24, 2006 11:44 pm    Post subject: Reply with quote

If you've already used
Code:
rc-update del net.eth0 default
and it still starts, it's likely being caused to start by some service that depends on it for whatever reason. You may be able to disable this sort of behavior in /etc/conf.d/rc, particularly the "strict net checking" and hotplug-related options.

Those may be a good idea, but there are several alternatives you should consider first as it will be inconvenient (just a little bit) to have to start net.eth0 manually.

First, consider installing sys-apps/ifplugd or sys-apps/netplugd, which add cable-detection functionality to Gentoo's net init-scripts. Basically, your system would only sit and wait for dhcp to do it's thing if it detected a network cable plugged-in. Also, upon insertion of a cable, your system would automatically bring the interface up in the background. What's more, those should activate automatically upon installation on the newer baselayout versions. If you do this, you ought to re-add net.eth0 to your default runlevel since it won't cause a delay any longer.

Second, consider lowering your DHCP request timeout. dhcpcd (the default DHCP client) defaults to wait one minute before giving up when no response is received. If you're using dhcpcd (probably), the command-line argument is -t #, where # is a number of seconds. 20 should be plenty, IMO. You can make the necessary configuration change in /etc/conf.d/net, adding
Code:
dhcpcd_eth0="-t 20"
if you have a newer baselayout.

If in doubt, you can read /etc/conf.d/net.example.
Back to top
View user's profile Send private message
Efo
Guru
Guru


Joined: 23 Jun 2005
Posts: 498

PostPosted: Sun Aug 27, 2006 6:06 am    Post subject: Reply with quote

Thank you guys for the tricks, but before I use any of them I would really like to know what is starting my eth0.

I checked my rc file and I have:

RC_NET_STRICT_CHECKING="no" (also tried with none)
RC_HOTPLUG="no"

I think this happened around the time ppp got updated... mhhh... any other idea on how I can find what is starting it?

Here is my rc-update show
alsasound | default
bootmisc | boot
checkfs | boot
checkroot | boot
clock | boot
coldplug | boot
consolefont | boot
cupsd | default
hostname | boot
hsf | default
keymaps | boot
local | default
localmount | boot
modules | boot
net.lo | boot
netmount | default
rmnologin | boot
urandom | boot
xinetd | boot
Back to top
View user's profile Send private message
Aurisor
Guru
Guru


Joined: 20 Sep 2003
Posts: 361
Location: Boston MA

PostPosted: Sun Aug 27, 2006 6:26 am    Post subject: Reply with quote

I personally would go with Suer7reus's suggestions....you have a network card in your computer....why simply disable it when you can just have it ready to go at a moment's notice?

Of course, though, I totally respect your desire to get to the root of the problem first.

You can try this for starters (you may have to be root):

Code:

/etc/init.d/net.eth0 needsme


That will tell you if any of your services depend on having a net connection.
Back to top
View user's profile Send private message
swimmer
Veteran
Veteran


Joined: 15 Jul 2002
Posts: 1330
Location: Netherlands

PostPosted: Sun Aug 27, 2006 10:17 am    Post subject: Reply with quote

Not that I understand too much about this issue but it seems to have to do with {hot,cold}plug ... this is what I put into my /etc/conf.d/rc:
Quote:
# Some people want a finer grain over hotplug/coldplug. RC_PLUG_SERVICES is a
# list of services that are matched in order, either allowing or not. By
# default we allow services through as RC_COLDPLUG/RC_HOTPLUG has to be yes
# anyway.
# Example - RC_PLUG_SERVICES="net.wlan !net.*"
# This allows net.wlan and any service not matching net.* to be plugged.

RC_PLUG_SERVICES="!net.*"

and it prevents the net.* devices from starting up at boot.

HTH
swimmer
Back to top
View user's profile Send private message
homry
Tux's lil' helper
Tux's lil' helper


Joined: 01 Apr 2005
Posts: 146
Location: Karlsruhe, Germany

PostPosted: Sun Aug 27, 2006 11:41 am    Post subject: Re: net.eth0 starts at boot Reply with quote

Efo wrote:
Hi guys,

Since I updated my box, net.eth0 starts at boot.
I dont want it to start at boot because if I am not connectet through my ethernet card the system takes forever to boot looking for a connection on net.eth0.
I used to have it in m rc-update but now it doesnt show there and I dont know where to look for it.

Any idea?

Thanks

Efo

same here. since my last update of dhcpcd and baselayout. also my wireless connection wont work anymore with wep encryp on.

homry
_________________
IBM ThinkPad R51
Back to top
View user's profile Send private message
swimmer
Veteran
Veteran


Joined: 15 Jul 2002
Posts: 1330
Location: Netherlands

PostPosted: Sun Aug 27, 2006 12:06 pm    Post subject: Reply with quote

Did you try what I suggested?

Greetz
swimmer
Back to top
View user's profile Send private message
homry
Tux's lil' helper
Tux's lil' helper


Joined: 01 Apr 2005
Posts: 146
Location: Karlsruhe, Germany

PostPosted: Sun Aug 27, 2006 1:04 pm    Post subject: Reply with quote

not yet, but i will. although i would like to have net.eth1 to be started at boot.

homry
_________________
IBM ThinkPad R51
Back to top
View user's profile Send private message
TheNewb
Apprentice
Apprentice


Joined: 10 Jun 2005
Posts: 183

PostPosted: Mon Aug 28, 2006 1:24 pm    Post subject: Reply with quote

The advice worked totally for me! Thanks.

As near as I can tell, keeping net.eth1 started is as simple as using this instead:
Code:

RC_PLUG_SERVICES="net.eth1 !net.*"

_________________
#define struct union /* A Real space saver! :) */
Back to top
View user's profile Send private message
frodoontop
Tux's lil' helper
Tux's lil' helper


Joined: 19 Jan 2004
Posts: 86

PostPosted: Mon Aug 28, 2006 4:49 pm    Post subject: Reply with quote

Otherwise you can try to delete /etc/init.d/net.eth0 if it is not used anyway. It's only a symlink to net.lo.
_________________
Rubyripper, a secure audio ripper for linux. Look at the wiki page http://wiki.hydrogenaudio.org/index.php?title=Rubyripper for technical and developer info, screenshots and discussion about it's future.
Back to top
View user's profile Send private message
homry
Tux's lil' helper
Tux's lil' helper


Joined: 01 Apr 2005
Posts: 146
Location: Karlsruhe, Germany

PostPosted: Sat Sep 02, 2006 12:42 pm    Post subject: Reply with quote

but before the last update of baselayout it was pretty simple. i had links to net.lo (net.eth0 and net.eth1). i chose what i wanted to load at boot time by adding the desired init script to the default runlevel. this was easy. now both devices get started over net.lo (eth0 and eth1) at boot time (net.lo which is in the boot runlevel). basically, my known way of choosing the device which should be plugged at boot time changed from adding init scripts to runlevels to editing /etc/conf.d/rc ?

homry
_________________
IBM ThinkPad R51
Back to top
View user's profile Send private message
Efo
Guru
Guru


Joined: 23 Jun 2005
Posts: 498

PostPosted: Thu Oct 05, 2006 3:48 pm    Post subject: Reply with quote

Hi guys!

Sorry it took so long, but I have been away for a month.
Anyway, the solution suggested by swimmer works! (RC_PLUG_SERVICES="!net.*")

Thanks everybody!

Efo
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