mergemaster broken -- take 2

Greg Byshenk freebsd at byshenk.net
Thu Jan 8 01:22:02 PST 2009


On Thu, Jan 08, 2009 at 10:10:25AM +0200, Andrei Kolu wrote:
> Mike Lempriere wrote:

> >Hi folks -- sorry to be a nag, but my main production system is barely 
> >limping along on an old kernel with mismatched libraries.  I have no 
> >idea what else to do -- please help!
> >---
> >I'm upgrading 5-stable (was at 5.5) to 6-stable, in preparation for 
> >6-stable to 7-stable.
> >No problems with cvsup, make buildworld, make installworld, make 
> >buildkernel, mergemaster -p.
> >make installkernel, boot to single user.  Then mergemaster -- blammo:
> What is your exact make sequences are?
> 
> I usually do this way:
> 
> # csup /usr/share/examples/cvsup/standard-supfile
> # cd /usr/src
> here I usually softlink my kernel config file in /root directory to 
> appropriate architecture one and edit /etc/make.conf:
> ---------------------------------------------------------------------------
> SUP_UPDATE=yes
> SUPHOST=cvsup.no.FreeBSD.org
> SUPFILE=/usr/share/examples/cvsup/standard-supfile
> PORTSSUPFILE=/usr/share/examples/cvsup/ports-supfile
> DOCSUPFILE=/usr/share/examples/cvsup/doc-supfile
> KERNCONF=KERNEL
> ---------------------------------------------------------------------------
> /usr/src/sys/amd64/conf
> KERNEL -> /root/kernel/KERNEL
> 
> # make buildkernel
> # make installkernel
> # make buildworld
> # mergemaster -p
> # make installworld
> # mergemaster

It may be me that is mistaken, but this seems wrong to me, as does the
sequence in the original message:

   # cvsup
   # make buildworld
   # make installworld
   # make buildkernel
   # mergemaster -p.
   # make installkernel
   # boot to single user
   # mergemaster

If I am not very much mistaken, the "canonical" process is:

# make buildworld
# make buildkernel
# make installkernel
# reboot (*)
# mergemaster -p
# make installworld
# mergemaster

The reasons for the other methods being wrong are (as I understand them):

- You should build your new world before building your new kernel, as
  it may be the case that some aspects of the new kernel build are
  dependent upon aspects of the new world build.  If you build your
  new kernel before building your new world, you will be building 
  your new kernel against the old world.

- You should install your new kernel before installing your new world,
  as it can be the case that some aspects of the new world will not be
  understood by your old kernel. A new kernel should always be
  compatible with an old userland/world, but an old kernel may not 
  always be compatible with a new userland/world.

> NOTE: I do not reboot my system until everything is updated. Why it is 
> necessary to boot new kernel and then upgrade world is beyound me..YMMW

- I suppose that it is not strictly necessary to reboot between 
  installing kernel and world, but I always do so.  The reason for
  this is that, if something has gone horribly wrong, it is quite easy
  to go back and boot kernel.old. If you don't realize that there is
  something wrong until after you have installed everything (kernel and
  userland), it can be much more difficult to recover.


-- 
greg byshenk  -  gbyshenk at byshenk.net  -  Leiden, NL


More information about the freebsd-stable mailing list