Bsd updating usrsrc
Note that this assumes you are at a local terminal on the machine.
Single user mode makes sure that system binaries are not being replaced while they are being used.
A common tactic here is to record any changes that look like they disappeared from any files that you edited, and accept all changes.
Then examining the changes in more detail after the system is up and running. Your ports have linked against system libraries that have been changed, sometimes drastically.
One thing to watch out for though, don't just build another kernel without saving your current one, because then the current buggy kernel will overwrite your current failsafe There are potential problems updating a system from 5.1-5.3 to 6.0 directly.Although they do not affect everyone, it is highly recomended to upgrade at least to RELENG_5_4 or RELENG_5 (Read Free BSD_Release_Branches for definitions of these tags) before upgrading to 6.0 .nvidia video drivers and RAID card drivers are commonly in this category. Firstly, check a few of the listed errors in /usr/src/UPDATING, and try a few of the debugging ideas in the handbook. Keep in mind, if your kernel compile breaks here you haven't actually broken anything, so you've only inconvenienced yourself.
You may want to try make clean before doing subsequent build attempts.
You can use the somewhat more general instructions in Upgrading_the_base_system to do the upgrade from 5. There are a few things you need to do before you launch into compiling your new kernel, particularly if you are jumping across major versions.