HOWTO: Convert FreeBSD 9-RELEASE to 9-STABLE (can be used with FreeBSD 8)
WARNING: Backup, backup, backup! Did I say it enough times?!
1. Update your current 9-RELEASE
2. Install Subversion if you haven't already:
+ Using ports:
+If the ports tree is not available, Subversion can be installed as a package:
+If pkgng is being used to manage packages, Subversion can be installed with it instead:
3. Move, rename, or delete the existing /usr/ports and /usr/src:
OR
AND
OR
4. Checkout:
5. Update:
6. Rebuild and install world and kernel:
--------------------------------------------------------------
At the boot option screen, choose #2 (single user) then:
+If using UFS:
+If using ZFS:
+Then:
--------------------------------------------------------------
+If using UFS:
+If using ZFS:
--------------------------------------------------------------
7. Add your GPU driver to loader.conf (in my case: nvidia):
OR
8. Check your installation:
NOTE: Don't use freebsd-update, it only works with RELEASE.
Suggestions by @wblock@:
WARNING: Backup, backup, backup! Did I say it enough times?!
1. Update your current 9-RELEASE
# freebsd-update fetch && freebsd-update install
2. Install Subversion if you haven't already:
+ Using ports:
# cd /usr/ports/devel/subversion
# make install clean
+If the ports tree is not available, Subversion can be installed as a package:
# pkg_add -r subversion
+If pkgng is being used to manage packages, Subversion can be installed with it instead:
# pkg install devel/subversion
3. Move, rename, or delete the existing /usr/ports and /usr/src:
# mv /usr/ports /usr/ports.bak
OR
# rm -rf /usr/ports/*
AND
# mv /usr/src /usr/src.bak
OR
# rm -rf /usr/src/*
4. Checkout:
# svn checkout [URL]https://svn0.us-west.FreeBSD.org/base/stable/9/[/URL] /usr/src
# svn checkout [URL]https://svn0.us-west.FreeBSD.org/ports/head[/URL] /usr/ports
5. Update:
# svn up /usr/src
# svn up /usr/ports
6. Rebuild and install world and kernel:
# cd /usr/src
# make buildworld
# make buildkernel
# make installkernel
# shutdown -r now
--------------------------------------------------------------
At the boot option screen, choose #2 (single user) then:
+If using UFS:
# mount -u /
# mount -a -t ufs
+If using ZFS:
# zfs set readonly=off zroot
# zfs mount -a
+Then:
# adjkerntz -i
# mergemaster -p
# cd /usr/src
# make installworld
# mergemaster -UiF
# yes | make delete-old
# yes | make delete-old-libs
# cd /usr/obj && chflags -R noschg * && rm -rf *
# reboot
--------------------------------------------------------------
[S]# mount -u /[/S]
[S]# mount -a -t ufs[/S]
+If using ZFS:
[S]# zfs set readonly=off zroot[/S]
[S]# zfs mount -a[/S]
[S]# make delete-old-libs[/S]
[S]# reboot[/S]
--------------------------------------------------------------
7. Add your GPU driver to loader.conf (in my case: nvidia):
# vi /etc/default/loader.conf
(and add nvidia_load="YES")OR
# vi /etc/loader.conf
# reboot
8. Check your installation:
# uname -a
NOTE: Don't use freebsd-update, it only works with RELEASE.
Suggestions by @wblock@:
I suggest using -Ui with mergemaster(8). After the first run, it saves a lot of time. Also, it's not a bad idea to set it to skip over /etc/master.passwd in /etc/mergemaster.rc:
Code:IGNORE_FILES='/etc/master.passwd'
This will cause surprises when new default users are added, like the auditdistd user recently, but it's better than the surprise of accidentally overwriting all the user passwords.
Last edited: