Reinstall of current version?

Somehow one of my 11.2-RELEASE-p4 systems has gotten into a curiously inconsistent state. (I have some theories about this, but my sense is they're not relevant to what my next steps are; if pressed I can expand on them in another comment.) I can tell it's missing a number of files that are present on a different 11.2-RELEASE-p4 system I have, which is affecting updating some ports. For example, /usr/include/{net,pcap}/dlt.h is missing on the "bad" system but present on the good (afaik) system.

Though I build ports from source, I do binary installs of the base system instead of building from source. What is the best way to reinstall the whole base system? freebsd-update can't seem to do it, and of course just unpacking the distribution .tar.gz over everything is going to be a horrifically bad idea. It's true that I could switch to src builds, but for now I'm still hoping for a way to do a binary refresh.

Recommendations, please? Thanks in advance!
 
Nothing horrific about using the distribution archives. The only thing you need to look out for is the /etc directory because plenty of files in there will be overwritten. But a simple backup can easily solve that; I doubt you'd have edited many files in there anyway.

Still, there is a reason why you're missing those files. Make sure you ran # freebsd-update install twice (so: after the reboot you ran it again) as is instructed during the process. Some people seem to overlook the need for the 2nd run.

Another possibility could be -F which would force a fetch to take place. From which version did you upgrade/update?

You might be able to use # freebsd-update -F --currently-running <previous release> fetch where 'previous release' is the version you used before this one. This would force the fetching of updates, then try to install those again.
 
Thanks for the tips. I was not previously aware of --currently-running. Though I believe (without being sure) I had originally come from 11.0-RELEASE, when I use that and it tells me what will be updated to 11.2-RELEASE, unfortunately none of the missing /usr/include files are listed as something that will be updated.

For now my next step is to just replace my /usr/include with the one from 11.2-RELEASE/base.txz and see how far that gets me. Wish I had a reference to compare with for what the installation *should* look like.
 
Unpacking the dist /usr/include over my /usr/include seems to have done the trick as far as being able to update the ports that originally made me aware of this problem, as well as allowing make buildworld to run successfully. My plan now to get everything into the expected state -- in case it wasn't just /usr/include that was missing something -- is to do the installworld, rebuild all ports, then go back to maintaining the base via freebsd-update.
 
Back
Top