diff options
Diffstat (limited to 'root_scripts')
| -rwxr-xr-x | root_scripts/system_boot_config.sh | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/root_scripts/system_boot_config.sh b/root_scripts/system_boot_config.sh index 9e54037..5e1ae2f 100755 --- a/root_scripts/system_boot_config.sh +++ b/root_scripts/system_boot_config.sh @@ -1,6 +1,6 @@ #!/bin/sh # Craig Jennings <c@cjennings.net> -# speeds and tidies the boot sequence +# optimizes and enables functionality in the boot sequence # ensure root if ! [ $(id -u) -eq 0 ] @@ -30,3 +30,39 @@ sed -i '' 's#/dev/console#/var/log/console.log#' /etc/syslog.conf # prevent core dumps echo "kern.coredump=0" >> /etc/sysctl.conf + +# enable linuxulator +sysrc -v linux_enable=YES + +# load microcode +sysrc -f /boot/loader.conf cpu_microcode_load="YES" +sysrc -f /boot/loader.conf cpu_microcode_name="/boot/firmware/intel-ucode.bin" + +# Enable querying CPU information and temperature. +sysrc -f /boot/loader.conf cpuctl_load="YES" +sysrc -f /boot/loader.conf coretemp_load="YES" + +# Optimizations for Intel graphics. +echo 'compat.linuxkpi.i915_enable_fbc="1"' | sudo tee -a /boot/loader.conf +echo 'compat.linuxkpi.i915_fastboot="1"' | sudo tee -a /boot/loader.conf + +# Power saving for Intel graphics. +echo 'compat.linuxkpi.i915_disable_power_well="1"' | sudo tee -a /boot/loader.conf +echo 'compat.linuxkpi.i915_enable_dc="2"' | sudo tee -a /boot/loader.conf + +# Allow unprivileged users to mount +echo 'vfs.usermount=1' | sudo tee -a /etc/sysctl.conf + +# Increase ZFS transaction timeout to save battery. +echo 'vfs.zfs.txg.timeout="10"' | sudo tee -a /boot/loader.conf + +# fuse filesystems +sysrc kld_list="${kld_list} fusefs" + +# allow for usb mounting (e.g., kobo reader) +pw groupadd usb +pw groupmod usb -m root,cjennings +echo "[usb=12]" | tee -a /etc/devfs.rules +echo "add path 'usb/*' mode 0660 group usb" | tee -a /etc/devfs.rules +sysrc devfs_system_ruleset="usb" +service devfs restart |
