Friday, November 21, 2003

Thursday, November 20, 2003

fun with -current

So I have several boxes at work installed with 5.0. One particular box I was having trouble with inetd connections sending reset when the box was under a significant amount of httpd load. No problem, I just adjusted inetd to start with '-R0' and problem solved.

After I did this, it occurred to me that I could easily update the box to -current by NFS mounting /usr/src and /usr/obj from the machine I track -current on and run make installkernel, reboot, installworld, etc.. to get it up to date fairly quickly. I should have stopped myself right there.

At first make installkernel complained about this line in Makefile.inc1

745: (${TARGET_ARCH} != ${MACHINE_ARCH} || ${BOOTSTRAPPING} < 501101)

Which was really weird since ${BOOTSTRAPPING} is 0, not "0" and it's complaining about string comparisons. Oh well, I changed '<' to '!=' since it would accomplish the same thing.

Installkernel succeeded and I rebooted single user into the new kernel, remounted /usr/src and /usr/obj off the -current box and began to run makeinstallworld (after mergemaster -p of course). This is where things got ugly. The install died somewhere in in the middle of nowhere leaving me with no and half installed new DYNAMICROOT /bin, /sbin, etc... ARGHH!! I couldn't do anything that wasn't built into the shell at this point.

THANK GOD for a statically linked mountd. I was able to finally mount /rescue off of the -current box and proceed to copy just enough to selectively 'make install' certain portions of the tree! After it was fairly stable, I re-ran 'make installworld' and succeeded. I think NO_DYNAMICROOT=yo will be in the -current boxen's make.conf from now on.