Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
最近更新了一次系统,之后网卡会开机自动启动,dhcpcd也会跟着启动,导致开机慢,怎么解决?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index 中文 (Chinese)
View previous topic :: View next topic  
Author Message
Crazy_Jerry
n00b
n00b


Joined: 08 May 2012
Posts: 44

PostPosted: Wed Dec 19, 2012 11:18 am    Post subject: 最近更新了一次系统,之后网卡会开机自动启动,dhcpcd也会跟着启动,导致开机慢,怎么解决? Reply with quote

runlevel的几个目录里都没有设置网卡和dhcpcd的启动,我希望每次开机时手动启动网卡。怎么解决呢?如果解决不了的话,由于本人英语不太好,所以请看到的朋友帮忙在英文板块发个帖子问一下,谢谢了。
_________________
God be with us !
Back to top
View user's profile Send private message
shanpo
n00b
n00b


Joined: 06 Oct 2012
Posts: 12

PostPosted: Sat Dec 22, 2012 5:04 pm    Post subject: Reply with quote

如果init是openrc,可以将网络相关服务从rc.service中去除,代码:rc-update show可以列出所有启动项;不过,如果配置正确,网络初始化速度并不慢。当然,加快启动速度,systemd是王道。
Back to top
View user's profile Send private message
Crazy_Jerry
n00b
n00b


Joined: 08 May 2012
Posts: 44

PostPosted: Sun Dec 23, 2012 3:47 am    Post subject: Reply with quote

shanpo wrote:
如果init是openrc,可以将网络相关服务从rc.service中去除,代码:rc-update show可以列出所有启动项;不过,如果配置正确,网络初始化速度并不慢。当然,加快启动速度,systemd是王道。


用的是openrc, rc-update 里没有网卡和dhcpcd的启动项,而且,把dhcpcd这个软件删掉之后,还是会启动dhcp寻找IP。启动速度并不慢,就是启动的时候dhcp会寻找dhcp服务器,所以会导致慢。

我在这儿也发了贴,帮忙看看吧。
Code:

http://forums.gentoo.org/viewtopic-t-945484.html

_________________
God be with us !
Back to top
View user's profile Send private message
shanpo
n00b
n00b


Joined: 06 Oct 2012
Posts: 12

PostPosted: Sun Dec 23, 2012 3:26 pm    Post subject: Reply with quote

你发的英文帖子我看了,抱歉,我E文太差,不过你贴的rc服务中确实没有加载net组件。

我有过dhcp过程缓慢的经历,那是我用busybox建立的initramfs中,在ramfs中启动网络及dhcp时,Busybox comes with a minimalistic DHCP client called udhcpc,udhcpc运行时长时间搜索dhcp服务,系统也停止在这里,但此时实际根文件系统还未加载。

在实际根文件系统中,dhcpcd运行时不会阻止其它进程运行,所以启动dhcp客户不会影响启动过程。

运行dmesg检查下dhcp在什么时候加载的。
Back to top
View user's profile Send private message
Crazy_Jerry
n00b
n00b


Joined: 08 May 2012
Posts: 44

PostPosted: Mon Dec 24, 2012 2:25 am    Post subject: Reply with quote

shanpo wrote:
你发的英文帖子我看了,抱歉,我E文太差,不过你贴的rc服务中确实没有加载net组件。

我有过dhcp过程缓慢的经历,那是我用busybox建立的initramfs中,在ramfs中启动网络及dhcp时,Busybox comes with a minimalistic DHCP client called udhcpc,udhcpc运行时长时间搜索dhcp服务,系统也停止在这里,但此时实际根文件系统还未加载。

在实际根文件系统中,dhcpcd运行时不会阻止其它进程运行,所以启动dhcp客户不会影响启动过程。

运行dmesg检查下dhcp在什么时候加载的。
Code:
 代码:rc default logging started at Fri Dec 21 12:34:11 2012  * Starting syslog-ng ...  [ ok ]  * Starting acpid ...  [ ok ]  * Bringing up interface eth0  *   No configuration specified; defaulting to DHCP  *   dhcp ...  *     Running udhcpc ...  *     start-stop-daemon: failed to start `/bin/busybox'  [ !! ]  [ !! ]  * ERROR: net.eth0 failed to start  * ERROR: cannot start netmount as net.eth0 would not start  * Doing udev cleanups  * Starting vixie-cron ...  [ ok ]  * Starting local  [ ok ] rc default logging stopped at Fri Dec 21 12:34:22 2012 

_________________
God be with us !
Back to top
View user's profile Send private message
druggo
Apprentice
Apprentice


Joined: 24 Sep 2003
Posts: 289
Location: Hangzhou, China

PostPosted: Wed Jan 16, 2013 6:08 am    Post subject: Reply with quote

配置一下 /etc/conf.d/net:
config_eth0="null"
_________________
HighWayToHell(blog)
http://blog.druggo.org/
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index 中文 (Chinese) 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