pfctl would not work after upgrade from 10.0-RELEASE-p12 to 10.1-RELEASE. Throwing various errors: # pfctl -sr pfctl: DIOCGETRULES: Permission denied # service pf restart pfctl: DIOCADDRULE: Operation not supported by device Turned out /sbin/pfctl had not been updated. Copied it from a fresh installation of 10.1 and it's working. Looks like freebsd-update fails to update it.
Ran into the same problem here. # pfctl -vf /etc/pf.conf pfctl: DIOCADDRULE: Operation not supported by device freebsd-update reported everything up to date for 10.1-RELEASE-p5, but replacing /sbin/pfctl fixed the problem.
I also have this problem when upgrade 10.0 to 10.1-RELEASE-p5. Replaced /sbin/pfctl from ftp of base tarball, solved.
I recommend affected users run "freebsd-update IDS" to see if you have other files out of date, too: in my case the whole system was wonked.
It seems likely you missed one of the steps when using freebsd-update Is this what happened? https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196760 Note: I have a patch for freebsd-update pending that will prevent you accidentally doing this in the future.
Easiest way to tell: file /bin/sh If it is still the old version, you likely missed the 2nd 'freebsd-update install' (the first installs only a new kernel, then you reboot, then you have to do a 2nd install to upgrade the userland) https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/updating-upgrading-freebsdupdate.html#freebsdupdate-upgrade
I don't know, but when did the upgrade and try run 'freebsd-update install' again ------------------------------------------------------ No updates needed to update system to 10.1-RELEASE-p5. $ freebsd-update install No updates are available to install. Run '/usr/sbin/freebsd-update fetch' first. ------------------------------------------------------ if run 'freebsd-update IDS' some binary have wrong hash. ex: /bin/chmod, /bin/cat, /bin/cp etc... but can execute without error What way to try get again? make buildworld and installworld from svn?
(In reply to wekers from comment #6) Do 'file /bin/chmod' It will tell you what version your userland is (sounds like 10.0). The instructions for fixing the system can be found here (written by the user who ran into the same problem in another bugzilla ticket): http://dan.langille.org/2015/01/18/failure-with-freebsd-update-how-not-to-upgrade-your-systems/
Allan i have run file, the return was: ------------------------------------------------------------------------------- /usr/share/misc/magic, 93: Warning: Printf format `l' is not valid for type `lelong' in description `, %ld pages' /usr/share/misc/magic, 898: Warning: Printf format `l' is not valid for type `belong' in description `%ld x' ... more alot lines... ... more alot lines... /usr/share/misc/magic, 17382: Warning: Printf format `l' is not valid for type `byte' in description `- version %ld' file: File 5.19 supports only version 12 magic files. `/usr/share/misc/magic.mgc' is version 8 -------------------------------------------------------------------------------
Well i following the steps that allan said by link above: $ env UNAME_r=10.0-RELEASE freebsd-update upgrade -r 10.1-RELEASE ------------------------------------------------------------------------------ The following components of FreeBSD seem to be installed: kernel/generic world/base The following components of FreeBSD do not seem to be installed: src/src world/doc world/games ------------------------------------------------------------------------------ $ freebsd-update install ------------------------------------------------------------------------------ Installing updates... Completing this upgrade requires removing old shared object files. Please rebuild all installed 3rd party software (e.g., programs installed from the ports tree) and then run "/usr/sbin/freebsd-update install" again to finish installing updates. ------------------------------------------------------------------------------ $ freebsd-update install Installing updates... done. ------------------------------------------------------------------------------ $ uname -rUK 10.1-RELEASE-p5 1001000 1001000 $ file /bin/chmod /bin/chmod: ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD), dynamically linked (uses shared libs), for FreeBSD 10.1, stripped ------------------------------------------------------------------------------ freebsd-update IDS is fine too Many Thanks Allan! everything here is okay now
*** This bug has been marked as a duplicate of bug 196760 ***