# Reload loader.conf



## usakhncit (Aug 22, 2019)

Hi
If I change any value in /boot/loader.conf then is it necessary to reboot system? Or can the value (or loader.conf) be reloaded without rebooting?
Thanks


----------



## SirDice (Aug 22, 2019)

That file is loaded and parsed by loader(8). The only time it gets executed is during the boot phase.


----------



## usakhncit (Aug 22, 2019)

So, is there any other way to load new values on the fly, like:
hw.psm.elantech.min_pressure="45"


----------



## SirDice (Aug 22, 2019)

Those are sysctl(8) and shouldn't go in loader.conf but /etc/sysctl.conf. Most sysctl(8) [*] can be changed on the fly: `sysctl hw.psm.elantech.min_pressure="45"`.

[*] Some are read-only and some can only be set _before_ the kernel is loaded. Those need to go in loader.conf.


----------



## usakhncit (Aug 22, 2019)

When I put these values in /etc/sysctl.conf, system gives error:
sysctl: Tuneable values are set in /boot/loader.conf


----------



## SirDice (Aug 23, 2019)

Bugger, this is one of those sysctls that need to be set before boot. So it does need to go in loader.conf.


----------



## olli@ (Aug 23, 2019)

The easiest way to reload /boot/loader.conf is the command `shutdown -r now`.


----------



## George (Aug 27, 2019)

How about `kenv` (1), instead of sysctl?

```
kenv hw.psm.elantech.min_pressure=45
```


----------



## olli@ (Aug 27, 2019)

Elazar said:


> How about `kenv` (1), instead of sysctl?
> 
> ```
> kenv hw.psm.elantech.min_pressure=45
> ```


You cannot change read-only tunables once the kernel has booted. Even if the value is changed in the environment, the new value is not picked up by the driver.


----------

