FreeBSD Handbook : Configuring the FreeBSD Kernel : The Configuration File : Mandatory Keywords
Previous: The Configuration File
Next: General Options

5.3.1. Mandatory Keywords

These keywords are required in every kernel you build.

machine ``i386''

The first keyword is machine, which, since FreeBSD only runs on Intel 386 and compatible chips, is i386.

Note: that any keyword which contains numbers used as text must be enclosed in quotation marks, otherwise config gets confused and thinks you mean the actual number 386.

cpu ``cpu_type''

The next keyword is cpu, which includes support for each CPU supported by FreeBSD. The possible values of cpu_type include:

and multiple instances of the cpu line may be present with different values of cpu_type as are present in the GENERIC kernel. For a custom kernel, it is best to specify only the cpu you have. If, for example, you have an Intel Pentium, use I586_CPU for cpu_type.

ident machine_name

Next, we have ident, which is the identification of the kernel. You should change this from GENERIC to whatever you named your kernel, in this example, MYKERNEL. The value you put in ident will print when you boot up the kernel, so it is useful to give a kernel a different name if you want to keep it separate from your usual kernel (if you want to build an experimental kernel, for example). Note that, as with machine and cpu, enclose your kernel's name in quotation marks if it contains any numbers.

Since this name is passed to the C compiler as a -D switch, do not use names like DEBUG, or something that could be confused with another machine or CPU name, like vax.

maxusers number

This file 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. However, under normal circumstances, you will want to set maxusers to at least four, especially if you are using the X Window System or compiling software. The reason is that the most important table set by maxusers is the maximum number of processes, which is set to 20 + 16 * maxusers, so if you set maxusers to one, 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 man page will start up nine processes to filter, decompress, and view it. Setting maxusers to 4 will allow you to have up to 84 simultaneous processes, which should be enough for anyone. If, however, you see the dreaded ``proc table full'' error when trying to start another program, or are running a server with a large number of simultaneous users (like Walnut Creek CDROM's FTP site), you can always increase this number and rebuild.

Note: maxuser 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. One keyword which does limit the number of simultaneous remote logins is pseudo-device pty 16.

config kernel_name root on root_device

This line specifies the location and name of the kernel. Traditionally the kernel is called vmunix but in FreeBSD, it is aptly named kernel. You should always use kernel for kernel_name because changing it will render numerous system utilities inoperative. The second part of the line specifies the disk and partition where the root filesystem and kernel can be found. Typically this will be wd0 for systems with non-SCSI drives, or sd0 for systems with SCSI drives.


FreeBSD Handbook : Configuring the FreeBSD Kernel : The Configuration File : Mandatory Keywords
Previous: The Configuration File
Next: General Options