Horrible problems with freebsd-update

This has been exhausting so far, so please read if you're going to reply. That's not an insult to you personally, yadayada, but simply me trying to avoid more frustration based on past experiences.

I have never built a custom kernel (and never will), never touched anything for any reason in any non-standard way. I have only ever used freebsd-update the binary, as instructed, very carefully. I've found many others with similar problems for all kinds of FreeBSD versions, but the solutions are always non-existent or involve ugly hacks where you force the text to not be shown, not solving any actual problem, clogging up your system with non-standard garbage and potentially putting you at risk as future updates might not be applied correctly.

If I could, I would simply reinstall the OS. However, I only own one machine and cannot afford the downtime.

The problem:

Whenever I run freebsd-update fetch, it says this:

Code:
# freebsd-update fetch ;
Looking up update.FreeBSD.org mirrors... 4 mirrors found.
Fetching metadata signature for 9.1-RELEASE from update3.freebsd.org... done.
Fetching metadata index... done.
Inspecting system... done.
Preparing to download files... done.

The following files are affected by updates, but no changes have
been downloaded because the files have been modified locally:
/var/db/mergemaster.mtree

The following files will be updated as part of updating to 9.1-RELEASE-p4:
/boot/kernel/linker.hints

I've run freebsd-update install 100 times, rebooted, etc. Nothing helps. It keeps outputting this nonsense. uname -a says I have 9.1-RELEASE-p4 installed. I have no idea what's going on, and again, I have not been doing anything "exotic" or "weird" or "non-standard" or "broken" my box in any way. I also very much doubt it's been compromised.

Is there a real way to solve this? A proper way? Why does it happen to begin with? Is the only choice to swallow the hours of downtime (at best) and reinstall the entire damn machine?

The only "reason" I can think of is that I did a non-minor upgrade a few months back, from 9.0 to 9.1. Again, though, all through freebsd-update, with no fancy special commands or tricks. Something is clearly out of sync somewhere, for some reason.

Please note that it's not an option to rebuild the kernel from sources or anything like that.

I wish there were a freebsd-update fixit command... x(
 
I had the same problem. Here is the solution:
Thread 39663

I don't think it's related to you update from 9.0 to 9.1. There is an explanation why that happens here:
Thread 1362

I don't really understand it, especially this bit:

The file is being distributed, and will always be different then what you have on your system. Typically, this file is removed from the distribution of update bits.

But it works.
 
blazingice said:
I had the same problem. Here is the solution:

http://forums.freebsd.org/showthread.php?t=39663

I don't think it's related to you update from 9.0 to 9.1. There is an explanation why that happens here:

http://forums.freebsd.org/showthread.php?t=1362

I don't really understand it, especially this bit:



But it works.

Well, I saw that thread, but found the solution to be insanely "unclean". I will end up with a pretty heavily modified system if I go through with it (IMO), and I just have to take somebody's word for it that it will not cause problems in the future...
 
It's not unclean, but if you don't trust it, you can always use devel/subversion to checkout the RELENG version from sources and compile it yourself. To do that you can try something like

Code:
make -C /usr/ports/devel/subversion install clean
rm -rf /usr/src/* /usr/obj/*
svn co svn://svn.freebsd.org/base/releng/9.1 /usr/src
cd /usr/src
make -j4 buildworld buildkernel KERNCONF=MYKERNELCONFIG
...

and so on. Basically you just follow the FreeBSD Handbook, without upgrading to -STABLE branch -- so you stay on the release branch. After that you can remove devel/subversion. You can also use # pkg_add subversion to install it, since it's a large port, and you're only going to use it this once.
 
jozze said:
It's not unclean, but if you don't trust it, you can always use devel/subversion to checkout the RELENG version from sources and compile it yourself. To do that you can try something like

Code:
make -C /usr/ports/devel/subversion install clean
rm -rf /usr/src/* /usr/obj/*
svn co svn://svn.freebsd.org/base/releng/9.1 /usr/src
cd /usr/src
make -j4 buildworld buildkernel KERNCONF=MYKERNELCONFIG
...

and so on. Basically you just follow the FreeBSD Handbook, without upgrading to -STABLE branch -- so you stay on the release branch. After that you can remove devel/subversion. You can also use # pkg_add subversion to install it, since it's a large port, and you're only going to use it this once.

As mentioned, I won't be building the kernel. This method is even messier.

I guess I'll do as you first suggested. Thanks, but it feels very bad. Anything to make the freebsd-update shut up, though. Also, this doesn't solve the problem with the stupid /var/db/mergemaster.mtree file. Sigh. What's up? How to fix that?
 
You don't have to rebuild the kernel, but if you update your "world" you should update the kernel as well (freebsd-update does that too, the difference is, it pulls binaries, and doesn't compile things). Since you would rebuild the entire "world", you would rebuild freebsd-update as well, which could help solve your problem. In any case, it's your call.
 
I dunno don't know if it's correct or clean but this is how I fix it:

Code:
[root@ircbsd /var/db/freebsd-update/files]
$ sh -x /usr/sbin/freebsd-update install 2>&1| fgrep linker.hints
+ [ -e ///boot/kernel/linker.hints ]
+ chflags noschg ///boot/kernel/linker.hints
+ [ -e ///boot/kernel/linker.hints ]
+ chflags noschg ///boot/kernel/linker.hints
+ install -S -o 0 -g 0 -m 0644 4bbc30feb6e2ff235abea7ee226a98d26c37ef117f274f7277313b35fe37e4b3 ///boot/kernel/linker.hints
[root@ircbsd /var/db/freebsd-update/files]
$ gunzip -c 4bbc30feb6e2ff235abea7ee226a98d26c37ef117f274f7277313b35fe37e4b3.gz  > /boot/kernel/linker.hints 
[root@ircbsd /var/db/freebsd-update/files]
$ freebsd-update fetch
Looking up update.FreeBSD.org mirrors... 4 mirrors found.
Fetching metadata signature for 9.1-RELEASE from update3.freebsd.org... done.
Fetching metadata index... done.
Inspecting system... done.
Preparing to download files... done.

No updates needed to update system to 9.1-RELEASE-p4.
 
Back
Top