Subject: Re: upgrading to current from 0.9
To: Mark Townley <mark@praxis.co.uk>
From: Robert L. Shady <rls@zeus.id.net>
List: current-users
Date: 04/19/1994 15:21:09
> I just can't believe I'm the only person with this problem.  I 
> currently have a vanilla netbsd 0.9 binary installation.  I am 
> desperate to upgrade to current.  I have unpacked the current
> source tree on my sparc 10 at work and NFS mounted it from my
> NetBSD machine.  I do the following :

The following steps will get you in the right direction, but perhaps
the easiest way to do it would be to grab the binary distribution of
4-16-94 off of sun-lamp.cs.berkeley.edu and install it manually into
your machine, then upgrade to current from there.  Just make sure to
back up your /etc directory first, or you'll loose some important
stuff (ie: password file, for one.. ;)


Directions for upgrading from NetBSD-0.9 release to NetBSD-current as of 
January 9, 1994.  The following is a highly modified compilation of instructions
from various other sources that for some reason or another didn't work for me.
I have followed the script below, and it worked for me, your milage may vary.

NOTE: Neither I, nor any other person whose information may be contained
      here-in, take responsibility for the doom that may follow, or anything
      or anyone that may get hurt from it.  You are 100% on your own.
===
1.  Do the following to ensure that you have a fresh source tree, some things
    have moved in this release, and you don't want to have multiple copies of
    the same files laying around.  The % sign is your shell prompt, I use csh.

% cp /usr/src/Makefile /tmp
% rm -rf /usr/src
% mkdir /usr/src
% cp /tmp/Makefile /usr/src

2.  I extracted the newest NetBSD-current tar_files.

3.  Run the following commands:

% setenv MACHINE_ARCH i386
% setenv LDSTATIC -static
% setenv NOPIC

% cp /usr/src/sys/arch/i386/include/param.h /usr/include/machine
% cd /usr/src/usr.bin/make
% make all install
% cd /usr/src/gnu/usr.bin/gas
% make all install

% cd /usr/usr/share/mk
% make all install

% cd /usr/src/include
% make all install

% cd /usr/src/lib/libc
% make all install

# 
# Have lunch, tea-break, potty-stop, watch cartoons, etc...
#

% cd /usr/src/gnu/lib/libmalloc
% make all install

% cd /usr/src/gnu/usr.bin/gas
% make all install

% cd /usr/src/gnu/usr.bin/gcc2
% make all install

% cd /usr/src/usr.bin/ar
% make all install

% cd /usr/src/usr.bin/ranlib
% make all install

% cd /usr/src/usr.bin/nm
% make all install

% cd /usr/src/lib/libc
% make clean all install

% cd /usr/src/gnu/usr.bin/ld
% make all install

% unsetenv NOPIC
% make clean all install

% cd /usr/src/gnu/usr.bin/gas
% make clean all install

% cd /usr/src/gnu/usr.bin/gcc2
% make all install

% unsetenv LDSTATIC NOPIC
% cd /usr/src/lib
% make all install

#
# Have sex, take a nap, take a shower, brush your teeth, etc...
#

% cd /usr/src/gnu/lib
% make all install

% cd /usr/src/gnu/usr.bin/ld
% make all install

4.  Now, here is where things get messy.  Most suggestions
I saw recommend now just going to /usr/src, and then
typeing make && make install.  However, there will be a few
barfs along the way, and you will want to rebuild the kernel.

The top level Makefile builds things in this order:

  lib include bin libexec sbin usr.bin usr.sbin share games gnu sys

Thus, what I did was to go to each directory, one at a time
and build with make && make install.

Ie (from /usr/src)

% cd lib; make && make install
% cd ../include; make && make install
% ...

AFTER building sbin, I then went and rebuilt a new kernel,
because the 0.9 kernel has a bug which will cause extremely
frequent kernel panics during long builds.

TO do this, use the exact same procedure you used in 0.9 to build
a new kernel, EXCEPT YOU MUST INSTALL A NEW CONFIG FIRST.

Ie,

% cd /usr/src/usr.sbin/config; make && make install
% cd /sys/arch/i386/conf
% $EDITOR MYCONFIGFILE
% config MYCONFIGFILE
% cd ../compile/MYCONFIGFILE
% make depend && make
% cp /netbsd /wumpus
% cp netbsd /netbsd
% reboot

# AFTER REBOOTING< DON'T FORGET TO  setenv MACHINE_ARCH i386

You can then continue building where you left off (ie
/usr/src/usr.bin).  Please note the following (READ ALL FIRST):

a. in usr.bin, tn3270 will not build.  I have never been
able to get this to build, and couldn't be bothered figuring
out how to fix it, thus, I just removed it temporarily from
the usr.bin Makefile so that the rest would work fine. The old
statically linked one will still be there, and (allah willing)
should work fine.

b. When in gnu/usr.bin/lex, things will vomit left and right. To
get it to work, read the Makefile
[basically, cd lib, make && make install; cd .. ; cp initscan.c
 scan.c; make && make install]

c. Things in share will vomit left and right, and again, I couldn't
have been bothered to fix them up, as much of the stuff was already
there.   After the first death in share, I just aborted, and went
back to install the games tree.  This might not be a great idea :-)

d. in games, if you do NOT use the obj/ stuff, (as I do not), then
fortune will vomit during the build.  I fixed this by removing
any obj/ from the Makefile.  Everything worked fine after
that.



Finally, please note the following:

1.  Please do not attempt this if you are not patient, and willing
to tolerate a sudden loss of a lot of data.

2. You might want to have a copy of old binaries lying around.  I
 trashed  up a few here and there with really stdupid moves, and
had to get a new (old) ld and make.

3. Kneeling towards the east before starting might help
a little.  this stuff is quite amusing.

4. I don't speak for the NetBSD core team, and might very well get
flamed for being an ignorant little twip for this post.  Use at your
own risk.


Right now, I'm having a gas with this thing.  I just got a 1,8GB disk,
and now, with the -current up and running, have even MORE space
free :-)


------------------------------------------------------------------------------