FreeBSD Administration

Notes on FreeBSD system administration.

Some assumptions about the system are made. Like running a RELEASE version and using binary packages without anything built locally.

FreeBSD Updating Checklist

  1. update the base system

    https://www.freebsd.org/doc/handbook/updating-upgrading-freebsdupdate.html

    # freebsd-update fetch
    # freebsd-update install
    
  2. Update jails

    https://www.freebsd.org/doc/handbook/jails-ezjail.html

    # ezjail-admin update -u
    # mergemaster -U -D /usr/jails/jailname
    
  3. Update packages:

    # pkg update
    # pkg upgrade
    

Updating Major/Minor Version

  1. Update the base system:

    # freebsd-update -r 12.0-RELEASE upgrade
    # freebsd-update install # install the new kernel
    

    # reboot

    # freebsd-update install # install the rest, yes twice. Not sure why. # freebsd-update install

  2. Update jails:

    # ezjail-admin update -U -s 11.0-RELEASE
    # mergemaster -U -D /usr/jails/jailname
    
  3. Update pkg

    At this point, pkg may be broken and needs to be updated first:

    # pkg-static install -f pkg
    
  4. Update packages:

    # pkg update
    # pkg upgrade
    

Operation not permitted on files

Some special files (directories) are marked with system immutable flag.

Remove with:

# chflags -R noschg *