View previous topic :: View next topic |
Author |
Message |
Efo Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/167676031444189fdd57b4b.jpg)
Joined: 23 Jun 2005 Posts: 498
|
Posted: Thu Aug 24, 2006 10:07 pm Post subject: net.eth0 starts at boot [SOLVED] |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
babudro n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/211485400246253df055f92.jpg)
Joined: 30 Sep 2005 Posts: 35 Location: Canada
|
Posted: Thu Aug 24, 2006 11:42 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
Suer7reus Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 26 Nov 2003 Posts: 106
|
Posted: Thu Aug 24, 2006 11:44 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
Efo Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/167676031444189fdd57b4b.jpg)
Joined: 23 Jun 2005 Posts: 498
|
Posted: Sun Aug 27, 2006 6:06 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
Aurisor Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/2852895764556a27de1705.jpg)
Joined: 20 Sep 2003 Posts: 361 Location: Boston MA
|
Posted: Sun Aug 27, 2006 6:26 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
swimmer Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/2582886303ece267a916fa.jpg)
Joined: 15 Jul 2002 Posts: 1330 Location: Netherlands
|
Posted: Sun Aug 27, 2006 10:17 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
homry Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 01 Apr 2005 Posts: 146 Location: Karlsruhe, Germany
|
Posted: Sun Aug 27, 2006 11:41 am Post subject: Re: net.eth0 starts at boot |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
swimmer Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/2582886303ece267a916fa.jpg)
Joined: 15 Jul 2002 Posts: 1330 Location: Netherlands
|
Posted: Sun Aug 27, 2006 12:06 pm Post subject: |
|
|
Did you try what I suggested?
Greetz
swimmer |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
homry Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 01 Apr 2005 Posts: 146 Location: Karlsruhe, Germany
|
Posted: Sun Aug 27, 2006 1:04 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
TheNewb Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 10 Jun 2005 Posts: 183
|
Posted: Mon Aug 28, 2006 1:24 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
frodoontop Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 19 Jan 2004 Posts: 86
|
Posted: Mon Aug 28, 2006 4:49 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
homry Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 01 Apr 2005 Posts: 146 Location: Karlsruhe, Germany
|
Posted: Sat Sep 02, 2006 12:42 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
Efo Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/167676031444189fdd57b4b.jpg)
Joined: 23 Jun 2005 Posts: 498
|
Posted: Thu Oct 05, 2006 3:48 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
|