FreeBSD buildworld

freebsd

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

Best Answer

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

#!/bin/sh

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

# Variables
KERNCONF=PH34R.9
KERNCONF_STR="KERNCONF=${KERNCONF}"
MAKE_ARGS="-j5"
MAKE_CMD="make"
MAKE="$MAKE_CMD ${MAKE_ARGS}"

# 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