The general format of a configuration file is quite simple. Each line contains a keyword and one or more arguments. For simplicity, most lines only contain one argument. The following sections describe each keyword, generally in the order they are listed in GENERIC, although some related keywords have been grouped together in a single section (such as Networking) even though they are actually scattered throughout the GENERIC file. An exhaustive list of options and more detailed explanations of the device lines is present in the LINT configuration file, located in the same directory as GENERIC. If you are in doubt as to the purpose or necessity of a line, check first in LINT. Note: In FreeBSD 5.X and above the LINT is non-existent. See the NOTES file for architecture dependent options. Some options, mainly architecture independent ones, are stored in the /usr/src/sys/conf/NOTES file. It’s advisable to review the options in here also.
The following is an example GENERIC kernel configuration file with various additional comments where needed for clarity. This example should match your copy in /usr/src/sys/i386/conf/GENERIC fairly closely. For details of all the possible kernel options, see /usr/src/sys/i386/conf/LINT. This is the machine architecture. It must be either i386, pc98, sparc64, alpha, ia64, amd64, or powerpc. The above option specifies the type of CPU you have in your system. CPU), however, for a custom kernel, it is best to specify only the CPU you have. If you are unsure of your CPU type, you can check the /var/run/dmesg.boot file to view your boot up messages. CPU is still provided in the source of FreeBSD, but it is disabled by default in both -STABLE and -CURRENT. Build the userland and kernel on a newer machine and install on the 386 using the precompiled /usr/obj files (see Section 21.5 for details). CPU support in the kernels of the installation CD-ROM.
The first of these options is probably the easiest of all, but you will need a lot of disk space on a 386-class machine which may be difficult to find. This is the identification of the kernel. You should change this to whatever you named your kernel, i.e. MYKERNEL if you have followed the instructions of the previous examples. The value you put in the ident string will print when you boot up the kernel, so it is useful to give the new kernel a different name if you want to keep it separate from your usual kernel (i.e. The maxusers option sets the size of a number of important system tables. This number is supposed to be roughly equal to the number of simultaneous users you expect to have on your machine. In FreeBSD 5.X, maxusers will default to 0 if not specified. If you are using an version of FreeBSD earlier than 4.5, or you want to manage it yourself you will want to set maxusers to at least 4, especially if you are using the X Window System or compiling software.
1, then you can only have 36 simultaneous processes, including the 18 or so that the system starts up at boot time, and the 15 or so you will probably create when you start the X Window System. Even a simple task like reading a manual page will start up nine processes to filter, decompress, and view it. Setting maxusers to 64 will allow you to have up to 1044 simultaneous processes, which should be enough for nearly all uses. Note: maxusers does not limit the number of users which can log into your machine. It simply sets various table sizes to reasonable values considering the maximum number of users you will likely have on your system and how many processes each of them will be running. 0 is the interface to the floating point math unit in FreeBSD, which is either the hardware co-processor or the software math emulator.
This is not optional. This is the generic loopback device for TCP/IP. If you telnet or FTP to localhost (a.k.a., 127.0.0.1) it will come back at you through this pseudo-device. Everything that follows is more or less optional. See the notes underneath or next to each option for more information. In FreeBSD 5.X and newer versions the device.hints(5) is used to configure options of the device drivers. The default location that loader(8) will check at boot time is /boot/device.hints. Using the hints option you can compile these hints statically into your kernel. Then there is no need to create a device.hints file in /boot. The normal build process of the FreeBSD does not include debugging information when building the kernel and strips most symbols after the resulting kernel is linked, to save some space at the install location. If you are going to do tests of kernels in the -CURRENT branch or develop changes of your own for the FreeBSD kernel, you might want to uncomment this line.