upgrading a kernel from 5.0-dp1 through a prebuild on NFS

From: Willem Jan Withagen <wjw_at_withagen.nl>
Date: Wed, 11 Feb 2004 18:20:26 +0100
Hi,

My most recent CD here is 5.0-dp1 which is use to install fresh systems
minimally.
Then I mount my buildserver:

freebee:/mnt2/obj    8186919 5827505 1704461    77%    /usr/obj
freebee:/usr/src51   3175982 2068141  853763    71%    /usr/src51

en go in there to install 5.1-RELEASE-p13, by the regular cycle.
The question is:
    How could I have done this more simple...

And the suggestions are:
    have mergemaster copy the make-templates
    Fix the install problem, because that turns it's ugly head
    also when installworld is run. But I'm having a hard time figuring
    out which install is being called....

--WjW


    # cd /usr/src/usr.sbin/mergemaster
    # ./mergemaster.sh -p
    *** From /etc/make.conf
    *** From /usr/src/share/examples/etc/make.conf
    grep: /etc/make.conf: No such file or directory

So I get it from the source tree and add what I would like to have:
    MODULES_OVERRIDE=vinum ipfw netgraph acpi lpt snp

    # cd /usr/src
    I already have a full build tree there so no 'make buildkernel'

========================
# make installkernel
Running test variables
PASS: Test variables detected no regression, output matches.
Running test targets
PASS: Test targets detected no regression.
Running test sysvmatch
--- /usr/src51/src/tools/regression/usr.bin/make/regress.sysvmatch.out  Sun May
 5 21:02:30 2002
+++ -   Wed Feb 11 17:40:46 2004
_at__at_ -1 +1 _at__at_
-EMPTY LHS
+EMPTY foo LHS
*** Error code 1

Stop in /usr/src51/src/tools/regression/usr.bin/make.
FAIL: Test failed: regression detected.  See above.
*** Error code 1

Stop in /usr/src51/src/tools/regression/usr.bin/make.
*** Error code 1

Stop in /usr/src51/src/tools/regression/usr.bin/make.

--------------------------------------------------------------
 Building an up-to-date make(1)
--------------------------------------------------------------
sh /usr/src51/src/tools/install.sh -c -s -o root -g wheel -m 555   make /usr/obj
/usr/src51/src/make.i386
cd /usr/obj/usr/src51/src/sys/GENERIC;  MAKEOBJDIRPREFIX=/usr/obj  MACHINE_ARCH=
i386  MACHINE=i386  CPUTYPE=  GROFF_BIN_PATH=/usr/obj/usr/src51/src/i386/legacy/
usr/bin  GROFF_FONT_PATH=/usr/obj/usr/src51/src/i386/legacy/usr/share/groff_font
  GROFF_TMAC_PATH=/usr/obj/usr/src51/src/i386/legacy/usr/share/tmac PATH=/usr/ob
j/usr/src51/src/i386/legacy/usr/sbin:/usr/obj/usr/src51/src/i386/legacy/usr/bin:
/usr/obj/usr/src51/src/i386/legacy/usr/games:/usr/obj/usr/src51/src/i386/usr/sbi
n:/usr/obj/usr/src51/src/i386/usr/bin:/usr/obj/usr/src51/src/i386/usr/games:/sbi
n:/bin:/usr/sbin:/usr/bin  /usr/obj/usr/src51/src/make.i386/make KERNEL=kernel i
nstall
thiskernel=`sysctl -n kern.bootfile` ;  if [ "$thiskernel" = /boot/kernel.old/ke
rnel ] ; then  chflags -R noschg /boot/kernel ;  rm -rf /boot/kernel ;  else  if
 [ -d /boot/kernel.old ] ; then  chflags -R noschg /boot/kernel.old ;  rm -rf /b
oot/kernel.old ;  fi ;  mv /boot/kernel /boot/kernel.old ;  if [ "$thiskernel" =
 /boot/kernel/kernel ] ; then  sysctl kern.bootfile=/boot/kernel.old/kernel ;  f
i;  fi
kern.bootfile: /boot/kernel/kernel -> /boot/kernel.old/kernel
mkdir -p /boot/kernel
install -p -m 555 -o root -g wheel kernel /boot/kernel
*** Signal 12

Stop in /usr/obj/usr/src51/src/sys/GENERIC.
*** Error code 1

Stop in /usr/src51/src.
*** Error code 1

Stop in /usr/src51/src.
========================
It looks like install is really playing up here.....
So have another try:
========================
# cd /usr/obj/usr/src51/src/sys/GENERIC
# make install
thiskernel=`sysctl -n kern.bootfile` ;  if [ "$thiskernel" = /boot/kernel.old/ke
rnel ] ; then  chflags -R noschg /boot/kernel ;  rm -rf /boot/kernel ;  else  if
 [ -d /boot/kernel.old ] ; then  chflags -R noschg /boot/kernel.old ;  rm -rf /b
oot/kernel.old ;  fi ;  mv /boot/kernel /boot/kernel.old ;  if [ "$thiskernel" =
 /boot/kernel/kernel ] ; then  sysctl kern.bootfile=/boot/kernel.old/kernel ;  f
i;  fi
mkdir -p /boot/kernel
install -p -m 555 -o root -g wheel kernel /boot/kernel
cd /usr/src51/src/sys/modules; MAKEOBJDIRPREFIX=/usr/obj/usr/src51/src/sys/GENER
IC/modules KMODDIR=/boot/kernel
MODULES_OVERRIDE="vinum ipfw netgraph acpi lpt snp" MACHINE=i386 make  install
===> vinum
"/usr/src51/src/sys/modules/vinum/../../conf/kmod.mk", line 69: Could not find
bsd.init.mk
"/usr/src51/src/sys/modules/vinum/../../conf/kmod.mk", line 214: Could not find
bsd.links.mk
make: fatal errors encountered -- cannot continue
*** Error code 1

Stop in /usr/src51/src/sys/modules.
*** Error code 1
=========================


So we need the make templates:
=========================
# cd /usr/src/share/mk
# make install
date '+%Y%m%d' > /var/db/port.mkversion
install -o root -g wheel  -m 444 bsd.README bsd.cpu.mk bsd.dep.mk bsd.doc.mk bsd
.files.mk bsd.incs.mk bsd.info.mk bsd.init.mk bsd.kmod.mk bsd.lib.mk bsd.libname
s.mk bsd.links.mk bsd.man.mk bsd.nls.mk bsd.obj.mk bsd.own.mk bsd.port.mk bsd.po
rt.post.mk bsd.port.pre.mk bsd.port.subdir.mk bsd.prog.mk bsd.subdir.mk bsd.sys.
mk sys.mk /usr/share/mk
=========================

And now we go:
# cd /usr/obj/usr/src51/src/sys/GENERIC
# make install

Which gets us the new kernel
and we reboot.......
Lots of requests to rebuild world due to out of sync kernel
Received on Wed Feb 11 2004 - 08:20:34 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:42 UTC