Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

When recently using a Perl script, I got an error message saying "Userland and kernel are out of sync". After Googling around I've found that probably I haven't yet done make buildworld

I understand that "make buildworld" is the process of upgrading from one version to another, My question is can buildworld be run using a cd/dvd disc instead of downloading the sources and necessary files using internet. If yes, please provide some links to docs. If not, please provide links to docs that uses the files from internet. I already had a look http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html

Help is always appreciated.

Many Thanks

share|improve this question
You don't mention it so I'll ask it: after you do a build & install your new world and kernel, you did remember to reboot, right? (I ask b/c a colleague worked on a similar message for hours before realizing the machine had been upgraded the day before but had a 90 day uptime :-) –  voretaq7 Jan 29 '10 at 3:52
add comment

3 Answers

up vote 4 down vote accepted

Yeah, CD/DVD has all sources of FreeBSD and you don't need to download them all from internet.

Insert FreeBSD CD, run sysinstall go to configure -> Distributions -> check src

Then use instruction from FreeBSD handbook.

PS. for minor upgrades I use this script


# Shell setup
set -x
set -u
set -e

# Variables

# Preparation
rm -rf /usr/obj/usr/src/sys/${KERNCONF}
${MAKE} clean
${MAKE} kernel-toolchain

# Build and Install
${MAKE} buildkernel ${KERNCONF_STR}
${MAKE} buildworld 
rm -f /boot/kernel/*.symbols
${MAKE} installkernel ${KERNCONF_STR}
${MAKE} installworld

# Merge configs
mergemaster -iFU
share|improve this answer
This is a pretty good upgrade overview, but I would run mergemaster before installworld (just in case some userland bits don't want to run until you reboot, at least this way your boot scripts will match your world+kernel). Also watch the delete-old* targets carefully: they have the potential to break stuff :-) –  voretaq7 Jan 29 '10 at 3:50
add comment

I do a buildworld regularly and never had an issue. The normal procedure I follow at least once a week is:

  1. Run csup to synchronize the source tree and ports tree. (requires a properly crafted "supfile")
  2. Rebuild a new kernel and 'world'. I've got a quick n' dirty bash script for this.
  3. Install only the kernel.
  4. Boot the new kernel, must be in single user mode in order to install the 'world' properly. Install the 'world'. Run mergemaster as suggested in the docs. This step usually takes ~5 minutes.
  5. Boot normally in multiuser mode.
  6. Use portmaster tool to install updated ports (portmaster -L to see upgradable ports, portmaster -a to proceed upgrading).

Don't forget to use screen while working remotely.

share|improve this answer
To rebuild the kernel and 'world' you can just start a screen session and run cd /usr/src && make clean && make buildworld && make KERNCONF=MYKERNEL buildkernel (use CTRL+a CTRL+d to detach from the screen session. screen -xRR to reattach) –  dschulz Nov 26 '09 at 0:51
There are some ports that, if maintained to their latest version recompiling from source, frequently will fail to compile against an outdated kernel source tree, the lsof tool being the perfect example here. My best advice is: get your kernel, world and ports updated regularly following $(VERSION)-STABLE. Learn how to do it correctly once, script it. Is a fun exercise. –  dschulz Nov 26 '09 at 1:36
add comment

You probably should begin with finding the reason of their being out of sync. Maybe they aren't and the script is wrong. If you build world from some random sources it might still be out of sync. To be sure you would build and install both world and kernel from the same source following the steps from the Handbook. Sources from CD could work OK but downgrading sucessfully is not guaranteed and we don't know any details.

share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.