Sysadmin > FreeBSD > UpdateWithBeadm

How to update FreeBSD with beadm from source

  1. pkg install beadm Install beadm, only the first time
  2. beadm list Have a look what boot environments you have
  3. beadm create upd20181122 or beadm create -e default upd20181122
  4. beadm list
  5. zfs list Have a look what zfs partitions you have
  6. zfs create -o mountpoint=/jails zroot/jails only the first time
  7. beadm mount upd20181122 /jails
  8. cat setbuild.env
    setenv MAKEOBJDIRPREFIX /jails/usr/obj
    setenv DESTDIR /jails
    setenv __MAKE_CONF /jails/etc/make.conf
    setenv SRCCONF /jails/etc/src.conf
    mount -t nullfs -o ro /usr/src /jails/usr/src
    
    source that file
  9. cd /jails/usr/src
  10. make -j4 buildworld
  11. make -j4 buildkernel
  12. make installkernel
  13. make installworld
  14. mergemaster -Ui -m /jails/usr/src -D /jails
  15. make -DBATCH_DELETE_OLD_FILES delete-old
  16. cd /jails
  17. cat /jails/unsetbuild.env
# Unset Jail Environment Build Options
unsetenv MAKEOBJDIRPREFIX
unsetenv DESTDIR
unsetenv __MAKE_CONF
unsetenv SRCCONF
umount /jails/usr/src
source that file