FreeBSD 8 -> 9 upgrade, manually

Figured this weekend would be a good weekend to do the update to my main system.

After some quick investigative work, I decided to take the path of least resistance.

I decided to do it by hand!

  1. I shutdown the server (it is virtualized via VMware).
  2. Created a snapshot (I named it ‘pre-9’).
  3. Booted the system up.
  4. Log in on console as ‘root’.
  5. vmware-unstall-tools.pl (don’t need them after this, need a new revision)
  6. rm -fr /boot/kernel.old (won’t be using it anymore)
  7. mv /boot/kernel /boot/kernel.GOOD (if a reboot fails)
  8. Downloaded and unpacked 9.0-RELEASE kernel
  1. cd /var/tmp
  2. ftp mirrors.geeks.org
  3. cd /
  4. tar zxf /var/tmp/kernel.txz
  5. rm /var/tmp/kernel.txz
  • rebooted
  • If all looks good, continue, else punt by powering down and reverting snapshot
  • rm -fr /usr/src/* (it is full of fail now)
    1. cd /var/tmp
    2. ftp mirrors.geeks.org (find releases/9.0-RELEASE src.txz for your architecture)
    3. cd /
    4. tar zxf /var/tmp/src.txz
    5. rm /var/tmp/src.txz
  • vi stable-supfile (change RELENG_8 to RELENG_9)
  • csup stable-supfile
  • cd /usr/src
  • make buildworld
  • make installworld && rm -fr /usr/obj/* (don’t need to keep objects around)
  • reboot (this time we are fully native FreeBSD 9, but we need a new kernel after)
  • cd /usr/src/sys//conf
  • config>
  • config <KERNEL_CONFIG>
  • cd ../compile/<KERNEL_CONFIG>
  • make cleandepend && make depend && make -j2 && make install
  • …wait for it to finish, all should be good
  • cd ..
  • rm -fr(don’t need it anymore)
  • mergemaster -UiF (answer all the questions, don’t just accept things or you might cry later)
  • reboot (one…more…time)
  • and enjoy your FreeBSD 9-STABLE system.

    That is a lot of steps, yep, but many of them you don’t need to wait around for.

    Once this is all done you will want to rebuild any and all updated ports you had installed before. Good thing to do to carry out two items: update for the new libraries installed, and you’ll be more current since you probably haven’t updated them since you did the install.