我重新制作了 Ubuntu 13.04 Live-CD 用于软件演示。在启动过程中,它会尝试寻找网络连接几分钟(但最终失败)。也许它没有正确检测到我的网卡(MacBook Pro)。对于实时系统,我不需要互联网连接。只有访问本地主机才是重要的。
如何防止系统配置网络/互联网连接,同时仍保留对本地主机的访问?
如果我无法关闭此功能,是否可以减少此配置过程的超时时间?
编辑:我忘了说我使用的是只有命令行的极简版 Ubuntu 13.04。因此,没有 GUI 组件会造成延迟。
编辑2:重制前的/etc/network/interfaces
Live-DVD 是
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
答案1
我假设它正在搜索无线接入点。通常,如果网络管理器无法检测到电缆,它就不会寻找以太网连接。我建议您从终端命令中确定无线驱动程序:
sudo lshw -C network
在许多 MacBook 中,驱动程序将显示为 b43-pci-bridge。如果您的情况如此,您实际上想要的是 b43。将您找到的无线驱动程序列入黑名单:
gksudo gedit /etc/modprobe.d/blacklist.conf
在最后添加一行:
blacklist driver
...在哪里司机是您在 lshw 中找到的无线驱动程序。
然后重新制作。
答案2
我通过编辑解决了这个问题/etc/init/failsafe.conf
,其中包含消息和延迟:
# failsafe
description "Failsafe Boot Delay"
author "Clint Byrum <[email protected]>"
start on filesystem and net-device-up IFACE=lo
stop on static-network-up or starting rc-sysinit
emits failsafe-boot
console output
script
# Determine if plymouth is available
if [ -x /bin/plymouth ] && /bin/plymouth --ping ; then
PLYMOUTH=/bin/plymouth
else
PLYMOUTH=":"
fi
# The point here is to wait for 2 minutes before forcibly booting
# the system. Anything that is in an "or" condition with 'started
# failsafe' in rc-sysinit deserves consideration for mentioning in
# these messages. currently only static-network-up counts for that.
sleep 20
# Plymouth errors should not stop the script because we *must* reach
# the end of this script to avoid letting the system spin forever
# waiting on it to start.
$PLYMOUTH message --text="Waiting for network configuration..." || :
sleep 40
$PLYMOUTH message --text="Waiting up to 60 more seconds for network configuration..." || :
sleep 59
$PLYMOUTH message --text="Booting system without full network configuration..." || :
# give user 1 second to see this message since plymouth will go
# away as soon as failsafe starts.
sleep 1
exec initctl emit --no-wait failsafe-boot
end script
post-start exec logger -t 'failsafe' -p daemon.warning "Failsafe of 120 seconds reached."
只需将xx
in替换sleep xx
为较小的值即可。也可以删除 sleep 命令。这不一定禁用网络接口,但可以减少系统尝试查找连接的时间。