1 SYSTEM(4) File Formats and Configurations SYSTEM(4) 2 3 4 5 NAME 6 system - system configuration information file 7 8 DESCRIPTION 9 The system file is used for customizing the operation of the operating 10 system kernel. The recommended procedure is to preserve the original 11 system file before modifying it. 12 13 14 It is not recommended to edit the /etc/system file directly but rather 15 to deliver configuration fragments into files under /etc/system.d; 16 files in this directory are combined in alphabetical order and read by 17 the kernel before /etc/system is processed. Directives in /etc/system 18 therefore take precedence over any settings delivered in fragment 19 files. 20 21 22 The recommended naming schema for the fragment files is to use the name 23 of the package which is delivering the file with '/' characters 24 replaced by ':'; file names that start with a dot (.) will be ignored. 25 26 27 If /etc/system.d/ exists and contains any fragment files, then the 28 directory must also be writable or it will not be possible to create or 29 update the system boot archive. 30 31 32 The system file contains commands which are read by the kernel during 33 initialization and used to customize the operation of your system. 34 These commands are useful for modifying the system's treatment of its 35 loadable kernel modules. 36 37 38 The syntax of the system file consists of a list of keyword/value pairs 39 which are recognized by the system as valid commands. Comment lines 40 must begin with an asterisk (*) or a hash mark (#) and end with a 41 newline character. All commands are case-insensitive except where 42 noted. 43 44 45 Commands that modify the system's operation with respect to loadable 46 kernel modules require you to specify the module type by listing the 47 module's namespace. The following namespaces are currently supported on 48 all platforms: 49 50 drv 51 Modules in this namespace are device drivers. 52 53 54 exec 55 Modules in this namespace are execution format modules. The 56 following exec modules are currently provided: 57 58 Only on SPARC system: 59 60 aoutexec 61 62 63 64 65 Only on x86 system: 66 67 coffexec 68 69 70 71 72 On SPARC and IA systems: 73 74 elfexec 75 intpexec 76 javaexec 77 78 79 80 81 82 firmware 83 Raw firmware images in subdirectories, one for each device 84 driver module using firmload(9F). 85 86 87 fs 88 These modules are filesystems. 89 90 91 sched 92 These modules implement a process scheduling algorithm. 93 94 95 strmod 96 These modules are STREAMS modules. 97 98 99 sys 100 These modules implement loadable system-call modules. 101 102 103 misc 104 These modules do not fit into any of the above categories, so 105 are considered "miscellaneous" modules. 106 107 108 109 SPARC only: 110 111 dacf 112 These modules provide rules and actions for device auto- 113 configuration. 114 115 116 tod 117 These modules provide support for the time of day hardware. 118 119 120 cpu 121 These modules provide CPU-specific kernel routines. 122 123 124 125 A description of each of the supported commands follows: 126 127 exclude: <namespace>/<modulename> 128 129 Do not allow the listed loadable kernel module to be loaded. 130 exclude commands are cumulative; the list of modules to exclude is 131 created by combining every exclude entry in the system file. 132 133 134 include: <namespace>/<modulename> 135 136 Include the listed loadable kernel module. This is the system's 137 default, so using include does not modify the system's operation. 138 include commands are cumulative. 139 140 141 forceload: <namespace>/<modulename> 142 143 Force this kernel module to be loaded during kernel initialization. 144 The default action is to automatically load the kernel module when 145 its services are first accessed. forceload commands are cumulative. 146 147 148 rootdev: <device name> 149 150 Set the root device to the listed value instead of using the 151 default root device as supplied by the boot program. 152 153 154 rootfs: <root filesystem type> 155 156 Set the root filesystem type to the listed value. 157 158 159 moddir: <first module path>[[{:, }<second ...>]...] 160 161 Set the search path for loadable kernel modules. This command 162 operates very much like the PATH shell variable. Multiple 163 directories to search can be listed together, delimited either by 164 blank spaces or colons. 165 166 167 set [<module>:]<symbol> {=, |, &} [~][-]<value> 168 169 Set an integer or character pointer in the kernel or in the 170 selected kernel module to a new value. This command is used to 171 change kernel and module parameters and thus modify the operation 172 of your system. Assignment operations are not cumulative, whereas 173 bitwise AND and OR operations are cumulative. 174 175 Operations that are supported for modifying integer variables are: 176 simple assignment, inclusive bitwise OR, bitwise AND, one's 177 complement, and negation. Variables in a specific loadable module 178 can be targeted for modification by specifying the variable name 179 prefixed with the kernel module name and a colon (:) separator. 180 Values can be specified as hexadecimal (0x10), Octal (046), or 181 Decimal (5). 182 183 The only operation supported for modifying character pointers is 184 simple assignment. Static string data such as character arrays 185 cannot be modified using the set command. Use care and ensure that 186 the variable you are modifying is in fact a character pointer. The 187 set command is very powerful, and will likely cause problems if 188 used carelessly. The following escape sequences are supported 189 within the quoted string: 190 191 \n (newline) 192 \t (tab) 193 \b (backspace) 194 195 196 197 198 EXAMPLES 199 Example 1 A sample system file. 200 201 202 The following is a sample system file. 203 204 205 * Force the ELF exec kernel module to be loaded during kernel 206 * initialization. Execution type modules are in the exec namespace. 207 forceload: exec/elfexec 208 * Change the root device to /sbus@1,f8000000/esp@0,800000/sd@3,0:a. 209 * You can derive root device names from /devices. 210 * Root device names must be the fully expanded Open Boot Prom 211 * device name. This command is platform and configuration specific. 212 * This example uses the first partition (a) of the SCSI disk at 213 * SCSI target 3 on the esp host adapter in slot 0 (on board) 214 * of the SBus of the machine. 215 * Adapter unit-address 3,0 at sbus unit-address 0,800000. 216 rootdev: /sbus@1,f8000000/esp@0,800000/sd@3,0:a 217 * Set the filesystem type of the root to ufs. Note that 218 * the equal sign can be used instead of the colon. 219 rootfs:ufs 220 * Set the search path for kernel modules to look first in 221 * /usr/phil/mod_test for modules, then in /kernel/modules (the 222 * default) if not found. Useful for testing new modules. 223 * Note that you can delimit your module pathnames using 224 * colons instead of spaces: moddir:/newmodules:/kernel/modules 225 moddir:/usr/phil/mod_test /kernel/modules. 226 * Set the configuration option {_POSIX_CHOWN_RESTRICTED} : 227 * This configuration option is enabled by default. 228 set rstchown = 1 229 * Disable the configuration option {_POSIX_CHOWN_RESTRICTED} : 230 set rstchown = 0 231 * Turn on debugging messages in the modules mydriver. This is useful 232 * during driver development. 233 set mydriver:debug = 1 234 * Bitwise AND the kernel variable "moddebug" with the 235 * one's complement of the hex value 0x880, and set 236 * "moddebug" to this new value. 237 set moddebug & ~0x880 238 * Demonstrate the cumulative effect of the SET 239 * bitwise AND/OR operations by further modifying "moddebug" 240 * by ORing it with 0x40. 241 set moddebug | 0x40 242 243 244 245 SEE ALSO 246 boot(1M), init(1M), kernel(1M) 247 248 WARNINGS 249 Use care when modifying the system file; it modifies the operation of 250 the kernel. If you preserved the original system file, you can boot 251 using boot -a, which will ask you to specify the path to the saved 252 file. This should allow the system to boot correctly. If you cannot 253 locate a system file that will work, you may specify /dev/null. This 254 acts as an empty system file, and the system will attempt to boot using 255 its default settings. 256 257 NOTES 258 The system files are read only once, at boot time. 259 260 261 262 January 29, 2019 SYSTEM(4)