Commit 1a3886b3 authored by Mike Hibler's avatar Mike Hibler

More complete fix for ensuring that the console is "sio1" for FBSD.

parent 730db7aa
......@@ -2070,20 +2070,18 @@ sub vnodePreConfig($$$$$){
if ($?);
#
# Put out the /boot/loader.conf header we look for in prepare
# Fix up loader.conf
#
if (open(LC, ">>$vnoderoot/boot/loader.conf")) {
#
# Put out the /boot/loader.conf header we look for in prepare
# and fix the console as "sio1".
#
print LC "# The remaining lines were added by Emulab slicefix.\n";
print LC "# DO NOT ADD ANYTHING AFTER THIS POINT AS IT WILL GET REMOVED.\n";
close(LC);
}
#
# In HVM the emulated RTC is UTC.
# Make sure FreeBSD knows that.
#
if ($vninfo->{'ishvm'}) {
unlink("$vnoderoot/etc/wall_cmos_clock");
print LC "console=\"comconsole\"\n";
print LC "comconsole_speed=\"115200\"\n";
print LC "comconsole_port=\"0x3F8\"\n";
#
# FreeBSD recommends this workaround for stability issues when
......@@ -2091,13 +2089,24 @@ sub vnodePreConfig($$$$$){
# HVM, I am just using $ishvm as it indicates a 10.x FreeBSD which
# is the only version which lists this problem in the errata.
#
mysystem("echo 'vfs.unmapped_buf_allowed=0' ".
">> $vnoderoot/boot/loader.conf");
# XXX we put this out after the magic header above so that it
# will get removed by prepare if we make an image.
#
if ($vninfo->{'ishvm'}) {
print LC "\n# when running in a Xen VM\n";
print LC "vfs.unmapped_buf_allowed=0\n";
}
close(LC);
}
#
# Make sure console is comconsole
# In HVM the emulated RTC is UTC.
# Make sure FreeBSD knows that.
#
mysystem("echo 'console=comconsole' >> $vnoderoot/boot/loader.conf");
if ($vninfo->{'ishvm'}) {
unlink("$vnoderoot/etc/wall_cmos_clock");
}
}
#
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment