How to disable an rc.conf tunable from CLI?

tobiasbp

Patron
Joined
Dec 2, 2015
Messages
238
I added the tunable:
Variable: watchdogd_enable
Value: NO (Or maybe "NO")
Type: rc.local

This makes my system reboot within a minute of booting. So I would like to remove/disable the tunable. I can not do this from the GUI, since the machine reboots.

I have now booted from a previous version af FreeNAS on my Boot USB stick. I have mountet the ZFS dataset holding the system with the tunable I want to remove. I can not seem to find it? I have looked id conf/base/etc and etc for the string watchdog.

Any ideas? How do I disable the tunable?

Thank you,
Tobias
 

tobiasbp

Patron
Joined
Dec 2, 2015
Messages
238
I realize i should probably have looked at /data/freenas-v1.db. It's a sqlite database I believe. I could probably have found , and disabled, my tunable in there.

I have since deleted the faulty system and upgraded again, so I have no need for this anymore.
 

Jetro

Cadet
Joined
Sep 13, 2016
Messages
5
I have a similar situation where i can only boot in the original version. system_tunable table seems empty when i look at it. anny help on removing bad tunables from the 'safe boot' ?
 

SMnasMAN

Contributor
Joined
Dec 2, 2018
Messages
177
anyone? im in this same situation myself (on a test system, but would like to know how you remove a bad turntable , so it wont keep getting applied at reboot, if you only have shell access) tks
 

SMnasMAN

Contributor
Joined
Dec 2, 2018
Messages
177
this is what i ended up having to do.... (maybe this would have worked: https://www.ixsystems.com/community/threads/setting-tunables-at-time-of-install.71985/post-504420 ,

but for those looking, this is what i ended up having to do (there *has* to be a better way):

Code:
[root@freenas /etc]# sqlite3fn
sqlite> .open /data/freenas-v1.db
sqlite> .tables

sqlite> SELECT * FROM system_tunable WHERE tun_enabled = 1 AND tun_type = 'sysctl' ORDER BY id;
10|2097152|sysctl||1|net.inet.tcp.sendspace
11|2048|sysctl||1|net.route.netisr_maxqlen
sqlite> PRAGMA table_info(system_tunable);
0|id|integer|1||1
1|tun_value|varchar(512)|1||0
2|tun_type|varchar(20)|1||0
3|tun_comment|varchar(100)|1||0
4|tun_enabled|bool|1||0
5|tun_var|varchar(128)|1||0
sqlite> update system_tunable set tun_enabled=0 where id=10;
sqlite> SELECT * FROM system_tunable WHERE tun_enabled = 1 AND tun_type = 'sysctl' ORDER BY id
   ...> ;
11|2048|sysctl||1|net.route.netisr_maxqlen
sqlite> update system_tunable set tun_enabled=0 where id=11;
sqlite> .quit
 
Top