FreeBSDKernelPatching

From Earlham CS Department
Jump to navigation Jump to search

To patch the kernel on a FreeBSD system:

  1. Download the patch to a directory, say /tmp.
  2. cd /usr/src
  3. patch < /path/to/patch
  4. cd sys/i386/conf
  5. Run config on the kernel configuration file for the machine you want patch.
  6. cd to the compile directory.
  7. make clean && make depend && make
  8. If the machine has secure levels turned on (not a bad idea), you will have to reboot, and input "boot -s" at the FreeBSD boot prompt to go into single user mode.
  9. At the prompt, cd back into the kernel compilation directory, and run "make install".
  10. Reboot, and make sure everything comes back up properly.