Last updated: 2019-02-24
One thing I love about FreeBSD is you can do a fresh install and dump your config files into place and be done. Once you figure something out, you never have to do it again. Just use your configuation.
For this reason, I keep a script that copies all the system config files I have changed so I can reinstall if necessary. (I'm learning and breaking things!)
(These are not all the files I backup: I'll post my back script later.)
/boot/loader.conf (configures the kernel for the boot)
kern.geom.label.disk_ident.enable="0"
kern.geom.label.gptid.enable="0"
kern.vty=vt
hw.vga.textmode=1
# load linux and nvidia drivers at boot for best results; other modules can be loaded later
linux_load="YES"
nvidia-modeset_load="YES"
nvidia_load="YES"
# Devil worship in loader logo
loader_logo="beastie"
# Boot-time kernel tuning
kern.ipc.shmseg=1024
kern.ipc.shmmni=1024
kern.maxproc=100000
# Asynchronous I/O
aio_load="YES"
/etc/rc.conf (loads kernel modules and sets other things after the boot) (Looks like I have some redundancies in there.)
kld_list="acpi acpivideo coretemp zfs fuse mmc mmcsd sdhci libiconv \
libmchain cuse atapicam cd9660_iconv msdosfs_iconv snd_driver \
if_em if_ath if_ath_pci vboxdrv"
vboxnet_enable="YES"
samba_server_enable="YES"
zfs_enable="YES"
linux_enable="YES"
fusefs_enable="YES"
# for mounting and automounting
autofs_enable="YES"
fusefs_enable="YES"
devd_enable="YES"
devfs_system_ruleset="localrules"
sendmail_enable="NONE"
hostname="office"
background_dhclient="YES"
ifconfig_em0="inet 192.168.1.7 netmask 255.255.255.0"
defaultrouter="192.168.1.1"
#ifconfig_em0="DHCP"
#ifconfig_em0_ipv6="inet6 accept_rtadv"
# wlan
wlans_ath0="wlan0"
ifconfig_wlan0="WPA SYNCDHCP"
sshd_enable="YES"
moused_enable="YES"
ntpdate_enable="YES"
ntpd_enable="YES"
powerd_enable="YES"
tmpmfs="YES"
tmpsize="1024m"
tmpmfs_flags="-m 0 -o async,noatime -S -p 1777"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="NO"
#for x desktop environments
dbus_enable="YES"
hald_enable="NO"
fsck_y_enable="YES"
swapexd_enable="YES"
powerd_flags="-a hiadaptive -b adaptive -n adaptive"
mixer_enable="YES"
snddetect_enable="YES"
syslogd_flags="-c -ss"
clear_tmp_enable="YES"
clean_tmp_X="YES"
avahi_daemon_enable="YES"
# Enable BlueTooth
hcsecd_enable="YES"
sdpd_enable="YES"
# media keys through uhidd
uhidd_flags="-kmohs"
uhidd_enable="YES"
#printer
cupsd_enable="YES"
samba_server_enable="YES"
smartd_enable="YES"
/etc/sysctl.conf (sets some driver flags (or something))
# $FreeBSD: releng/12.0/sbin/sysctl/sysctl.conf 337624 2018-08-11 13:28:03Z brd $
#
# This file is read when going to multi-user and its contents piped thru
# ``sysctl'' to adjust kernel values. ``man 5 sysctl.conf'' for details.
#
# Uncomment this to prevent users from seeing information about processes that
# are being run under another UID.
#security.bsd.see_other_uids=0
security.bsd.unprivileged_read_msgbuf=0
security.bsd.unprivileged_proc_debug=0
#kern.randompid=1
vfs.zfs.min_auto_ashift=12
vfs.usermount=1
hw.acpi.reset_video=1
hw.acpi.sleep_button_state=S3
hw.acpi.power_button_state=S5
hw.acpi.sleep_delay=3
hw.acpi.verbose=1
hw.syscons.sc_no_suspend_vtswitch=0
# enhance the experience of FreeBSD on the desktop
# Enhance shared memory X11 interface
kern.ipc.shmmax=67108864
kern.ipc.shmall=32768
# Enhance desktop responsiveness under high CPU use (200/224)
kern.sched.preempt_thresh=224
# Bump up maximum number of open files
kern.maxfiles=200000
# Disable PC Speaker
hw.syscons.bell=0
# Shared memory for Chromium
kern.ipc.shm_allow_removed=1
#for virtualbox because aio
vfs.aio.max_buf_aio=8192
vfs.aio.max_aio_queue_per_proc=65536
vfs.aio.max_aio_per_proc=8192
vfs.aio.max_aio_queue=65536
Something need fixing? Contact me: