Bug 195568 - pfctl missed out from freebsd-update to 10.1-RELEASE
Summary: pfctl missed out from freebsd-update to 10.1-RELEASE
Status: Closed DUPLICATE of bug 196760
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 10.1-RELEASE
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-01 22:57 UTC by arsenuke
Modified: 2015-02-13 05:12 UTC (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description arsenuke 2014-12-01 22:57:34 UTC
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.
Comment 1 bt 2015-01-31 14:39:39 UTC
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.
Comment 2 wekers 2015-02-07 17:54:06 UTC
I also have this problem when upgrade 10.0 to 10.1-RELEASE-p5.
Replaced /sbin/pfctl from ftp of base tarball, solved.
Comment 3 bt 2015-02-08 09:39:19 UTC
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.
Comment 4 Allan Jude freebsd_committer freebsd_triage 2015-02-12 04:45:11 UTC
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.
Comment 5 Allan Jude freebsd_committer freebsd_triage 2015-02-12 06:09:10 UTC
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
Comment 6 wekers 2015-02-12 21:40:53 UTC
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?
Comment 7 Allan Jude freebsd_committer freebsd_triage 2015-02-12 23:29:39 UTC
(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/
Comment 8 wekers 2015-02-13 02:07:52 UTC
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
-------------------------------------------------------------------------------
Comment 9 wekers 2015-02-13 05:06:36 UTC
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
Comment 10 Allan Jude freebsd_committer freebsd_triage 2015-02-13 05:12:15 UTC

*** This bug has been marked as a duplicate of bug 196760 ***