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 systems: 59 60 aoutexec 61 62 63 64 65 On SPARC and IA systems: 66 67 elfexec 68 intpexec 69 javaexec 70 71 72 73 74 75 firmware 76 Raw firmware images in subdirectories, one for each device 77 driver module using firmload(9F). 78 79 80 fs 81 These modules are filesystems. 82 83 84 sched 85 These modules implement a process scheduling algorithm. 86 87 88 strmod 89 These modules are STREAMS modules. 90 91 92 sys 93 These modules implement loadable system-call modules. 94 95 96 misc 97 These modules do not fit into any of the above categories, so 98 are considered "miscellaneous" modules. 99 100 101 102 SPARC only: 103 104 dacf 105 These modules provide rules and actions for device auto- 106 configuration. 107 108 109 tod 110 These modules provide support for the time of day hardware. 111 112 113 cpu 114 These modules provide CPU-specific kernel routines. 115 116 117 118 A description of each of the supported commands follows: 119 120 exclude: <namespace>/<modulename> 121 122 Do not allow the listed loadable kernel module to be loaded. 123 exclude commands are cumulative; the list of modules to exclude is 124 created by combining every exclude entry in the system file. 125 126 127 include: <namespace>/<modulename> 128 129 Include the listed loadable kernel module. This is the system's 130 default, so using include does not modify the system's operation. 131 include commands are cumulative. 132 133 134 forceload: <namespace>/<modulename> 135 136 Force this kernel module to be loaded during kernel initialization. 137 The default action is to automatically load the kernel module when 138 its services are first accessed. forceload commands are cumulative. 139 140 141 rootdev: <device name> 142 143 Set the root device to the listed value instead of using the 144 default root device as supplied by the boot program. 145 146 147 rootfs: <root filesystem type> 148 149 Set the root filesystem type to the listed value. 150 151 152 moddir: <first module path>[[{:, }<second ...>]...] 153 154 Set the search path for loadable kernel modules. This command 155 operates very much like the PATH shell variable. Multiple 156 directories to search can be listed together, delimited either by 157 blank spaces or colons. 158 159 160 set [<module>:]<symbol> {=, |, &} [~][-]<value> 161 162 Set an integer or character pointer in the kernel or in the 163 selected kernel module to a new value. This command is used to 164 change kernel and module parameters and thus modify the operation 165 of your system. Assignment operations are not cumulative, whereas 166 bitwise AND and OR operations are cumulative. 167 168 Operations that are supported for modifying integer variables are: 169 simple assignment, inclusive bitwise OR, bitwise AND, one's 170 complement, and negation. Variables in a specific loadable module 171 can be targeted for modification by specifying the variable name 172 prefixed with the kernel module name and a colon (:) separator. 173 Values can be specified as hexadecimal (0x10), Octal (046), or 174 Decimal (5). 175 176 The only operation supported for modifying character pointers is 177 simple assignment. Static string data such as character arrays 178 cannot be modified using the set command. Use care and ensure that 179 the variable you are modifying is in fact a character pointer. The 180 set command is very powerful, and will likely cause problems if 181 used carelessly. The following escape sequences are supported 182 within the quoted string: 183 184 \n (newline) 185 \t (tab) 186 \b (backspace) 187 188 189 190 191 EXAMPLES 192 Example 1 A sample system file. 193 194 195 The following is a sample system file. 196 197 198 * Force the ELF exec kernel module to be loaded during kernel 199 * initialization. Execution type modules are in the exec namespace. 200 forceload: exec/elfexec 201 * Change the root device to /sbus@1,f8000000/esp@0,800000/sd@3,0:a. 202 * You can derive root device names from /devices. 203 * Root device names must be the fully expanded Open Boot Prom 204 * device name. This command is platform and configuration specific. 205 * This example uses the first partition (a) of the SCSI disk at 206 * SCSI target 3 on the esp host adapter in slot 0 (on board) 207 * of the SBus of the machine. 208 * Adapter unit-address 3,0 at sbus unit-address 0,800000. 209 rootdev: /sbus@1,f8000000/esp@0,800000/sd@3,0:a 210 * Set the filesystem type of the root to ufs. Note that 211 * the equal sign can be used instead of the colon. 212 rootfs:ufs 213 * Set the search path for kernel modules to look first in 214 * /usr/phil/mod_test for modules, then in /kernel/modules (the 215 * default) if not found. Useful for testing new modules. 216 * Note that you can delimit your module pathnames using 217 * colons instead of spaces: moddir:/newmodules:/kernel/modules 218 moddir:/usr/phil/mod_test /kernel/modules. 219 * Set the configuration option {_POSIX_CHOWN_RESTRICTED} : 220 * This configuration option is enabled by default. 221 set rstchown = 1 222 * Disable the configuration option {_POSIX_CHOWN_RESTRICTED} : 223 set rstchown = 0 224 * Turn on debugging messages in the modules mydriver. This is useful 225 * during driver development. 226 set mydriver:debug = 1 227 * Bitwise AND the kernel variable "moddebug" with the 228 * one's complement of the hex value 0x880, and set 229 * "moddebug" to this new value. 230 set moddebug & ~0x880 231 * Demonstrate the cumulative effect of the SET 232 * bitwise AND/OR operations by further modifying "moddebug" 233 * by ORing it with 0x40. 234 set moddebug | 0x40 235 236 237 238 SEE ALSO 239 boot(1M), init(1M), kernel(1M) 240 241 WARNINGS 242 Use care when modifying the system file; it modifies the operation of 243 the kernel. If you preserved the original system file, you can boot 244 using boot -a, which will ask you to specify the path to the saved 245 file. This should allow the system to boot correctly. If you cannot 246 locate a system file that will work, you may specify /dev/null. This 247 acts as an empty system file, and the system will attempt to boot using 248 its default settings. 249 250 NOTES 251 The system files are read only once, at boot time. 252 253 254 255 April 20, 2019 SYSTEM(4)