Obtain or update source:
Obtain the initial source for the build you intend to use.
git clone -b master --single-branch --depth 1 git://github.com/freebsd/freebsd.git /usr/src
Github changed security in September 2021
git clone -b master --single-branch --depth 1 https://github.com/freebsd/freebsd.git /usr/src
replace "master" above with "stable/14" if following a stable branch, or any other chosen branch instead.
and then to prepare now for future updates do:
git config pull.rebase true
Update after the source tree is setup:
cd /usr/src
git pull
The build process:
1 Start fresh
make cleanworld
make clean
2 Build world
make -j `sysctl -n hw.ncpu` buildworld
3 Build and install kernel
make -j `sysctl -n hw.ncpu` kernel KERNCONF=GENERIC
4 Go to single user
reboot
Watch for the FreeBSD startup menu, press space as needed to pause it -- choose 'singleuser' by hitting '2'. It is NOT recommended to use another shell, at the prompt below, tap the return or enter key.
Enter full pathname of shell or RETURN for /bin/sh
5 Regain access to /usr/src
mount all items in /etc/fstab as read-write:
mount -u /
mount all ZFS datasets:
zfs mount -a
cd /usr/src
6 Prepare the system files then install world
Mergemaster removed Nov 20, 2023
mergemaster -p
etcupdate -p
make installworld
Fix date/time as needed:
Should you see the message below, which can appear,
At installworld Make: "/usr/src/Makefile" line 360: Check your date/timeit is a simple fix, type the following command to continue:
adjkerntz -i
7 Interactively modify configuration files to better fit the new install
mergemaster -iUF
etcupdate -n ; etcupdate
8 Cleanup possibly conflicting remnant files
yes|make delete-old
yes|make delete-old-libs
Reboot into your new updated kernel and world.
No comments:
Post a Comment