From 826170041ed1096e9a629d49e20619270f3cb712 Mon Sep 17 00:00:00 2001 From: Andres Montalban Date: Wed, 24 Aug 2016 08:56:11 -0300 Subject: [PATCH] Speed up booting process for FreeBSD saving 10 seconds in boot time For more info check: https://www.freebsd.org/cgi/man.cgi?loader(8) autoboot_delay Number of seconds autoboot will wait before booting. Ifthis variableis not defined,autoboot will default to 10 seconds. If set to NO'', no autoboot will be automatically attempted after processing/boot/loader.rc, thoughexplicit autoboot's will be processed normally, defaulting to 10 seconds delay. If set to 0'',no delay will be inserted, but user still will be able to interrupt autoboot process and escapeinto the interactive modeby pressing some key onthe console while ker- nel and modules are being loaded. If set to -1'', no delay will be inserted and loader will engage interactive mode only if autoboothas failed for some reason. --- scripts/freebsd/vmtools.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/freebsd/vmtools.sh b/scripts/freebsd/vmtools.sh index ad5962ab4..766222d1a 100644 --- a/scripts/freebsd/vmtools.sh +++ b/scripts/freebsd/vmtools.sh @@ -23,6 +23,9 @@ virtualbox-iso|virtualbox-ovf) echo 'virtio_balloon_load="YES"' >>/boot/loader.conf; echo 'if_vtnet_load="YES"' >>/boot/loader.conf; + # Don't waste 10 seconds waiting for boot + echo 'autoboot_delay="-1"' >>/boot/loader.conf; + echo 'ifconfig_vtnet0_name="em0"' >>/etc/rc.conf; echo 'ifconfig_vtnet1_name="em1"' >>/etc/rc.conf; echo 'ifconfig_vtnet2_name="em2"' >>/etc/rc.conf;