FreeBSD 10, Converting from RELEASE to STABLE
Published: 17-04-2014 | Author: Remy van Elst | Text only version of this article
Table of Contents
Because of a bug in mpd which is fixed in 10-STABLE I wanted to move one ofmy FreeBSD machines from 10.0-RELEASE to 10.0-STABLE. The process to do so isfairly simple. Basically, you check out the new source code, build the world,build the kernel, install the kernel, install the world, merge some stuff andreboot.
Make sure you have a backup of important stuff on the system.
The name "-STABLE" is frequently misunderstood. It does not mean solid orsteady. -STABLE means that while code can change, the ABI (Application BinaryInterface) will remain stable and not change. Programs compiled to run onFreeBSD 9.0-RELEASE, or 9.1-RELEASE, or 9.2-RELEASE will continue to work onFreeBSD 9-STABLE. Effectively, -STABLE is the latest version of FreeBSD you canget without breaking installed software. [source]
Move the current source code to a backup folder to be sure to get only -STABLEcode:
mv /usr/src /usr/src-RELEASE
Do the same thing for the ports tree:
mv /usr/ports /usr/ports-RELEASE
When I did not moved the
/usr/src folder and continued this article, everytimeI would be back in 10.0-RELEASE...
Check out the STABLE source code:
svn checkout https://svn0.us-west.freebsd.org/base/stable/10 /usr/src
Also for the ports tree:
svn checkout https://svn0.us-west.freebsd.org/ports/head /usr/ports
Then cd in to the correct folder
Build the world:
make buildworld -j4
-j 4 part means that it should run 4 jobs at once. I have a quad core CPUso all the cores will be used.
Build the kernel:
make buildkernel KERNCONF=VPNmake installkernel KERNCONF=VPN
I have a different kernel file for the VPN setup.
Now reboot in to the new kernel:
shutdown -r now
Next, it was time to install the world. However,
make installworld complained:
make installworldERROR: Required unbound user is missing, see /usr/src/UPDATING.*** Error code 1Stop.make: stopped in /usr/src*** Error code 1Stop.make: stopped in /usr/src
/usr/src/UPDATING to the rescue:
20130916: With the addition of unbound(8), a new unbound user is now required during installworld. "mergemaster -p" can be used to add the user prior to installworld, as documented in the handbook.
mergemaster -p did not create the user:
mergemaster -p*** Creating the temporary root environment in /var/tmp/temproot *** /var/tmp/temproot ready for use *** Creating and populating directory structure in /var/tmp/temproot*** Beginning comparison *** Temp ./etc/group and installed have the same Id, deleting *** Temp ./etc/master.passwd and installed have the same Id, deleting*** Comparison complete*** /var/tmp/temproot is empty, deleting
I already am on FreeBSD 10, but this box is updated from 8 to 9 to 10, so maybethat didn't work out quite well. Installing unbound via pkg did work:
pkg install unbound
It seemed that it was half done:
Proceed with installing packages [y/N]: yldns-1.6.17.txz unbound-1.4.22.txzChecking integrity... done[1/2] Installing ldns-1.6.17... done[2/2] Installing unbound-1.4.22...===> Creating users and/or groups.Using existing group 'unbound'.Creating user 'unbound' with uid '59'. done
Oh wel... Now the
make installworld continues;
After that finished we can do another mergemaster:
/etc/motd changed, so, no big things.
Time to reboot:
shutdown -r now
Remove old files and libraries:
cd /usr/srcmake check-old>>> Checking for old files>>> Checking for old libraries>>> Checking for old directoriesTo remove old files and directories run 'make delete-old'.To remove old libraries run 'make delete-old-libs'.make delete-old>>> Removing old files (only deletes safe to delete libs)remove /usr/include/clang/3.3/__wmmintrin_aes.h? yremove /usr/include/clang/3.3/__wmmintrin_pclmul.h? yremove /usr/include/clang/3.3/altivec.h? yremove /usr/include/clang/3.3/ammintrin.h? y[...]>>> Old files removed>>> Removing old directories>>> Old directories removedTo remove old libraries run 'make delete-old-libs'.make delete-old-libs>>> Removing old librariesPlease be sure no application still uses those libraries, else youcan not start such an application. Consult UPDATING for moreinformation regarding how to cope with the removal/revision bumpof a specific library.>>> Old libraries removed
Note that freebsd-update does not work with the STABLE branch. Therefore thisprocess is required.
That's it. Run
freebsd-version to see that you are now on stable: