aboutsummaryrefslogtreecommitdiff
path: root/scripts/os/freebsd/10-bootloader
blob: a5c89088e3d6827dde77487871044c4c9b34cc80 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/sh

# Skip this file if running in a jail - jails don't have a bootloader.
if [ "$BOXCONF_VIRTUALIZATION_TYPE" = jail ]; then
  return
fi

# Configure serial console.
install_file -m 0644 /boot.config
install_file -m 0644 /etc/ttys
kill -HUP 1

set_loader_conf \
  autoboot_delay=3 \
  beastie_disable=YES \
  cc_htcp_load=YES \
  kern.geom.label.disk_ident.enable=0 \
  kern.geom.label.gptid.enable=0 \
  net.inet.tcp.soreceive_stream=1 \
  net.inet6.ip6.auto_linklocal=0 \
  net.isr.defaultqlimit=2048 \
  net.link.ifqmaxlen=2048 \
  pf_load=YES \
  pflog_load=YES \
  security.bsd.allow_destructive_dtrace=0

if [ "$BOXCONF_VIRTUALIZATION_TYPE" = none ] && [ "$enable_serial_console" = true ]; then
  set_loader_conf \
    boot_multicons=YES \
    boot_serial=YES \
    console=comconsole,efi \
    comconsole_speed=115200
fi