Monday, 15 June 2015

Upgrading FreeBSD 10.1-RELEASE To -STABLE



Procedure

Move the current source code to a backup folder to be sure to get only -STABLE code:
mv /usr/src /usr/src-RELEASE
mv /usr/ports /usr/ports-RELEASE


Check out the STABLE source code:
svn checkout https://svn0.us-west.freebsd.org/base/stable/10 /usr/src
svn checkout https://svn0.us-west.freebsd.org/ports/head /usr/ports

*if svn command not found, install svn first,
pkg install devel/subversion

Then cd in to the correct folder
cd /usr/src

Build the world:
make buildworld -j2

*The -j 2 part means that it should run 2 jobs at once.

cd /usr/src/sys/i386/config
cp GENERIC yourkernelname

Build the kernel:
make buildkernel KERNCONF=yourkernelname
make installkernel KERNCONF=yourkernelname

Now reboot in to the new kernel:
shutdown -r now

Now we're giong to install the world
make installworld
After that finished we can do another mergemaster:
mergemaster -p

Almost done, time to reboot
shutdown -r now

Remove old files and libraries:
cd /usr/src
make check-old
>>> Checking for old files
>>> Checking for old libraries
>>> Checking for old directories
To remove old files and directories run 'make delete-old'.
To remove old libraries run 'make delete-old-libs'.

make delete-old
remove /usr/share/doc/atf/AUTHORS? y
remove /usr/share/doc/atf/COPYING? y
remove /usr/share/doc/atf/NEWS? y
remove /usr/share/doc/atf/README? y
remove /usr/share/man/man1/atf-check.1.gz? y
remove /usr/share/man/man1/atf-sh.1.gz? y
remove /usr/share/man/man1/atf-test-program.1.gz? y
remove /usr/share/man/man3/atf-c-api.3.gz? y
remove /usr/share/man/man3/atf-c++-api.3.gz? y
remove /usr/share/man/man3/atf-sh-api.3.gz? y
remove /usr/share/man/man4/atf-test-case.4.gz? y
remove /usr/share/mk/atf.test.mk? y
>>> Old files removed
>>> Removing old directories
>>> Old files removed

To remove old libraries run 'make delete-old-libs'.
make delete-old-libs
>>> Removing old libraries
Please be sure no application still uses those libraries, else you
can not start such an application. Consult UPDATING for more
information regarding how to cope with the removal/revision bump
of a specific library.
>>> Old libraries removed

DONE !
Run freebsd-version to see that you are now on stable:

freebsd-version
10.0-STABLE

*Note that freebsd-update does not work with the STABLE branch. 



0 comments:

Post a Comment