Ubuntu boot: "Waiting for full network configuration..."

Abstract
Let's assume that you are the ubuntu user. Have you ever stumbled upon messages: 
"Waiting for network configuration...", 
"Waiting up to 60 more seconds for network configuration...", 
"Booting system without full network configuration..." during machine boot, especially if you set one/some network interfaces to a static mode? If you set your network correctly, 
you have everything fine, all interfaces defined correctly but messages still appear, well, here is the best cure for it.
Solution
So, if you want to get rid of these messages and you don't want your computer to boot slower than normal boot, here is what you should do:
1). Switch to a root user, run in a terminal: $ sudo su -
2). After that open file for an edit: # vim /etc/init/failsafe.conf
3). The file's internals should look similar to this:
# failsafe

description "Failsafe Boot Delay"
author "Clint Byrum <clint@ubuntu.com>"

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."
Did you notice the messages (highlighted) in the file which you see during your slow machine boot? And do you see what goes after these messages? Command sleep - it is a delay for specified time. So, what we can do? We can decrease the time of delay for all the sleeps, and we can remove this "happy" messages.

So, here is the edited version of /etc/init/failsafe.conf:
# failsafe

description "Failsafe Boot Delay"
author "Clint Byrum <clint@ubuntu.com>"

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 1

    # 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 5
    exec initctl emit --no-wait failsafe-boot
end script

post-start exec logger -t 'failsafe' -p daemon.warning "Failsafe of 120 seconds reached."
As you have already noticed we removed two messages and decreased time to total: 6 seconds. So, now computer should boot faster.

Comments

Popular Posts